Zulu OpenJDK 8 has a version with OpenJFX bundled. That's what I use locally when I still need to test on JDK8.
https://www.azul.com/downloads/zulu-community/?package=jdk-fx
(right now I'm running OpenJDK 15+36 and specifying OpenJFX 15-ea+6 in my ~/.clojure/deps.edn
file, just FYI @felipecortezfi)
huh, why does rolling back make javafx available then?
with an older version of tools.deps
I do get to open a REBL window
An older version of the Clojure CLI, you mean (yes, it happens to use an older version of t.d.a but 1.10.1.507 is the CLI version, not the t.d.a version).
yep
sorry, I always get mixed up between CLI / tools.deps
I have to say that what you're seeing doesn't make much sense to me. I don't see how you can run REBL on OpenJDK 8 at all. And I can't see why just changing the CLI version would affect how REBL and its dependencies are handled.
Ditto, not sure why it would work on the old one
Unless how you’re changing the version also changes the jdk
(! 806)-> JAVA_HOME=$OPENJDK8_HOME /usr/local/Cellar/clojure\@1.10.1.561/1.10.1.561/bin/clj -Sdeps '{:deps {com.cognitect/rebl {:mvn/version "0.9.242"}}}'
Clojure 1.10.1
user=> (require '[cognitect.rebl :as rebl])
nil
user=> (rebl/ui)
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:382).
netscape.javascript.JSObject
user=> ^D
(! 807)-> JAVA_HOME=$OPENJDK8_HOME java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)
I can repro your JSObject error with OpenJDK8 and CLI 1.10.1.561 and REBL 0.9.242 -- which is what I would expect.And I see the exact same error with the very latest CLI (again, exactly as I would expect):
(! 809)-> JAVA_HOME=$OPENJDK8_HOME /usr/local/Cellar/clojure\@1.10.1.754/1.10.1.754/bin/clj -Sdeps '{:deps {com.cognitect/rebl {:mvn/version "0.9.242"}}}'
Clojure 1.10.1
user=> (require '[cognitect.rebl :as rebl])
nil
user=> (rebl/ui)
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:382).
netscape.javascript.JSObject
user=>
With JDK 15 and CLI 1.10.1.561, I get this error -- which, again, is expected because there's no OpenJFX deps in play:
(! 810)-> /usr/local/Cellar/clojure\@1.10.1.561/1.10.1.561/bin/clj -Sdeps '{:deps {com.cognitect/rebl {:mvn/version "0.9.242"}}}'
Clojure 1.10.1
user=> (require '[cognitect.rebl :as rebl])
nil
user=> (rebl/ui)
Execution error (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (BuiltinClassLoader.java:606).
javafx.scene.web.WebEngine
user=> ^D
(! 811)-> java -version
openjdk version "15" 2020-09-15
OpenJDK Runtime Environment AdoptOpenJDK (build 15+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15+36, mixed mode, sharing)
(and the exact same error happens on CLI 1.10.1.754 with that setup)
@felipecortezfi What's in your ~/.clojure/deps.edn
file?
{:mvn/repos {"central" {:url "<https://repo1.maven.org/maven2/>"}
"clojars" {:url "<https://repo.clojars.org/>"}}
:aliases {:1.8 {:override-deps {org.clojure/clojure {:mvn/version "1.8.0"}}}
:1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}}
:1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.0"}}}
:1.10.1 {:override-deps {org.clojure/clojure {:mvn/version "1.10.1"}}}
:master {:override-deps {org.clojure/clojure {:mvn/version "1.11.0-master-SNAPSHOT"}}}
:new {:extra-deps {seancorfield/clj-new {:mvn/version "0.8.6"}}
:main-opts ["-m" "clj-new.create"]}
:deps {:extra-deps {org.clojure/tools.deps.alpha {:git/url "<https://github.com/clojure/tools.deps.alpha>"
:sha "148cab8f154711f8495bd632ebdc53a14dff7f09"}}}
:depstar {:extra-deps {seancorfield/depstar {:mvn/version "0.5.2"}}}}}
I don't think so, but I'll check tomorrow
@felipecortezfi OK, doesn't look like anything that could disrupt what you're trying to do here... very weird...
I will say: rename :deps
to :add-libs
and update the SHA to match what's in my latest dot-clojure file. :deps
is provided in the system deps.edn
(baked into the CLI and t.d.a) and having a conflicting :deps
alias will cause you all sorts of breakage/confusion now that the Clojure CLI has documented -X:deps
based tooling!
I think this is a bug, which would be very helpful in CI:
$ clojure -X bogus
Unqualified function can't be resolved: bogus
bash-3.2$ echo $?
0
similarly:
clojure -X clojure.core/println :foo :::invalid
Unreadable arg: ":::invalid"
bash-3.2$ echo $?
0
the bug being... the exit code?
yes
runtime errors correctly set the exit code:
$ clojure -X clojure.core/assoc 1 2
Execution error (ArityException) at clojure.run.exec/exec (exec.clj:39).
Wrong number of args (1) passed to: clojure.core/assoc--5416
Full report at:
/var/folders/4l/tfxcfcs16t17zs2_pgkyxy540000gn/T/clojure-4043596194159065702.edn
bash-3.2$ echo $?
1
yeah, I got it. that's done automatically if you throw out of main. I'll fix, thanks!
@arohner I released 1.10.1.763 prerelease with that change if you care to try it (or just wait for the next stable)
I think I might actually have had that in there originally but pulled it when I was writing unit tests, with the intention to put it back
all of the other programs run by clj were doing the proper thing already
Awesome, thank you
(this version just missed our candidate build for our next release but I have it on dev for testing; we have .739 on production and .754 in the QA pipeline)