This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-07
Channels
- # announcements (37)
- # babashka (28)
- # beginners (104)
- # calva (28)
- # cider (32)
- # clj-kondo (35)
- # cljs-dev (4)
- # cljsrn (3)
- # clojure (35)
- # clojure-conj (4)
- # clojure-dev (57)
- # clojure-europe (4)
- # clojure-france (6)
- # clojure-gamedev (1)
- # clojure-germany (1)
- # clojure-hamburg (2)
- # clojure-italy (7)
- # clojure-nl (4)
- # clojure-spec (9)
- # clojure-uk (11)
- # clojuredesign-podcast (2)
- # clojurescript (36)
- # clojurex (48)
- # core-async (6)
- # cursive (12)
- # data-science (1)
- # datomic (21)
- # defnpodcast (7)
- # duct (1)
- # events (1)
- # fulcro (56)
- # graalvm (30)
- # graphql (5)
- # jobs (1)
- # joker (21)
- # keechma (1)
- # leiningen (4)
- # off-topic (109)
- # parinfer (20)
- # pathom (27)
- # re-frame (4)
- # shadow-cljs (80)
- # spacemacs (18)
- # sql (32)
- # testing (2)
- # tools-deps (32)
- # vim (20)
when trying to compile clojure master, I get this error:
compile-clojure:
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at clojure.lang.Compile.<clinit>(Compile.java:29)
[java] Caused by: Syntax error compiling at (clojure/core.clj:7053:1).
[java] at clojure.lang.Compiler.load(Compiler.java:7648)
[java] at clojure.lang.RT.loadResourceScript(RT.java:381)
[java] at clojure.lang.RT.loadResourceScript(RT.java:372)
[java] at clojure.lang.RT.load(RT.java:459)
[java] at clojure.lang.RT.load(RT.java:424)
[java] at clojure.lang.RT.<clinit>(RT.java:338)
[java] ... 1 more
[java] Caused by: java.lang.NumberFormatException: null
[java] at java.base/java.lang.Integer.parseInt(Integer.java:614)
[java] at java.base/java.lang.Integer.valueOf(Integer.java:983)
[java] at clojure.core$eval4288.invokeStatic(core.clj:7065)
[java] at clojure.core$eval4288.invoke(core.clj:7055)
[java] at clojure.lang.Compiler.eval(Compiler.java:7177)
[java] at clojure.lang.Compiler.load(Compiler.java:7636)
[java] ... 6 more
did you clean?
it builds every day here https://build.clojure.org/job/clojure/ - haven't seen any issues
java -version
?
build matrix uses 8-11, but I've tested with 12 and 13
$ java -version
openjdk version "1.8.0_212"
$ mvn -version
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T17:06:16+02:00)
it seems loading clojure.string in spec.alpha can be avoided (it isn't used for anything there)
Regarding your deleted comment of why clojure.string/... works without require'ing clojure.string, IIRC there is a subset (not all) of the namespaces that come with the Clojure JAR that are require'd during init.
you should never rely on that
as they may change
not making any fixes to spec.alpha
require just means to load
some namespaces loaded during bootstrap load other stuff
will likely change
> it happens that clojure.string is required within clojure.core I don't see that anywhere in core.clj?
you guys are tag-teaming us 🙂
currently, bootstrap loads clojure.core.server, which loads clojure.string
Some namespaces are created during init other than clojure.core, might be more precise than saying they are require'd.
we have a pending ticket that will avoid loading clojure.core.server (and thus clojure.string) in the case that you don't have socket servers to load
if we change the order or set of these requires and your code breaks, I'm going to claim your code was already broken :)
(tongue in cheek) Clojure 1.11 seems due for reminding people that clojure.core/hash values can change across releases
we should just add the hash of the release version into all hashes :)
for continuity (or something like that) the hash of mutable Java collections can include the hash of the previous release version 🙂
@alexmiller that's not why I brought this up. I brought it up because loading namespaces unnecessarily can slow down startup time.
yes, and the point above is - we might improve that in the core :)
although compared to loading core, the rest are pretty tiny
if you find anything for spec-alpha2, let me know and I'll fix. I think that one was fixed long ago.
the reason I looked at this was I tried out a patch for CLJ-1472. some notes here: https://gist.github.com/borkdude/dd0857cf1958b25496fddbdbf359ca59
if the patch doesn't apply, it needs to be rebased over current master. patches drift....
@borkdude when you tried CLJ-1472-reentrant-finally2.patch
, which program wasn't loadable by Graal native-image?
I don't think spec.alpha was compiled with the patched clojure if that error cropped up
you would need to change the spec pom.xml to include the patched clojure
I wanted to get leiningen out of the loop, so I tried this: https://gist.github.com/borkdude/dd0857cf1958b25496fddbdbf359ca59#trying-to-compile-only-using-toolsdeps not sure why it can't find the main entrypoint. I'll try some more later, getting late here