Fork me on GitHub
#tools-build
<
2021-12-14
>
Mark Wardle21:12:11

Hi all, may be an issue with the way I’ve configured things, but intermittently, and seemingly at random, I get this on running my build tool: Exception in thread "Thread-4" java.lang.ExceptionInInitializerError at clojure.tools.deps.alpha.util.S3TransporterFactory.triggerLoad(S3TransporterFactory.java:44) at clojure.tools.deps.alpha.util.S3TransporterFactory.access$100(S3TransporterFactory.java:29) at clojure.tools.deps.alpha.util.S3TransporterFactory$1.run(S3TransporterFactory.java:49) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: Syntax error compiling at (clojure/tools/reader/impl/errors.clj:71:4). at clojure.lang.Compiler.analyze(Compiler.java:6812) at clojure.lang.Compiler.analyze(Compiler.java:6749) at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3824) Works fine when I run it again. Here’s my deps.edn:

{:paths   []
 :deps    {org.clojure/clojure  {:mvn/version "1.11.0-alpha3"}
           com.eldrix/clods     {:git/url ""
                                 :sha     "168de00f083c5b6c538375a37cc1a9ec523283ea"
                                 :exclusions [potemkin/potemkin]}
           com.eldrix/concierge {:git/url ""
                                 :sha     "326f729f126db069a3d59c8294f7345c0bda7f40"}
           com.eldrix/hermes    {:git/url ""
                                 :sha     "4c7d17bea26caa8169baa0cc2f62e09c1afd2fad"}}

 :aliases {:build    {:deps       {io.github.clojure/tools.build {:git/tag "v0.7.2" :git/sha "0361dde"}}
                      :ns-default build}}}
It feels like some kind of race condition or lack of clean build, but I don’t know how to investigate further. Is there something I can do to debug it?

Alex Miller (Clojure team)00:12:29

I believe this is now fixed on latest tools.build v0.7.3

Alex Miller (Clojure team)00:12:39

would be happy for feedback if you find otherwise

borkdude22:12:02

@mark354 Perhaps this workaround will work for you: https://github.com/clj-easy/graal-build-time/blob/b91cd78a977fdf81758705668f44b0d2ddad4bdc/build.clj#L1 Are you perhaps creating more than one basis?

Mark Wardle22:12:41

Thanks! I will try that for now. I just tried to run six times before making that change to prove that this was going to fix the issue, and typically, it didn’t fail once, so hard to reproduce for me at least. Thank you!

Alex Miller (Clojure team)22:12:02

it is a race condition with namespace loading and a bug in tools.deps, haven't had a chance to work on it yet

Mark Wardle22:12:59

Thank you that’s helpful to know - and thanks for your work on this - really enjoying having this control over build process - so otherwise it is working nicely thank you!