Hi!
Clojure(script) newbie here, trying to migrate a lein+figwheel project to a lein+shadow-cljs one. I’m in the process of the debugging the thousands of errors that I’m getting, but I’m interested in fixing why the command lein shadow release app
is raising an exception that I don’t have a clue what it could be about. This is the error:
. . .
-> build target: :browser stage: :compile-finish
-> Checking used npm package versions
<- Checking used npm package versions (19 ms)
<- build target: :browser stage: :compile-finish (25 ms)
-> build target: :browser stage: :optimize-prepare
<- build target: :browser stage: :optimize-prepare (0 ms)
-> Closure - Optimizing ...
IllegalStateException: DecomposeExpression depth exceeded on:
CALL 317 [length: 35378] [free_call: 1] [source_file: my-company/commons/props_from_fn.cljc]
NAME my-company$commons$props_from_fn$question_STAR_ 317 [length: 35378] [source_file: my-company/commons/props_from_fn.cljc]
NAME question$jscomp$27 317 [length: 35378] [source_file: my-company/commons/props_from_fn.cljc]
NAME s_id$jscomp$28 317 [length: 35378] [source_file: my-company/commons/props_from_fn.cljc]
NAME answers$jscomp$inline_2838 317 [length: 35378] [source_file: my-company/commons/props_from_fn.cljc]
com.google.javascript.jscomp.ExpressionDecomposer.maybeExposeExpression (ExpressionDecomposer.java:114)
com.google.javascript.jscomp.FunctionInjector$CallSiteType$6.prepare (FunctionInjector.java:520)
com.google.javascript.jscomp.FunctionInjector.maybePrepareCall (FunctionInjector.java:593)
com.google.javascript.jscomp.InlineFunctions.decomposeExpressions (InlineFunctions.java:794)
com.google.javascript.jscomp.InlineFunctions.process (InlineFunctions.java:152)
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.performOptimizations (Compiler.java:2417)
com.google.javascript.jscomp.Compiler.lambda$stage2Passes$1 (Compiler.java:802)
com.google.javascript.jscomp.CompilerExecutor.runInCompilerThread (CompilerExecutor.java:129)
com.google.javascript.jscomp.Compiler.runInCompilerThread (Compiler.java:829)
com.google.javascript.jscomp.Compiler.stage2Passes (Compiler.java:799)
com.google.javascript.jscomp.Compiler.compileModules (Compiler.java:744)
sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke (Method.java:498)
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:167)
clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:102)
shadow.build.closure/compile-js-modules (closure.clj:1038)
shadow.build.closure/compile-js-modules (closure.clj:1027)
. . .
What could be wrong with the file my-company/commons/props_from_fn.cljc
? What is the error about? Any way to fix it?
Thank you very much for your help