This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-14
Channels
- # announcements (2)
- # aws (1)
- # babashka (18)
- # babashka-sci-dev (103)
- # beginners (165)
- # calva (51)
- # cider (8)
- # circleci (1)
- # clj-kondo (22)
- # clj-on-windows (2)
- # cljdoc (1)
- # cljfx (31)
- # cljs-dev (16)
- # clojure (81)
- # clojure-europe (71)
- # clojure-nl (7)
- # clojure-uk (11)
- # clojurescript (20)
- # code-reviews (26)
- # conjure (1)
- # contributions-welcome (1)
- # core-async (15)
- # cursive (8)
- # datomic (8)
- # defnpodcast (2)
- # eastwood (24)
- # emacs (10)
- # events (1)
- # fulcro (4)
- # funcool (31)
- # graalvm (43)
- # graphql (8)
- # honeysql (9)
- # introduce-yourself (1)
- # jobs (12)
- # kaocha (3)
- # lsp (28)
- # malli (4)
- # meander (4)
- # membrane (7)
- # off-topic (64)
- # other-languages (3)
- # pedestal (1)
- # polylith (31)
- # portal (5)
- # re-frame (4)
- # reitit (1)
- # releases (5)
- # rum (2)
- # schema (2)
- # sci (34)
- # shadow-cljs (21)
- # vscode (1)
Hi. I created a minimal shadow project configured with :external
JS provider and configured Webpack for the final bundle phase. I have one dependency that relies on React and ReactDOM (both v16.x) among others. However, when I release the build with shadow-cljs, I get the following warning:
> shadow-cljs release web
(...)
[:web] Compiling ...
------ WARNING #1 - -----------------------------------------------------------
Resource: shadow.js.shim.module$react_dom.js:3:34
variable shadow$bridge is undeclared
--------------------------------------------------------------------------------
nil
[:web] Build completed. (...)
Am I missing something in this configuration? I'm using shadow-cljs v2.16.12.
You can get more details from this Github issue: https://github.com/thheller/shadow-cljs/issues/978
Looking up in this channel, I found someone that got the same warning https://clojurians.slack.com/archives/C6N245JGG/p1632299596117200, but I couldn't find any more references on this matter.
Thanks for your time reading this report.is there a way to tell the shadow-cljs
cli to write the output of shadow-cljs pom
to a different file than pom.xml
?
@restenb there is not no. if you already have a pom.xml it is likely you shouldn't be calling that task?
i have a leiningen project.clj backend with shadow-cljs.end used for frontend deps only. it was added late in the project to get node support
but the pipeline generates with lein pom and uses that for certain things. so it'd be nice to output the shadow deps somewhere else
I don't understand the problem then? neither project.clj nor shadow-cljs.edn use pom.xml for anything?
the build pipeline does, so pom.xml gets overwritten there since both shadow-cljs pom and lein pom have to be run. it's not a huge problem, just curious
where does shadow-cljs get the artifactId
and groupId
it generates from? right now it's groupId=artifactId=directoryName it seems? can this be changed?
yep, hardcoded to path it seems. https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/npm/cli.cljs#L658
Hello everyone, did anyone see the same error in advanced compilation?
NullPointerException: NAME module$contents$goog$testing$storage$FakeMechanism_FakeMechanism 94:10 [length: 13] [source_file: goog/testing/storage/fakemechanism.js] [original_name: FakeMechanism]
Shadow-cljs version 2.16.12
NullPointerException: NAME module$contents$goog$testing$storage$FakeMechanism_FakeMechanism 94:10 [length: 13] [source_file: goog/testing/storage/fakemechanism.js] [original_name: FakeMechanism]
com.google.common.base.Preconditions.checkNotNull (Preconditions.java:897)
com.google.javascript.jscomp.RemoveUnusedCode.getVarForNameNode (RemoveUnusedCode.java:895)
com.google.javascript.jscomp.RemoveUnusedCode.traverseNameNode (RemoveUnusedCode.java:751)
com.google.javascript.jscomp.RemoveUnusedCode.traverseNode (RemoveUnusedCode.java:571)
com.google.javascript.jscomp.RemoveUnusedCode.traverseChildren (RemoveUnusedCode.java:1305)
com.google.javascript.jscomp.RemoveUnusedCode.traverseNode (RemoveUnusedCode.java:581)
com.google.javascript.jscomp.RemoveUnusedCode.access$1200 (RemoveUnusedCode.java:83)
com.google.javascript.jscomp.RemoveUnusedCode$Continuation.apply (RemoveUnusedCode.java:1829)
com.google.javascript.jscomp.RemoveUnusedCode.traverseAndRemoveUnusedReferences (RemoveUnusedCode.java:412)
com.google.javascript.jscomp.RemoveUnusedCode.process (RemoveUnusedCode.java:386)
com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process (PhaseOptimizer.java:317)
com.google.javascript.jscomp.PhaseOptimizer$Loop.process (PhaseOptimizer.java:462)
com.google.javascript.jscomp.PhaseOptimizer.process (PhaseOptimizer.java:232)
com.google.javascript.jscomp.Compiler.performTranspilationAndOptimizations (Compiler.java:2592)
com.google.javascript.jscomp.Compiler.lambda$stage2Passes$8 (Compiler.java:966)
com.google.javascript.jscomp.CompilerExecutor.runInCompilerThread (CompilerExecutor.java:127)
com.google.javascript.jscomp.Compiler.runInCompilerThread (Compiler.java:1014)
com.google.javascript.jscomp.Compiler.stage2Passes (Compiler.java:963)
com.google.javascript.jscomp.Compiler.compileModules (Compiler.java:905)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke (Method.java:564)
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:167)
clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:102)
shadow.build.closure/compile-js-modules (closure.clj:1102)
shadow.build.closure/compile-js-modules (closure.clj:1088)
shadow.build.closure/optimize/fn--12464 (closure.clj:1297)
shadow.build.closure/optimize (closure.clj:1283)
shadow.build.closure/optimize (closure.clj:1274)
shadow.build.api/optimize (api.clj:273)
shadow.build.api/optimize (api.clj:267)
shadow.build/optimize (build.clj:476)
shadow.build/optimize (build.clj:468)
shadow.cljs.devtools.api/release* (api.clj:339)
shadow.cljs.devtools.api/release* (api.clj:324)
shadow.cljs.devtools.cli-actual/do-build-command (cli_actual.clj:28)
shadow.cljs.devtools.cli-actual/do-build-command (cli_actual.clj:25)
shadow.cljs.devtools.cli-actual/do-build-commands (cli_actual.clj:49)
shadow.cljs.devtools.cli-actual/do-build-commands (cli_actual.clj:38)
shadow.cljs.devtools.cli-actual/main/body-fn--17177--auto----17893 (cli_actual.clj:166)
shadow.cljs.devtools.cli-actual/main (cli_actual.clj:165)
shadow.cljs.devtools.cli-actual/main (cli_actual.clj:132)
clojure.core/apply (core.clj:671)
clojure.core/apply (core.clj:662)
shadow.cljs.devtools.cli-actual/-main (cli_actual.clj:219)
shadow.cljs.devtools.cli-actual/-main (cli_actual.clj:217)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core/apply (core.clj:667)
clojure.core/apply (core.clj:662)
shadow.cljs.devtools.cli/-main (cli.clj:75)
shadow.cljs.devtools.cli/-main (cli.clj:67)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core/apply (core.clj:667)
clojure.main/main-opt (main.clj:514)ยง
clojure.main/main-opt (main.clj:510)
clojure.main/main (main.clj:664)
clojure.main/main (main.clj:616)
clojure.lang.Var.applyTo (Var.java:705)
clojure.main.main (main.java:40)
@neo2551 are you sure you are on 2.16.12? I have seen this stacktrace before but that was fixed a while ago? might be something unrelated of course, just checking
Yes I am sure. I can just try again. I used 2.15.2 and it was working.
well that bump would include a closure compiler version bump. it had a bunch of other issues so no surprise there
It magically works now ๐
Yep, it works now ๐ I am sorry, for the disturbance...
it might be an issue with incremental compilation. there have been a few of those. if it happens again try wiping .shadow-cljs/builds/<your-build-id>
and recompile. please let me know if that fixes it
Thanks!