Closed eerohele closed 9 months ago
Same error when using the lein-midje
plugin.
It seems I reintroduced #2328 here 😓
For reference, it seems that these plugins include the project in the code that is eval'ed, and the leiningen project includes metadata that refer to vars and functions, such as (can be checked with :eval-in :pprint
):
:compile-path
#<Var@22b7ef2b:
#object[leiningen.core.classpath$checkout_deps_paths 0xd0b814d "leiningen.core.classpath$checkout_deps_paths@d0b814d"]>],
...
:deploy-repositories
^{:reduce
#object[leiningen.core.project$reduce_repo_step 0xb788dc2 "leiningen.core.project$reduce_repo_step@b788dc2"]}
FWIW, you can also reproduce this with either lein trampoline repl :headless
(but not with either lein repl :headless
or lein trampoline repl
, interestingly).
I am using another plugin that is also broken by the 2.11.0 upgrade, :plugins [[reifyhealth/lein-git-down "0.4.1"]]
. I'm not sure if I should report a separate ticket for this issue? The failure I am getting relates to computing the classpath.
(lein-git-down is no longer maintained by the original authors, but it's been working quite well for me up till now. I'm assuming you want to know about breaking changes...)
With this project.clj
:
(defproject lein-repro "0.1.0-SNAPSHOT"
:plugins [[reifyhealth/lein-git-down "0.4.1"]]
:middleware [lein-git-down.plugin/inject-properties]
:git-down {pieterbreed/empty-clj-library {:coordinates pieterbreed/empty-clj-library}}
:repositories [["github" {:url "git://github.com"}]]
:dependencies [[org.clojure/clojure "1.11.1"]
[pieterbreed/empty-clj-library "d1d8fef7dcad05ec5da2505fdd326142d226436b"]])
$ lein clean && rm -rf ~/.m2/repository/pieterbreed/empty-clj-library && lein -v && lein deps
Leiningen 2.10.0 on Java 19 OpenJDK 64-Bit Server VM
Retrieving pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/empty-clj-library-d1d8fef7dcad05ec5da2505fdd326142d226436b.pom from github
Retrieving pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/empty-clj-library-d1d8fef7dcad05ec5da2505fdd326142d226436b.jar from github
Created /home/pieter/.gitlibs/libs/pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/target/empty-clj-library-0.1.0-SNAPSHOT.jar
$ lein clean && rm -rf ~/.m2/repository/pieterbreed/empty-clj-library && lein -v && lein deps
Leiningen 2.11.0 on Java 19 OpenJDK 64-Bit Server VM
Retrieving pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/empty-clj-library-d1d8fef7dcad05ec5da2505fdd326142d226436b.pom from github
Could not find destination file to checksum
Could not find destination file to checksum
Retrieving pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/empty-clj-library-d1d8fef7dcad05ec5da2505fdd326142d226436b.jar from github
Created /home/pieter/.gitlibs/libs/pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/target/empty-clj-library-0.1.0-SNAPSHOT.jar
Could not find destination file to checksum
Could not find destination file to checksum
Could not find artifact pieterbreed:empty-clj-library:jar:d1d8fef7dcad05ec5da2505fdd326142d226436b in central (https://repo1.maven.org/maven2/)
Could not find artifact pieterbreed:empty-clj-library:jar:d1d8fef7dcad05ec5da2505fdd326142d226436b in clojars (https://repo.clojars.org/)
Could not transfer artifact pieterbreed:empty-clj-library:jar:d1d8fef7dcad05ec5da2505fdd326142d226436b from/to github (git://github.com): Checksum validation failed, no checksums available
Failed to read artifact descriptor for pieterbreed:empty-clj-library:jar:d1d8fef7dcad05ec5da2505fdd326142d226436b
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
@pieterbreed this seems like a different problem.
Just to confirm, can you apply https://codeberg.org/leiningen/leiningen/pulls/39 to see if it solves the problem? If not, it's probably caused by an upstream change from the new version of https://codeberg.org/leiningen/leiningen/commit/d0b2a51580307d1dc08e33b0c1626259db260c02 in which case it would need to be fixed outside Leiningen.
Hi @technomancy , I did as you requested; checked out marcobiscaro2112/mb/dont-print-meta
, made (local-only) change to lein project.cl for version ((defproject leiningen "2.11.2-SNAPSHOT"
), built uberjar and set LEIN_JAR
.
I am getting the same issue as I reported, so this is a seperate issue than the one addressed in the MR.
I'm pasting a log below just to help rule out my own mistakes.
$ env | grep -i lein; lein clean && rm -rf ~/.m2/repository/pieterbreed/empty-clj-library && lein -v && DEBUG=true lein deps
PWD=/home/pieter/Source/github.com/pieterbreed/lein-repro
LEIN_JAR=/home/pieter/Source/codeberg.org/leiningen/leiningen/target/leiningen-2.11.2-SNAPSHOT-standalone.jar
Leiningen 2.11.0 on Java 19 OpenJDK 64-Bit Server VM
Leiningen's classpath: /home/pieter/Source/codeberg.org/leiningen/leiningen/target/leiningen-2.11.2-SNAPSHOT-standalone.jar
Applying task deps to []
Retrieving pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/empty-clj-library-d1d8fef7dcad05ec5da2505fdd326142d226436b.pom from github
Could not find destination file to checksum
Could not find destination file to checksum
Retrieving pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/empty-clj-library-d1d8fef7dcad05ec5da2505fdd326142d226436b.jar from github
Applying task javac to nil
Running javac with [@/tmp/.leiningen-cmdline9837684533248710530.tmp]
Applying task compile to nil
All namespaces already AOT compiled.
Created /home/pieter/.gitlibs/libs/pieterbreed/empty-clj-library/d1d8fef7dcad05ec5da2505fdd326142d226436b/target/empty-clj-library-0.1.0-SNAPSHOT.jar
Could not find destination file to checksum
Fixed by 82e0927647e58d2ed7afddedfe4eba36d2dff39c.
@pieterbreed I got a different error with 2.11.1:
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:476).
org.apache.commons.io.output.TeeOutputStream
Updating to the latest git main (with marcobiscaro2112/mb/dont-print-meta
merged) seems to have fixed that problem, but I still get the problem about the missing checksums.
Reverting d0b2a51580307d1dc08e33b0c1626259db260c02 makes the problem go away. Since the main change in that commit was to bump the version of clj-commons/pomegranate
, I believe the issue to be caused by changes in that library rather than changes in Leiningen. I don't think we can fix it here unfortunately. It will need to be fixed upstream.
@eerohele I hope to release the version with the fix for eastwood by early next week.
Many thanks for the quick turnaround!
2.11.2 is out with this fix.
Given this
project.clj
:Then:
cf. Leiningen 2.10.0:
I have moved my
profiles.clj
out of the way, and I am using the newest available version of the Eastwood Leiningen plugin.Possibly related issues: