edge icon indicating copy to clipboard operation
edge copied to clipboard

onejar execution can't find pack on classpath

Open pwhittin opened this issue 3 years ago • 2 comments

From within an application directory, executing the following command:

../bin/onejar -A:prod project.jar

results in the following output:

WARNING: When invoking clojure.main, use -M                     
Execution error (FileNotFoundException) at clojure.main/main (main.java:40).                                                     
Could not locate mach/pack/alpha/one_jar__init.class, mach/pack/alpha/one_jar.clj or mach/pack/alpha/one_jar.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.

It seems the like clojure (Clojure CLI version 1.10.3.814) is not downloading the dependencies correctly.

The problem can be resolved by executing the following command:

clojure -Sdeps '{:deps {pack/pack.alpha {:git/url "https://github.com/juxt/pack.alpha.git" :sha "73552d02e43fa7fac4e3f245257742a9534ea0f2"}}}' -Spath

which causes the dependencies to be downloaded.

pwhittin avatar Mar 24 '21 14:03 pwhittin

I could repro this immediately after I updated, but now I cannot. I've tried downgrading & re-upgrading and still cannot reproduce.

I suspect this is a bug in clojure cli as you mentioned.

SevereOverfl0w avatar Mar 27 '21 09:03 SevereOverfl0w

I believe something like "rm -rf ~/.m2" might allow reproduction.

pwhittin avatar Mar 29 '21 15:03 pwhittin