Closed philomates closed 6 years ago
@phillipm Thanks for reporting! Can you paste the output of lein deps :plugin-tree
from the project that causes the above exception to be thrown?
The reason I'm asking is that, while ancient-clj
excludes slingshot
(it was an optional dependency for clj-http
) lein-ancient
does not, so for me the above command prints (using Leiningen 2.8.1 on Java 1.8.0_131 Java HotSpot(TM) 64-Bit Server VM
):
[lein-ancient "0.6.14"]
[clj-http "3.7.0" :exclusions [[commons-codec] [org.apache.httpcomponents/httpcore]]]
[commons-io "2.5" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpasyncclient "4.1.3" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpcore-nio "4.4.6"]
[org.apache.httpcomponents/httpclient "4.5.3" :exclusions [[org.clojure/clojure]]]
[commons-logging "1.2"]
[org.apache.httpcomponents/httpmime "4.5.3" :exclusions [[org.clojure/clojure]]]
[potemkin "0.4.3" :exclusions [[org.clojure/clojure]]]
[clj-tuple "0.2.2"]
[riddley "0.1.12"]
[slingshot "0.12.2" :exclusions [[org.clojure/clojure]]]
[com.amazonaws/aws-java-sdk-s3 "1.11.28" :exclusions [[joda-time] [commons-logging]]]
[com.amazonaws/aws-java-sdk-core "1.11.28"]
[com.fasterxml.jackson.core/jackson-databind "2.6.6"]
[com.fasterxml.jackson.core/jackson-annotations "2.6.0"]
[com.fasterxml.jackson.core/jackson-core "2.6.6"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.6.6"]
[com.amazonaws/aws-java-sdk-kms "1.11.28"]
[com.amazonaws/jmespath-java "1.0"]
[lein-license "0.1.7-SNAPSHOT"]
[org.yaml/snakeyaml "1.17"]
[rewrite-clj "0.5.0" :exclusions [[org.clojure/clojure]]]
[org.clojure/tools.reader "0.10.0" :exclusions [[org.clojure/clojure]]]
[lein-try "0.4.3"]
As you can see, slingshot
is there.
I've pasted it below. Looking at the differences, aside from the fact that your dependency tree uses lein-ancient
and mine ancient-clj
, is the fact that the clj-http
version is different. I tried updating ancient-clj
to use clj-http 3.7.0
locally, and it fixed my issue with slingshot
. Perhaps that is the way forward with this?
[lein-midje "3.2.1"]
[...my-plugin-that-I'm-having-issues-with... "0.7.5-SNAPSHOT"]
[ancient-clj "0.6.14"]
[clj-http "2.1.0" :exclusions [[com.cognitect/transit-clj] [crouton] [org.apache.httpcomponents/httpclient] [slingshot]]]
[commons-codec "1.10" :exclusions [[org.clojure/clojure]]]
[commons-io "2.4" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpcore "4.4.4" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpmime "4.5.1" :exclusions [[org.clojure/clojure]]]
[commons-logging "1.2"]
[joda-time "2.9.2"]
[org.clojure/data.xml "0.0.8"]
[org.clojure/clojure "1.4.0"]
[potemkin "0.4.3"]
[clj-tuple "0.2.2"]
[riddley "0.1.12"]
[version-clj "0.1.2"]
[s3-wagon-private "1.3.0" :exclusions [[commons-codec] [commons-logging]]]
[com.amazonaws/aws-java-sdk-s3 "1.11.28" :exclusions [[com.fasterxml.jackson.core/jackson-core] [com.fasterxml.jackson.core/jackson-databind]]]
[com.amazonaws/aws-java-sdk-core "1.11.28"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.6.6"]
[org.apache.httpcomponents/httpclient "4.5.2"]
[com.amazonaws/aws-java-sdk-kms "1.11.28"]
[com.amazonaws/jmespath-java "1.0"]
[com.fasterxml.jackson.core/jackson-core "2.5.5"]
[com.fasterxml.jackson.core/jackson-databind "2.5.5"]
[com.fasterxml.jackson.core/jackson-annotations "2.5.0"]
[org.springframework.build/aws-maven "4.8.0.RELEASE" :exclusions [[com.amazonaws/aws-java-sdk]]]
[ch.qos.logback/logback-classic "1.0.12"]
[ch.qos.logback/logback-core "1.0.12"]
[org.slf4j/jcl-over-slf4j "1.7.5"]
[org.slf4j/slf4j-api "1.7.5"]
[venantius/ultra "0.5.1" :exclusions [[org.clojure/clojure]]]
[grimradical/clj-semver "0.3.0" :exclusions [[org.clojure/clojure]]]
[io.aviso/pretty "0.1.30"]
[mvxcvi/puget "1.0.1"]
[fipp "0.6.6"]
[org.clojure/core.rrb-vector "0.0.11"]
[mvxcvi/arrangement "1.1.0"]
[mvxcvi/whidbey "1.3.0"]
[org.clojure/data.codec "0.1.0"]
[org.clojars.brenton/google-diff-match-patch "0.1"]
[org.clojure/tools.nrepl "0.2.12"]
[robert/hooke "1.3.0"]
[venantius/glow "0.1.4" :exclusions [[hiccup] [garden]]]
[clj-antlr "0.2.3"]
[org.antlr/antlr4-runtime "4.5.3"]
[org.antlr/antlr4 "4.5.3"]
[instaparse "1.4.1"]
Actually, I spoke too soon. I accidentally used a local ancient-clj
version where I removed the slingshot
exclusion. Simply bumping clj-http
while leaving in the exclusion doesn't fix this issue :(
Ah, I misread ancient-clj
as lein-ancient
. Sorry for that!
So, I think my mistake here is that I thought that slingshot
was an optional dependency. The tests are passing because midje
, the testing framework, actually depends on slingshot
. This is a bug!
If you explicitly include [slingshot "0.12.2"]
in your plugin's dependencies, it should work for now, I'll fix it in ancient-clj as quickly as possible.
A heads-up, in case this is useful: using 0.6.15 did not fix this issue for me -- I'm still getting the slingshot not found error when attempting to use the lein-ancient
plugin with lein 2.8.1.
I tried the following (unsuccessfully) to solve this:
lein with-profile +test deps :tree
and updated :exclusions
and :dependencies
until no more errors were displayed[slingshot "0.12.2"]
in depsOdd/unexpected things in addition to the continued failure of lein-ancient
on lein 2.8.1:
:test
profile's :exclusions
didn't have any effectancient-clj
dependency also didn't have any effect:plugins [lein-ancient ...]
seemed to workancient-clj
and not the newer ones defined in lein-ancient
...Other useful info:
lein clean
before I use lein ancient
:test
profile:
:test {
:dependencies [
[clj-http "3.7.0"]
[com.amazonaws/aws-java-sdk-s3 "1.11.28"]
[slingshot "0.12.2"]]
:plugins [
[jonase/eastwood "0.2.5"]
[lein-ancient "0.6.15" :exclusions [clj-http com.amazonaws/aws-java-sdk-s3]]
[lein-kibit "0.1.6"]]}
deps :tree
:
[clj-http "3.7.0" :scope "test" :exclusions [[org.clojure/clojure]]]
[commons-codec "1.10" :scope "test" :exclusions [[org.clojure/clojure]]]
[commons-io "2.5" :scope "test" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpasyncclient "4.1.3" :scope "test" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpcore-nio "4.4.6" :scope "test"]
[org.apache.httpcomponents/httpclient "4.5.3" :scope "test" :exclusions [[org.clojure/clojure]]]
[commons-logging "1.2" :scope "test"]
[org.apache.httpcomponents/httpcore "4.4.6" :scope "test" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpmime "4.5.3" :scope "test" :exclusions [[org.clojure/clojure]]]
[potemkin "0.4.3" :scope "test" :exclusions [[org.clojure/clojure]]]
[clj-tuple "0.2.2" :scope "test"]
[riddley "0.1.12" :scope "test"]
[clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
[com.amazonaws/aws-java-sdk-s3 "1.11.28" :scope "test" :exclusions [[org.clojure/clojure]]]
[com.amazonaws/aws-java-sdk-core "1.11.28" :scope "test"]
[com.fasterxml.jackson.core/jackson-databind "2.6.6" :scope "test"]
[com.fasterxml.jackson.core/jackson-annotations "2.6.0" :scope "test"]
[com.fasterxml.jackson.core/jackson-core "2.6.6" :scope "test"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.6.6" :scope "test"]
[joda-time "2.8.1" :scope "test"]
[com.amazonaws/aws-java-sdk-kms "1.11.28" :scope "test"]
[com.amazonaws/jmespath-java "1.0" :scope "test"]
[org.clojure/clojure "1.8.0" :exclusions [[org.clojure/clojure]]]
[org.clojure/tools.namespace "0.2.11" :scope "test" :exclusions [[org.clojure/clojure]]]
[org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]
[slingshot "0.12.2" :scope "test" :exclusions [[org.clojure/clojure]]]
deps :plugin-tree
:
[ancient-clj "0.3.14"]
[clj-aws-s3 "0.3.10" :exclusions [[com.amazonaws/aws-java-sdk]]]
[clj-time "0.6.0"]
[clj-http "2.1.0" :exclusions [[com.cognitect/transit-clj] [crouton] [slingshot]]]
[commons-codec "1.10" :exclusions [[org.clojure/clojure]]]
[commons-io "2.4" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpclient "4.5.1" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpcore "4.4.4" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpmime "4.5.1" :exclusions [[org.clojure/clojure]]]
[com.amazonaws/aws-java-sdk-s3 "1.10.66"]
[com.amazonaws/aws-java-sdk-core "1.10.66"]
[com.fasterxml.jackson.core/jackson-databind "2.5.3"]
[com.fasterxml.jackson.core/jackson-annotations "2.5.0"]
[com.fasterxml.jackson.core/jackson-core "2.5.3"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.5.3"]
[com.amazonaws/aws-java-sdk-kms "1.10.66"]
[commons-logging "1.2"]
[joda-time "2.9.2"]
[org.clojure/data.xml "0.0.8"]
[potemkin "0.4.3"]
[clj-tuple "0.2.2"]
[riddley "0.1.12"]
[version-clj "0.1.2"]
[jonase/eastwood "0.2.5"]
[org.clojars.brenton/google-diff-match-patch "0.1"]
[org.clojure/clojure "1.8.0"]
[org.ow2.asm/asm-all "4.2"]
[lein-ancient "0.6.15" :exclusions [[clj-http] [com.amazonaws/aws-java-sdk-s3]]]
[lein-cljsbuild "1.1.5"]
[fs "1.1.2"]
[org.apache.commons/commons-compress "1.3"]
[lein-cloverage "1.0.9"]
[bultitude "0.2.8"]
[org.tcrawley/dynapath "0.2.3"]
[lein-exec "0.3.6"]
[lein-kibit "0.1.6"]
[jonase/kibit "0.1.6"]
[org.clojure/core.logic "0.8.11"]
[org.clojure/tools.cli "0.3.5"]
[org.clojure/tools.reader "1.0.2"]
[rewrite-clj "0.4.12"]
[org.clojure/tools.namespace "0.2.11"]
[lein-midje "3.2.1"]
$ lein -v
Leiningen 2.8.1 on Java 1.8.0_60 Java HotSpot(TM) 64-Bit Server VM
$ lein with-profile +test ancient
$ lein with-profile +test ancient check :all
Error encountered performing task 'ancient' with profile(s): 'base,system,user,provided,dev,test'
java.io.FileNotFoundException: Could not locate slingshot/slingshot__init.class or slingshot/slingshot.clj on classpath., compiling:(clj_http/client.clj:1:1)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at ancient.ancient_clj.v0v3v14.ancient_clj.io.http$eval2020$loading__5569__auto____2021.invoke(http.clj:1)
at ancient.ancient_clj.v0v3v14.ancient_clj.io.http$eval2020.invokeStatic(http.clj:1)
at ancient.ancient_clj.v0v3v14.ancient_clj.io.http$eval2020.invoke(http.clj:1)
@bobbermac Thank you for providing that much information on your problem! Unfortunately, the best way for me to investigate this would still be a minimal complete project.clj
that illustrates the issue. Could you provide one?
However, there is one thing I can already comment on. The stacktrace you provided contains:
at ancient.ancient_clj.v0v3v14.ancient_clj.io.http$eval2020$loading__5569__auto____2021.invoke(http.clj:1)
at ancient.ancient_clj.v0v3v14.ancient_clj.io.http$eval2020.invokeStatic(http.clj:1)
at ancient.ancient_clj.v0v3v14.ancient_clj.io.http$eval2020.invoke(http.clj:1)
This means you're calling a version of lein-ancient that used mranderson
to inline [ancient-clj "0.3.14"]
. The only version that did that was [lein-ancient "0.6.10"]
(see f8b3a060), so it seems that you're not using the version of lein-ancient that you think you are.
Oh, wow -- good catch. Given the explicit versions in the project.clj
, your observation indicates that there's something somewhere else overriding this ... and sure enough, I found an old profiles.clj
file in my home dir.
Everything works like a charm, now -- thanks so much!
Hi, I've upgraded to
ancient-clj 0.6.14
in my project and am able to run it fine withleiningen 2.7.1
.When I upgrade to
leiningen 2.8.1
I get the error pasted below.If I remove the exclusion of
slingshot
here, then everything works fine. Shall I open a PR with that change, or is there a reason that such an exclusion is needed?Thanks