Closed xsc closed 10 years ago
I think this is a dupe of #1563; root cause is bugs in Clojure loading code that has been AOT'd.
Fair enough. I could "solve" the problem by adding
:exclusions [org.clojure/core.cache]
to lein-ancient's project.clj
but that seems like a bug waiting to happen. OTOH, making users install it using
[lein-ancient "..." :exclusions [org.clojure/core.cache]]
just moves the problem... Meh.
Actually, looking further at the problem, this is a bit different. It appears the logic that Stencil uses to determine whether core.cache
is available is wrong--it catches FileNotFoundException
but it misses the ExceptionInInitializerError
that has a FileNotFound
as its .getCause
.
Here's a fix: https://github.com/davidsantiago/stencil/pull/26
Thank you for your efforts!
Do you have any hints on how I could verify that this solves the issue? I tried including [stencil "0.3.5"]
/[stencil "0.3.5" :exclusions [org.clojure/core.cache]]
in the profile's :plugins
but no cigar.
And running Leiningen from master seems to fail:
$ bin/lein version
java.lang.IllegalArgumentException: No matching field found: getConnectionManager for class org.apache.maven.wagon.providers.http.HttpWagon
at clojure.lang.Reflector.getInstanceField (Reflector.java:271)
clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:315)
leiningen.core.ssl/fn (ssl.clj:91)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.AFn.applyTo (AFn.java:144)
clojure.core$apply.invoke (core.clj:624)
clojure.core$memoize$fn__5097.doInvoke (core.clj:5846)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.lang.Var.invoke (Var.java:379)
leiningen.core.project$load_certificates.invoke (project.clj:763)
leiningen.core.project$activate_middleware.invoke (project.clj:770)
leiningen.core.project$init_project.invoke (project.clj:877)
leiningen.core.project$read.invoke (project.clj:951)
leiningen.core.project$read.invoke (project.clj:952)
leiningen.core.main$_main$fn__1226.invoke (main.clj:381)
leiningen.core.main$_main.doInvoke (main.clj:378)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.lang.Var.invoke (Var.java:379)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invoke (core.clj:624)
clojure.main$main_opt.invoke (main.clj:315)
clojure.main$main.doInvoke (main.clj:420)
clojure.lang.RestFn.invoke (RestFn.java:436)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37)
Unfortunately the Clojure bug that causes this is only triggered by AOT, so you'd have to fake out the release process. You can try this locally by running bin/release 2.5.1 and pressing Ctrl-c when it asks you to confirm there haven't been any timing regressions.
Adding the current SNAPSHOT of lein-ancient to the
:plugins
vector of my~/.lein/profiles.clj
causes anExceptionInInitializerError
when runninglein new
. It seems to be missing the namespaceclojure.data.priority-map
which would hint at lein-ancient providing an incompatible version oforg.clojure/data.priority-map
- however, version 0.0.5 of that artifact contains the namespace in question.I attached various related files/outputs below.
profiles.clj
Shell