Fork me on GitHub
#clojure-dev
<
2022-11-15
>
thheller18:11:36

when I bump shadow-cljs to use core.async 1.6.673 I get a weird failure I can't explain. any ideas? https://app.circleci.com/pipelines/github/thheller/shadow-cljs/524/workflows/1545b5a9-c989-433b-89ea-30dbacb1811b/jobs/1204 (full stacktrace available)

Execution error (NoSuchFieldError) at clojure.tools.analyzer.jvm.utils__init/load (REPL:259).
__thunk__0__

Alex Miller (Clojure team)18:11:43

the only change in 1.6 is to dynaload the ioc-macros namespace (which uses the analyzer) in the Clojure version

Alex Miller (Clojure team)18:11:38

I'm assuming you're using the cljs side though

thheller18:11:14

no, the CLJ version

thheller18:11:43

this happens when loading shadow-cljs, which uses core.async. didn't even get to the CLJS compiler yet. from 1.5.648 yes

thheller18:11:58

it is a AOT compiled release yes

Alex Miller (Clojure team)18:11:37

if aot compiling, then the analyzer will be dynamically loaded (requiring-resolve) during compilation and is not needed at runtime

Alex Miller (Clojure team)18:11:57

I'm not sure how that translates to your error though

Alex Miller (Clojure team)18:11:36

maybe has something to do with compilation order?

Alex Miller (Clojure team)18:11:48

is this lein aot or tools.build or something else?

thheller18:11:55

aot compile works fine though, it just happens when running after

Alex Miller (Clojure team)18:11:50

this change will definitely affect when/if tools.analyzer is going to be loaded during aot. in the aot'ed classes, can you diff the set of compiled classes from clojure.tools.analyzer. when using core.async 1.5.x vs 1.6.x ? I would consider maybe including one or more of the analyzer entry points in the compiled namespace list at the top

Alex Miller (Clojure team)19:11:09

or just clojure.core.async.impl.ioc-macros

thheller20:11:31

sorry, got distracted. adding the clojure.core.async.impl.ioc-macros to the :aot list seems to have fixed it

thheller08:11:44

it does seem to cause trouble for other people as well, even when fixed in the shadow-cljs part. https://clojurians.slack.com/archives/C6N245JGG/p1668672181550289

thheller08:11:09

I'll see if I can figure out a minimal repro later

thheller08:11:22

downgraded core.async for now