Fork me on GitHub
#tools-deps
<
2020-12-10
>
seancorfield00:12:02

Zulu OpenJDK 8 has a version with OpenJFX bundled. That's what I use locally when I still need to test on JDK8.

seancorfield00:12:10

(right now I'm running OpenJDK 15+36 and specifying OpenJFX 15-ea+6 in my ~/.clojure/deps.edn file, just FYI @felipecortezfi)

Felipe00:12:12

huh, why does rolling back make javafx available then?

Felipe00:12:50

with an older version of tools.deps I do get to open a REBL window

seancorfield01:12:55

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).

Felipe01:12:07

sorry, I always get mixed up between CLI / tools.deps

seancorfield01:12:04

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.

Alex Miller (Clojure team)01:12:57

Ditto, not sure why it would work on the old one

Alex Miller (Clojure team)01:12:17

Unless how you’re changing the version also changes the jdk

Felipe01:12:06

I don't think so, but I'll check tomorrow

seancorfield01:12:24

(! 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.

seancorfield01:12:51

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=> 

seancorfield01:12:53

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)

seancorfield01:12:59

(and the exact same error happens on CLI 1.10.1.754 with that setup)

seancorfield01:12:23

@felipecortezfi What's in your ~/.clojure/deps.edn file?

Felipe01:12:26

{:mvn/repos {"central" {:url ""}
             "clojars" {:url ""}}

 :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 ""
                                                                :sha     "148cab8f154711f8495bd632ebdc53a14dff7f09"}}}
           :depstar {:extra-deps {seancorfield/depstar {:mvn/version "0.5.2"}}}}}

seancorfield03:12:25

@felipecortezfi OK, doesn't look like anything that could disrupt what you're trying to do here... very weird...

seancorfield03:12:27

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!

arohner15:12:36

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

arohner15:12:01

similarly:

clojure -X clojure.core/println :foo :::invalid
Unreadable arg: ":::invalid"
bash-3.2$ echo $?
0

Alex Miller (Clojure team)16:12:47

the bug being... the exit code?

arohner16:12:46

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

Alex Miller (Clojure team)16:12:32

yeah, I got it. that's done automatically if you throw out of main. I'll fix, thanks!

👍 3
Alex Miller (Clojure team)19:12:46

@arohner I released 1.10.1.763 prerelease with that change if you care to try it (or just wait for the next stable)

Alex Miller (Clojure team)19:12:29

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

Alex Miller (Clojure team)19:12:02

all of the other programs run by clj were doing the proper thing already

arohner20:12:02

Awesome, thank you

seancorfield21:12:46

(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)