Getting this with ClojureScript 1.12.42. Works fine with 1.12.38
I just tried upgrading and I get the same message with 3.1.1 and ClojureScript 1.12.38. I can't upgrade ClojureScript for now, it brings in a protocol buffers dependency which breaks one of the older libraries I use. Am I stuck on 3.0.5, then?
[2025-05-20 13:45:20.426 - WARNING] :shadow.cljs.devtools.server.util/handle-ex - {:msg {:type :start-autobuild}}
NoSuchMethodError 'com.google.javascript.jscomp.jarjar.com.google.common.collect.ImmutableSet com.google.javascript.jscomp.AbstractCompiler.getExternProperties()'
com.google.javascript.jscomp.ShadowAccess.getExternProperties (ShadowAccess.java:32)
shadow.build.closure/load-extern-properties (closure.clj:1060)
shadow.build.closure/load-extern-properties (closure.clj:1040)
shadow.build.compiler/compile-cljs-sources (compiler.clj:1372)
shadow.build.compiler/compile-cljs-sources (compiler.clj:1366)
shadow.build.compiler/compile-all (compiler.clj:1653)
shadow.build.compiler/compile-all (compiler.clj:1511)
shadow.build.api/compile-sources (api.clj:261)
shadow.build.api/compile-sources (api.clj:253)
shadow.build/compile (build.clj:522)
shadow.build/compile (build.clj:503)
shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:368)@jrychter it is important that the expected versions match exactly. you with 3.1.1 you need to be on clojurescript 1.12.42. otherwise this exact problems happens, due to there being a closure-compiler and closure-compiler-unshaded on the classpath
and the newer clojurescript uses a shaded closure-compiler version of the protocol buffers which shouldn't conflict with anything?
or does it conflict with something else shaded? i.e. something with jarjar in the classname? shouldn't really happen but who knows. if you look at the dependency graph there should only be a closure-compiler with no extra dependencies. no closure-compiler-unshaded. so technically there should be no protobufs dependency at all coming from cljs/closure
I can't be on clojurescript 1.12.42, at least until I dive in and understand the protobuf problem exactly. It's likely the old library will need to be fixed/updated, which will not happen unless I do it myself. So, assuming I have to stay on ClojureScript 1.12.38, which shadow-cljs version should I stay with?
what is the problem? maybe I can help. 3.0.5 is the version
I will dive in, but I can't do it right now — for now, I'm staying on 3.0.5 in that case.
nothing much changed other than the closure/cljs bump, so you are not missing much yet
I'm still curious to hear about the problem you have. I'm still a bit skeptical about the move to the shaded closure-compiler jar, so would be good to get some data on where it is actually causing issues (if thats the cause)
works fine for me. are you sure you didnt' also change some other dependencies? like guava/datomic/closure-compiler?
I did change some other deps, but none of those. I got the error, flipped back to 38. Perhaps it was a one-off, I’ll flip over to 42 to see if I can reproduce it.
as a general rule I do not recommend upgrading cljs separately, I only test released with the declared cljs release at that time. so no guarantee that any random version switches will work.
just released shadow-cljs 3.0.6 which includes the cljs bump
Ah, OK! That’s good to know, I’ll just remove cljs as a dep then. Thanks!
not that there is anything useful in CLJS itself. the upgraded closure library is nice though, reverts some unnecessary breakage
Depends on which previous version you were on. Mine was 11.something
Although I haven’t checked what’s new in 12
Seeing something similar (I think):
[2025-05-16 11:09:27.664 - WARNING] provide conflict for #{goog.reflect} provided by goog/reflect/reflect.js and {"/lib/reflect.js" #{goog.reflect}}
[:homepage] Compiling ...
Execution error (NoSuchMethodError) at com.google.javascript.jscomp.ShadowAccess/getExternProperties (ShadowAccess.java:32).
'com.google.common.collect.ImmutableSet com.google.javascript.jscomp.AbstractCompiler.getExternProperties()'
Full report at:
/var/folders/l2/4c_1v4jj7kj9sfhwjmplz2s80000gn/T/clojure-9357320417196391944.edndo you use deps.edn/project.clj? if so check your dependency tree if there are any conflicts. also verify you are getting the correct closure compiler and cljs versions
Of course. I will get back to you once I find a moment to dig into this.
I get a similar ^ error when I explicitly put CLJS 1.12.42 in my deps.edn dependencies - the error goes away when I omit the CLJS dependency entry to let shadow-cljs (3.0.6) fetch it transitively.
someone setup a repro. I kinda can't believe that this is the only thing going on 😛
@thheller I am able to reproduce the issue with these steps:
1. Run npx create-uix-app@latest my-app
2. Run cd my-app; npm i; npm run dev to see that the app works
3. Edit deps.edn and package.json to update CLJS (1.12.42) and Shadow-CLJS (3.0.6) versions
4. Run step 2 again to repro
that is rather weird
I don't get it. the only thing different is the classpath order, but I can't figure out why thats a problem. AFAICT there are not conflicting files in those jars
ah found it
I'm hitting this also with something like :
{:deps {thheller/shadow-cljs {:mvn/version "3.0.6"}
org.clojure/clojurescript {:mvn/version "1.12.42"}}}
Even when adding the same clojurescript version shadow depends on.
The difference I'm seeing in both classpaths are the order of these :
$ diff work doesnt.work
3a4
> /home/jmonetta/.m2/repository/org/clojure/clojurescript/1.12.42/clojurescript-1.12.42.jar
13a15,16
> /home/jmonetta/.m2/repository/com/google/javascript/closure-compiler/v20250402/closure-compiler-v20250402.jar
> /home/jmonetta/.m2/repository/org/clojure/google-closure-library/0.0-20250515-f04e4c0e/google-closure-library-0.0-20250515-f04e4c0e.jar
22d24
< /home/jmonetta/.m2/repository/org/clojure/clojurescript/1.12.42/clojurescript-1.12.42.jar
25d26
< /home/jmonetta/.m2/repository/org/clojure/google-closure-library/0.0-20250515-f04e4c0e/google-closure-library-0.0-20250515-f04e4c0e.jar
49d49
< /home/jmonetta/.m2/repository/com/google/javascript/closure-compiler/v20250402/closure-compiler-v20250402.jaryeah I found the problem. see #cljs-dev will fix later
basically both the closure-compiler and closure-compiler-unshaded jars are on the classpath. if the unshaded comes first it works, the shaded first breaks due to using other renamed/shaded classes
should be fine in 3.1.1
works for me now! thanks @thheller!
I found a moment to dig into this. After upgrading thheller/shadow-cljs '3.0.5' to '3.1.4' and org.clojure/clojurescript '1.12.38' to '1.12.42', the error above wasn't there. Instead, I was getting an error about missing classes from the protobuf library. This made sense because the new ClojureScript does not include protobuf as a dependency. I use some other old libraries which do, but I had excluded protobuf from their dependencies because they were pulling in old versions that conflicted with ClojureScript. After adding com.google.protobuf/protobuf-java "4.31.0" as an explicit dependency, everything now compiles without any errors.
I'm using
{:builds
{:app {:dev {:compiler-options
{:reader-features #{:dev-config}}} ...
to include some additonal hiccup in a react component like this:
[:div
#?(:dev-config
[:div
[:pre (util/spprint @!state)]])
[:div ...Works well! However I needed to make my .cljs file into a .cljc to avoid "Conditional read not allowed".
I'm probably mis-using the feature then? What's another way to achieve what I want; to compile some additional stuff on dev-time?
reader conditionals only work in .cljc files, I don't know why but cljs handles it like that and I'm sticking to it. technically custom reader features aren't even allowed and were rejected by core
the good old (when DEBUG ...) pattern works best I guess?
where (goog-define DEBUG false) is used somewhere and can be enabled via :dev {:closure-defines {that.ns/DEBUG true}}
or enabled by default and disabled in :release. your choice
closure :advanced will usually be able to remove such branches entirely
Great, makes sense 👍 I thought it was a Shadow-cljs feature, but now I also get why it's so deeply burried in :compiler-options 😅
it is a shadow-cljs only feature
The :reader-features?
yes
Oh, okay. So then I'm not following > cljs handles it like that and I'm sticking to it
cljs doesn't allow using reader conditionals in .cljs files, I'm following that rule.
adding custom reader-features is not supported at all in regular cljs, even in .cljc files
Ah, okay. Why is it a compiler option then? Isn't that referring to the cljs-compiler, and not shadow-cljs?
well it is still affecting the compiler, so make sense there? technically its just the reader, but oh well its gotta go somewhere
top level in the build config is usually affecting the build as a whole, not just the CLJS->JS compilation
Alright. I was interpreting https://shadow-cljs.github.io/docs/UsersGuide.html#compiler-options as relating exclusively to https://clojurescript.org/reference/compiler-options, but I see that's not really the case now.
yeah, it is mostly correct just not exclusively