swannodette / mies

Minimal ClojureScript project template
Eclipse Public License 1.0
369 stars 49 forks source link

Circular namespace dependency issues with clojurescript/1.9.52 #47

Closed iku000888 closed 7 years ago

iku000888 commented 7 years ago

The compiler says cljs.core -> clojure.browser.repl -> cljs.repl -> cljs.spec -> cljs.core

Stack trace ```bash ikuchan-CFSZ5-2% scripts/build Retrieving lein-npm/lein-npm/0.6.2/lein-npm-0.6.2.pom from clojars Retrieving lein-npm/lein-npm/0.6.2/lein-npm-0.6.2.jar from clojars Retrieving org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.pom from central Retrieving org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar from central Building ... Copying jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/clojure/browser/event.cljs to out/clojure/browser/event.cljs Analyzing jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/clojure/browser/repl.cljs Analyzing jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/clojure/browser/net.cljs Analyzing jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/clojure/browser/event.cljs Analyzing jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/cljs/repl.cljs Analyzing jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/cljs/spec.cljs Analyzing file:/home/ikuchan/work/pc-auto-save/cljs/src/cljs/core.cljs Analyzing jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/clojure/browser/repl.cljs Analyzing jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/cljs/repl.cljs Analyzing jar:file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/cljs/spec.cljs Exception in thread "main" clojure.lang.ExceptionInfo: failed compiling file:out/clojure/browser/event.cljs {:file #object[java.io.File 0x707b38a1 "out/clojure/browser/event.cljs"]}, compiling:(/home/ikuchan/work/pc-auto-save/cljs/scripts/build.clj:5:1) at clojure.lang.Compiler.load(Compiler.java:7391) at clojure.lang.Compiler.loadFile(Compiler.java:7317) at clojure.main$load_script.invokeStatic(main.clj:275) at clojure.main$script_opt.invokeStatic(main.clj:335) at clojure.main$script_opt.invoke(main.clj:330) at clojure.main$main.invokeStatic(main.clj:421) at clojure.main$main.doInvoke(main.clj:384) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.lang.Var.invoke(Var.java:379) at clojure.lang.AFn.applyToHelper(AFn.java:154) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207) at user$eval5.invokeStatic(form-init8963923405122024996.clj:1) at user$eval5.invoke(form-init8963923405122024996.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6927) at clojure.lang.Compiler.eval(Compiler.java:6917) at clojure.lang.Compiler.load(Compiler.java:7379) at clojure.lang.Compiler.loadFile(Compiler.java:7317) at clojure.main$load_script.invokeStatic(main.clj:275) at clojure.main$init_opt.invokeStatic(main.clj:277) at clojure.main$init_opt.invoke(main.clj:277) at clojure.main$initialize.invokeStatic(main.clj:308) at clojure.main$null_opt.invokeStatic(main.clj:342) at clojure.main$null_opt.invoke(main.clj:339) at clojure.main$main.invokeStatic(main.clj:421) at clojure.main$main.doInvoke(main.clj:384) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) Caused by: clojure.lang.ExceptionInfo: failed compiling file:out/clojure/browser/event.cljs {:file #object[java.io.File 0x707b38a1 "out/clojure/browser/event.cljs"]} at clojure.core$ex_info.invokeStatic(core.clj:4617) at clojure.core$ex_info.invoke(core.clj:4617) at cljs.compiler$compile_file$fn__3731.invoke(compiler.cljc:1443) at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1408) at cljs.compiler$compile_file.invoke(compiler.cljc:1384) at cljs.closure$compile_file.invokeStatic(closure.clj:488) at cljs.closure$compile_file.invoke(closure.clj:479) at cljs.closure$eval5521$fn__5522.invoke(closure.clj:557) at cljs.closure$eval5457$fn__5458$G__5446__5465.invoke(closure.clj:441) at cljs.closure$compile_from_jar.invokeStatic(closure.clj:539) at cljs.closure$compile_from_jar.invoke(closure.clj:527) at cljs.closure$eval5527$fn__5528.invoke(closure.clj:567) at cljs.closure$eval5457$fn__5458$G__5446__5465.invoke(closure.clj:441) at cljs.closure$compile_sources$iter__5657__5661$fn__5662.invoke(closure.clj:905) at clojure.lang.LazySeq.sval(LazySeq.java:40) at clojure.lang.LazySeq.seq(LazySeq.java:49) at clojure.lang.RT.seq(RT.java:521) at clojure.core$seq__4357.invokeStatic(core.clj:137) at clojure.core$dorun.invokeStatic(core.clj:3024) at clojure.core$doall.invokeStatic(core.clj:3039) at clojure.core$doall.invoke(core.clj:3039) at cljs.closure$compile_sources.invokeStatic(closure.clj:899) at cljs.closure$compile_sources.invoke(closure.clj:888) at cljs.closure$build.invokeStatic(closure.clj:2281) at cljs.closure$build.invoke(closure.clj:2213) at cljs.build.api$build.invokeStatic(api.clj:202) at cljs.build.api$build.invoke(api.clj:189) at cljs.build.api$build.invokeStatic(api.clj:192) at cljs.build.api$build.invoke(api.clj:189) at user$eval6347.invokeStatic(build.clj:6) at user$eval6347.invoke(build.clj:5) at clojure.lang.Compiler.eval(Compiler.java:6927) at clojure.lang.Compiler.load(Compiler.java:7379) ... 42 more Caused by: clojure.lang.ExceptionInfo: Assert failed: Circular dependency detected, cljs.core -> clojure.browser.repl -> cljs.repl -> cljs.spec -> cljs.core (every? (fn* [p1__2074#] (not (contains? *cljs-dep-set* p1__2074#))) deps) in file file:/home/ikuchan/.m2/repository/org/clojure/clojurescript/1.9.521/clojurescript-1.9.521.jar!/cljs/spec.cljs {:tag :cljs/analysis-error} at clojure.core$ex_info.invokeStatic(core.clj:4617) at clojure.core$ex_info.invoke(core.clj:4617) at cljs.analyzer$error.invokeStatic(analyzer.cljc:645) at cljs.analyzer$error.invoke(analyzer.cljc:641) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3240) at cljs.analyzer$analyze.invoke(analyzer.cljc:3226) at cljs.analyzer$analyze_file$fn__2701.invoke(analyzer.cljc:3572) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3567) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3540) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1892) at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1870) at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:3132) at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:3127) at cljs.analyzer$analyze_STAR_$fn__2641.invoke(analyzer.cljc:3224) at clojure.lang.PersistentVector.reduce(PersistentVector.java:341) at clojure.core$reduce.invokeStatic(core.clj:6544) at clojure.core$reduce.invoke(core.clj:6527) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3224) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3214) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3242) at cljs.analyzer$analyze.invoke(analyzer.cljc:3226) at cljs.analyzer$analyze_file$fn__2701.invoke(analyzer.cljc:3572) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3567) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3540) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1892) at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1870) at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:3132) at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:3127) at cljs.analyzer$analyze_STAR_$fn__2641.invoke(analyzer.cljc:3224) at clojure.lang.PersistentVector.reduce(PersistentVector.java:341) at clojure.core$reduce.invokeStatic(core.clj:6544) at clojure.core$reduce.invoke(core.clj:6527) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3224) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3214) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3242) at cljs.analyzer$analyze.invoke(analyzer.cljc:3226) at cljs.analyzer$analyze_file$fn__2701.invoke(analyzer.cljc:3572) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3567) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3540) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1892) at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1870) at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:3132) at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:3127) at cljs.analyzer$analyze_STAR_$fn__2641.invoke(analyzer.cljc:3224) at clojure.lang.PersistentVector.reduce(PersistentVector.java:341) at clojure.core$reduce.invokeStatic(core.clj:6544) at clojure.core$reduce.invoke(core.clj:6527) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3224) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3214) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3242) at cljs.analyzer$analyze.invoke(analyzer.cljc:3226) at cljs.analyzer$analyze_file$fn__2701.invoke(analyzer.cljc:3572) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3567) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3609) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:3540) at cljs.analyzer$analyze_file.invoke(analyzer.cljc:3526) at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1177) at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1167) at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1342) at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1335) at cljs.compiler$compile_file$fn__3731.invoke(compiler.cljc:1431) ... 72 more Caused by: java.lang.AssertionError: Assert failed: Circular dependency detected, cljs.core -> clojure.browser.repl -> cljs.repl -> cljs.spec -> cljs.core (every? (fn* [p1__2074#] (not (contains? *cljs-dep-set* p1__2074#))) deps) at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1881) at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1870) at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:3132) at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:3127) at cljs.analyzer$analyze_STAR_$fn__2641.invoke(analyzer.cljc:3224) at clojure.lang.PersistentVector.reduce(PersistentVector.java:341) at clojure.core$reduce.invokeStatic(core.clj:6544) at clojure.core$reduce.invoke(core.clj:6527) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3224) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3214) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3242) ... 136 more ```
mneise commented 7 years ago

@iku000888 Wasn't able to reproduce this yet. Could you share the steps to reproduce this error?

iku000888 commented 7 years ago

Thanks for spending time on this + sorry for the lack of detail.

Exact steps were:

  1. lein new mies something
  2. cd something
  3. scripts/build

Which gave the error, and I worked around it by commenting out the :require to the repl namespace.

However I tried it on a different machine just right now and all scripts compile happily :confused: Will try it again on the same machine and report the findings.

mneise commented 7 years ago

Thank you for the steps to reproduce. Which OS where you using when you experienced the error?

iku000888 commented 7 years ago

Sorry it took time to get back! The machine that ran into this issue was ubuntu 16.04.

I gave it a couple more spins of the steps on it, but not able to reproduce.

mneise commented 7 years ago

Closing this for now since we both can't reproduce it. Let me know if you run into this problem again.

iku000888 commented 7 years ago

:+1: