juxt / edge

A Clojure application foundation from JUXT
https://juxt.pro/edge/
MIT License
506 stars 62 forks source link

onejar execution can't find pack on classpath #132

Open pwhittin opened 3 years ago

pwhittin commented 3 years ago

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.

SevereOverfl0w commented 3 years ago

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.

pwhittin commented 3 years ago

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