Closed vkz closed 5 years ago
Downloading: com/google/javascript/closure-compiler/v20150126/closure-compiler-v20150126.jar from https://repo1.maven.org/maven2/
An ancient version of the Closure Compiler is included for some reason. That is the cause, it is not related to Java 9 or Clojure 1.9.
It looks like clj
is choosing the gclosure dependency from piggieback's CLJS version instead of the one you're requesting in deps.edn
?
If there's a way to exclude transitive dependencies, I would suggest explicitly excluding piggieback's CLJS dep so that clj
resolves using your own.
Well spotted @thheller thank you. I should've thought about transitive dependencies. Trouble is clj
caches resolved deps locally in the project directory and wouldn't re-download if what's been resolved is present in .m2, so I had to nuke .cpcache
and delete old cljs from .m2 to see what you noticed. Indeed the resolver appears to pick the older cljs from piggieback - bit unintuitive to me. Wonder if I should report this upstream.
As @cemerick suggested I forced resolution like so:
{:deps
{clj-time {:mvn/version "0.14.2"}
org.clojure/clojurescript {:mvn/version "1.9.946"}}
:aliases {:dev {:extra-deps { ;; cider/cider-nrepl {:mvn/version "0.16.0-SNAPSHOT"}
org.clojure/tools.nrepl {:mvn/version "0.2.12"}
com.cemerick/piggieback {:mvn/version "0.2.2"}}
:override-deps {org.clojure/clojurescript {:mvn/version "1.9.946"}}
:extra-paths ["dev"]}}}
tbh I smell trouble with this behavior of the resolver in tools.deps
. Pushing piggieback and tools.nrepl deps from aliases to :deps
produces the same problematic result. Sadly tools.deps
reference doesn't go into details of how the resolver works.
I suppose we can close this issue. Thank you for your help.
@bhauman just bumped the cljs dep, so I guess that problem is solved now.
I think the latest Clojurescript release 1.10 fixes JDK 9 compatibility issue caused by xml-bind. Relevant JIRA issue : https://dev.clojure.org/jira/browse/CLJS-2377 . Upgrading it might resolve the issue.
deps.edn
to reproduceCommand to reproduce:
clj -J'--add-modules=java.xml.bind' -R:dev -C:dev
Result while downloading and compiling:
Note, that cljs compiler seems to work fine. At least I haven't run into any issues performing all steps from Cljs Quick Start guide. That includes building and starting browser repl. Did it with cljs from
deps.edn
not with a standalone jar.May be an issue with Clojure/Cljs or Java 9. Please let me know if worth reporting upstream.