Fork me on GitHub
#figwheel-main
<
2020-11-29
>
leif20:11:35

Does anyone have any idea why I'd be getting a circular deps error on my second build? (The first one is fine).

[12:47 AM] leif@FEM ~/src/interactive-syntax (main*) $ clojure -A:package
2020-11-29 00:36:21.164:INFO::main: Logging initialized @3122ms to org.eclipse.jetty.util.log.StdErrLog
[Figwheel] Compiling build prod to "target/public/cljs-out/prod/main.js"
Nov 29, 2020 12:36:58 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /home/leif/src/interactive-syntax/target/public/cljs-out/prod/cljs/compiler.js:860: WARNING - [JSC_REGEXP_REFERENCE] References to the global RegExp object prevents optimization of regular expressions.
cljs.compiler.emit_constant_STAR_.cljs$core$IMultiFn$_add_method$arity$3(null,RegExp,(function (x){
                                                                              ^^^^^^

Nov 29, 2020 12:36:58 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /home/leif/src/interactive-syntax/target/public/cljs-out/prod/interactive_syntax/core.js:47: WARNING - [JSC_PARTIAL_NAMESPACE] Partial alias created for namespace cljs, possibly due to await/yield transpilation.
This may prevent optimization of anything nested under this namespace.
See  for more details.
(runner.g = ({"cljs": cljs}));
                      ^^^^

Nov 29, 2020 12:36:58 AM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 0 error(s), 2 warning(s)
[Figwheel] Successfully compiled build prod to "target/public/cljs-out/prod/main.js" in 35.165 seconds.
[Figwheel] Bundling: npx webpack --mode=production src/js/bundle.js ./target/public/cljs-out/prod/main.js --output-path ./target/public/cljs-out/prod --output-filename main_bundle.js
leif@FEM ~/src/interactive-syntax (main*) $ clojure -A:package
2020-11-29 00:41:26.361:INFO::main: Logging initialized @3092ms to org.eclipse.jetty.util.log.StdErrLog
[Figwheel] Compiling build prod to "target/public/cljs-out/prod/main.js"
[Figwheel] Failed to compile build prod in 10.046 seconds.
[Figwheel:WARNING] Could not Analyze: Assert failed: Circular dependency detected, cljs.core -> cljs.core
(every? (fn* [p1__2127#] (not (contains? *cljs-dep-set* p1__2127#))) deps)  target/public/cljs-out/prod/cljs/core.cljc   
[Figwheel:SEVERE] failed compiling file:target/public/cljs-out/prod/cljs/core.cljc
Unexpected error (AssertionError) compiling at (REPL:1).
Assert failed: Circular dependency detected, cljs.core -> cljs.core
(every? (fn* [p1__2127#] (not (contains? *cljs-dep-set* p1__2127#))) deps)

Full report at:
/tmp/clojure-5618560910518765653.edn
The command I'm running is `clojure -m figwheel.main --build-once --prod` With the following deps:
{:deps {org.clojure/core.match {:mvn/version "1.0.0"}
        org.clojure/tools.reader {:mvn/version "1.3.3"}
        reagent {:mvn/version "0.10.0" :exclusions [cljsjs/react cljsjs/react-dom]}
        alandipert/storage-atom {:mvn/version "1.2.4"}
        com.bhauman/figwheel-main {:mvn/version "0.2.12"}
        com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
 :paths ["src" "target" "resources" "env/dev/cljs" "env/prod/cljs"]}}

leif20:11:16

@p-himik Was suggesting its because "target" is in the classpath, but it looks like figwheel-main puts it in there even if you don't have it.