This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-08
Channels
- # announcements (1)
- # babashka (28)
- # beginners (13)
- # calva (10)
- # clerk (18)
- # clj-on-windows (39)
- # clj-otel (1)
- # cljdoc (17)
- # clojars (12)
- # clojure (40)
- # clojure-austin (11)
- # clojure-brasil (1)
- # clojure-europe (23)
- # clojure-nl (3)
- # clojure-norway (16)
- # clojure-uk (2)
- # clojurescript (28)
- # clr (4)
- # conjure (1)
- # emacs (14)
- # hoplon (6)
- # hyperfiddle (59)
- # interop (2)
- # leiningen (1)
- # off-topic (37)
- # pathom (1)
- # polylith (5)
- # portal (7)
- # reagent (9)
- # releases (3)
- # shadow-cljs (22)
- # spacemacs (6)
- # tools-build (12)
- # tools-deps (51)
- # web-security (6)
- # xtdb (7)
I'm getting this error during compilation (compile-clj) and it only happens when I depend on maven dependency that has lots of transitive dependencies. I thought it could be the long classpath issue so I tried adjusting my maven-local to something shorter on a different drive (D). However it is still looking for some main class on my C drive:
Error: Could not find or load main class Dumais\AppData\Local\Temp\compile-clj15644282254864761747\compile-clj;target.classes;src;C:\Users\Paul
Caused by: java.lang.ClassNotFoundException: Dumais\AppData\Local\Temp\compile-clj15644282254864761747\compile-clj;target/classes;src;C:\Users\Paul
Execution error (ExceptionInfo) at clojure.tools.build.tasks.compile-clj/compile-clj (compile_clj.clj:114).
Clojure compilation failed, working dir preserved: C:\Users\Paul Dumais\AppData\Local\Temp\compile-clj15644282254864761747
I've heard about this issue recently in #C6QH853H8 or #C02B5GHQWP4 as well. Maybe it helps looking in there as well
Nothing yet, but then I went down a different path and back again - so I got help on the second issue.
At first I was going to launch clojure code via java in an existing app, but then thought a separate app that uses the java app as a dependency would be easier.
I'm suspecting it's a Windows specific escaping issue with how tools.build calls process builder (which I've accounted for in babashka.process when I ran into that) but I'm not sure. :use-cp-file
may help
it could also be useful to get a hold of this file: https://github.com/clojure/tools.build/blob/f096376cd4e301dbf90ce447fee901397d3490c0/src/main/clojure/clojure/tools/build/tasks/compile_clj.clj#L105 and see what's in it
I find it interesting that running clj -P is now downloading a bunch of dependencies that it didn't do before trying to compile.
hmmm, now I get:
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
C:\Users\Paul Dumais\AppData\Local\Temp\uber10211030562887780850\LICENSE (Access is denied)
This has come up before in #C02B5GHQWP4: sometimes a dependency has a LICENSE directory but another has a LICENSE file
Hmm, tried putting in this as an option to compile-clj but no joy so far:
:exclude [#"(?i)^META-INF/LICENSE/.*"
#"^LICENSE/.*"]