Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" clojure.lang.ExceptionInfo #1

Closed
leontalbot opened this issue Oct 14, 2017 · 7 comments
Closed

Exception in thread "main" clojure.lang.ExceptionInfo #1

leontalbot opened this issue Oct 14, 2017 · 7 comments

Comments

@leontalbot
Copy link

leontalbot commented Oct 14, 2017

Hello! Just cloned your project and got the following when running lein figwheel dev:

Exception in thread "main" clojure.lang.ExceptionInfo: Call to clojure.core/refer-clojure did not conform to spec:
In: [2 1] val: :as fails at: [:args :exclude :op :quoted-spec :spec] predicate: #{:exclude}
In: [2 1] val: :as fails at: [:args :only :op :quoted-spec :spec] predicate: #{:only}
In: [2 1] val: :as fails at: [:args :rename :op :quoted-spec :spec] predicate: #{:rename}
In: [2] val: (quote :as) fails at: [:args :exclude :op :spec] predicate: #{:exclude}
In: [2] val: (quote :as) fails at: [:args :only :op :spec] predicate: #{:only}
In: [2] val: (quote :as) fails at: [:args :rename :op :spec] predicate: #{:rename}
#:clojure.spec.alpha{:problems ({:path [:args :exclude :op :spec], :pred #{:exclude}, :val (quote :as), :via [], :in [2]} {:path [:args :exclude :op :quoted-spec :spec], :pred #{:exclude}, :val :as, :via [], :in [2 1]} {:path [:args :only :op :spec], :pred #{:only}, :val (quote :as), :via [], :in [2]} {:path [:args :only :op :quoted-spec :spec], :pred #{:only}, :val :as, :via [], :in [2 1]} {:path [:args :rename :op :spec], :pred #{:rename}, :val (quote :as), :via [], :in [2]} {:path [:args :rename :op :quoted-spec :spec], :pred #{:rename}, :val :as, :via [], :in [2 1]}), :spec #object[clojure.spec.alpha$regex_spec_impl$reify__1188 0x88432f5 "clojure.spec.alpha$regex_spec_impl$reify__1188@88432f5"], :value ((quote :exclude) (quote [reduce into merge map take partition partition-by bounded-count]) (quote :as) (quote core)), :args ((quote :exclude) (quote [reduce into merge map take partition partition-by bounded-count]) (quote :as) (quote core))}, compiling:(clojure/core/async.clj:9:1)
   at clojure.lang.Compiler.checkSpecs(Compiler.java:6891)
   at clojure.lang.Compiler.macroexpand1(Compiler.java:6907)
   at clojure.lang.Compiler.analyzeSeq(Compiler.java:6989)
   at clojure.lang.Compiler.analyze(Compiler.java:6773)
   at clojure.lang.Compiler.analyze(Compiler.java:6729)
   at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
   at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2307)
   at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
   at clojure.lang.Compiler.analyze(Compiler.java:6773)
   at clojure.lang.Compiler.analyze(Compiler.java:6729)
   at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
   at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
   at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
   at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
   at clojure.lang.Compiler.analyze(Compiler.java:6773)
   at clojure.lang.Compiler.analyzeSeq(Compiler.java:6991)
   at clojure.lang.Compiler.analyze(Compiler.java:6773)
   at clojure.lang.Compiler.analyze(Compiler.java:6729)
   at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3813)
   at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
   at clojure.lang.Compiler.analyze(Compiler.java:6773)
   at clojure.lang.Compiler.analyze(Compiler.java:6729)
   at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
   at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
   at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
   at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
   at clojure.lang.Compiler.analyze(Compiler.java:6773)
   at clojure.lang.Compiler.eval(Compiler.java:7059)
   at clojure.lang.Compiler.eval(Compiler.java:7051)
   at clojure.lang.Compiler.load(Compiler.java:7514)
   at clojure.lang.RT.loadResourceScript(RT.java:379)
   at clojure.lang.RT.loadResourceScript(RT.java:370)
   at clojure.lang.RT.load(RT.java:460)
   at clojure.lang.RT.load(RT.java:426)
   at clojure.core$load$fn__6550.invoke(core.clj:6051)
   at clojure.core$load.invokeStatic(core.clj:6050)
   at clojure.core$load.doInvoke(core.clj:6034)
   at clojure.lang.RestFn.invoke(RestFn.java:408)
   at clojure.core$load_one.invokeStatic(core.clj:5853)
   at clojure.core$load_one.invoke(core.clj:5848)
   at clojure.core$load_lib$fn__6495.invoke(core.clj:5893)
   at clojure.core$load_lib.invokeStatic(core.clj:5892)
   at clojure.core$load_lib.doInvoke(core.clj:5873)
   at clojure.lang.RestFn.applyTo(RestFn.java:142)
   at clojure.core$apply.invokeStatic(core.clj:659)
   at clojure.core$load_libs.invokeStatic(core.clj:5930)
   at clojure.core$load_libs.doInvoke(core.clj:5914)
   at clojure.lang.RestFn.applyTo(RestFn.java:137)
   at clojure.core$apply.invokeStatic(core.clj:659)
   at clojure.core$require.invokeStatic(core.clj:5952)
   at clojure.core$require.doInvoke(core.clj:5952)
   at clojure.lang.RestFn.invoke(RestFn.java:1523)
   at figwheel_sidecar.repl$eval12378$loading__6436__auto____12379.invoke(repl.clj:1)
   at figwheel_sidecar.repl$eval12378.invokeStatic(repl.clj:1)
   at figwheel_sidecar.repl$eval12378.invoke(repl.clj:1)
   at clojure.lang.Compiler.eval(Compiler.java:7062)
   at clojure.lang.Compiler.eval(Compiler.java:7051)
   at clojure.lang.Compiler.load(Compiler.java:7514)
   at clojure.lang.RT.loadResourceScript(RT.java:379)
   at clojure.lang.RT.loadResourceScript(RT.java:370)
   at clojure.lang.RT.load(RT.java:460)
   at clojure.lang.RT.load(RT.java:426)
   at clojure.core$load$fn__6550.invoke(core.clj:6051)
   at clojure.core$load.invokeStatic(core.clj:6050)
   at clojure.core$load.doInvoke(core.clj:6034)
   at clojure.lang.RestFn.invoke(RestFn.java:408)
   at clojure.core$load_one.invokeStatic(core.clj:5853)
   at clojure.core$load_one.invoke(core.clj:5848)
   at clojure.core$load_lib$fn__6495.invoke(core.clj:5893)
   at clojure.core$load_lib.invokeStatic(core.clj:5892)
   at clojure.core$load_lib.doInvoke(core.clj:5873)
   at clojure.lang.RestFn.applyTo(RestFn.java:142)
   at clojure.core$apply.invokeStatic(core.clj:659)
   at clojure.core$load_libs.invokeStatic(core.clj:5930)
   at clojure.core$load_libs.doInvoke(core.clj:5914)
   at clojure.lang.RestFn.applyTo(RestFn.java:137)
   at clojure.core$apply.invokeStatic(core.clj:659)
   at clojure.core$require.invokeStatic(core.clj:5952)
   at clojure.core$require.doInvoke(core.clj:5952)
   at clojure.lang.RestFn.invoke(RestFn.java:1789)
   at figwheel_sidecar.system$eval12372$loading__6436__auto____12373.invoke(system.clj:1)
   at figwheel_sidecar.system$eval12372.invokeStatic(system.clj:1)
   at figwheel_sidecar.system$eval12372.invoke(system.clj:1)
   at clojure.lang.Compiler.eval(Compiler.java:7062)
   at clojure.lang.Compiler.eval(Compiler.java:7051)
   at clojure.lang.Compiler.load(Compiler.java:7514)
   at clojure.lang.RT.loadResourceScript(RT.java:379)
   at clojure.lang.RT.loadResourceScript(RT.java:370)
   at clojure.lang.RT.load(RT.java:460)
   at clojure.lang.RT.load(RT.java:426)
   at clojure.core$load$fn__6550.invoke(core.clj:6051)
   at clojure.core$load.invokeStatic(core.clj:6050)
   at clojure.core$load.doInvoke(core.clj:6034)
   at clojure.lang.RestFn.invoke(RestFn.java:408)
   at clojure.core$load_one.invokeStatic(core.clj:5853)
   at clojure.core$load_one.invoke(core.clj:5848)
   at clojure.core$load_lib$fn__6495.invoke(core.clj:5893)
   at clojure.core$load_lib.invokeStatic(core.clj:5892)
   at clojure.core$load_lib.doInvoke(core.clj:5873)
   at clojure.lang.RestFn.applyTo(RestFn.java:142)
   at clojure.core$apply.invokeStatic(core.clj:659)
   at clojure.core$load_libs.invokeStatic(core.clj:5930)
   at clojure.core$load_libs.doInvoke(core.clj:5914)
   at clojure.lang.RestFn.applyTo(RestFn.java:137)
   at clojure.core$apply.invokeStatic(core.clj:659)
   at clojure.core$require.invokeStatic(core.clj:5952)
   at clojure.core$require.doInvoke(core.clj:5952)
   at clojure.lang.RestFn.invoke(RestFn.java:930)
   at figwheel_sidecar.repl_api$eval153$loading__6436__auto____154.invoke(repl_api.clj:1)
   at figwheel_sidecar.repl_api$eval153.invokeStatic(repl_api.clj:1)
   at figwheel_sidecar.repl_api$eval153.invoke(repl_api.clj:1)
   at clojure.lang.Compiler.eval(Compiler.java:7062)
   at clojure.lang.Compiler.eval(Compiler.java:7051)
   at clojure.lang.Compiler.load(Compiler.java:7514)
   at clojure.lang.RT.loadResourceScript(RT.java:379)
   at clojure.lang.RT.loadResourceScript(RT.java:370)
   at clojure.lang.RT.load(RT.java:460)
   at clojure.lang.RT.load(RT.java:426)
   at clojure.core$load$fn__6550.invoke(core.clj:6051)
   at clojure.core$load.invokeStatic(core.clj:6050)
   at clojure.core$load.doInvoke(core.clj:6034)
   at clojure.lang.RestFn.invoke(RestFn.java:408)
   at clojure.core$load_one.invokeStatic(core.clj:5853)
   at clojure.core$load_one.invoke(core.clj:5848)
   at clojure.core$load_lib$fn__6495.invoke(core.clj:5893)
   at clojure.core$load_lib.invokeStatic(core.clj:5892)
   at clojure.core$load_lib.doInvoke(core.clj:5873)
   at clojure.lang.RestFn.applyTo(RestFn.java:142)
   at clojure.core$apply.invokeStatic(core.clj:659)
   at clojure.core$load_libs.invokeStatic(core.clj:5930)
   at clojure.core$load_libs.doInvoke(core.clj:5914)
   at clojure.lang.RestFn.applyTo(RestFn.java:137)
   at clojure.core$apply.invokeStatic(core.clj:659)
   at clojure.core$require.invokeStatic(core.clj:5952)
   at clojure.core$require.doInvoke(core.clj:5952)
   at clojure.lang.RestFn.invoke(RestFn.java:408)
   at user$eval15.invokeStatic(form-init5675601870069526516.clj:1)
   at user$eval15.invoke(form-init5675601870069526516.clj:1)
   at clojure.lang.Compiler.eval(Compiler.java:7062)
   at clojure.lang.Compiler.eval(Compiler.java:7051)
   at clojure.lang.Compiler.load(Compiler.java:7514)
   at clojure.lang.Compiler.loadFile(Compiler.java:7452)
   at clojure.main$load_script.invokeStatic(main.clj:278)
   at clojure.main$init_opt.invokeStatic(main.clj:280)
   at clojure.main$init_opt.invoke(main.clj:280)
   at clojure.main$initialize.invokeStatic(main.clj:311)
   at clojure.main$null_opt.invokeStatic(main.clj:345)
   at clojure.main$null_opt.invoke(main.clj:342)
   at clojure.main$main.invokeStatic(main.clj:424)
   at clojure.main$main.doInvoke(main.clj:387)
   at clojure.lang.RestFn.applyTo(RestFn.java:137)
   at clojure.lang.Var.applyTo(Var.java:702)
   at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: Call to clojure.core/refer-clojure did not conform to spec:
In: [2 1] val: :as fails at: [:args :exclude :op :quoted-spec :spec] predicate: #{:exclude}
In: [2 1] val: :as fails at: [:args :only :op :quoted-spec :spec] predicate: #{:only}
In: [2 1] val: :as fails at: [:args :rename :op :quoted-spec :spec] predicate: #{:rename}
In: [2] val: (quote :as) fails at: [:args :exclude :op :spec] predicate: #{:exclude}
In: [2] val: (quote :as) fails at: [:args :only :op :spec] predicate: #{:only}
In: [2] val: (quote :as) fails at: [:args :rename :op :spec] predicate: #{:rename}
{:clojure.spec.alpha/problems ({:path [:args :exclude :op :spec], :pred #{:exclude}, :val (quote :as), :via [], :in [2]} {:path [:args :exclude :op :quoted-spec :spec], :pred #{:exclude}, :val :as, :via [], :in [2 1]} {:path [:args :only :op :spec], :pred #{:only}, :val (quote :as), :via [], :in [2]} {:path [:args :only :op :quoted-spec :spec], :pred #{:only}, :val :as, :via [], :in [2 1]} {:path [:args :rename :op :spec], :pred #{:rename}, :val (quote :as), :via [], :in [2]} {:path [:args :rename :op :quoted-spec :spec], :pred #{:rename}, :val :as, :via [], :in [2 1]}), :clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__1188 0x88432f5 "clojure.spec.alpha$regex_spec_impl$reify__1188@88432f5"], :clojure.spec.alpha/value ((quote :exclude) (quote [reduce into merge map take partition partition-by bounded-count]) (quote :as) (quote core)), :clojure.spec.alpha/args ((quote :exclude) (quote [reduce into merge map take partition partition-by bounded-count]) (quote :as) (quote core))}
   at clojure.core$ex_info.invokeStatic(core.clj:4744)
   at clojure.core$ex_info.invoke(core.clj:4744)
   at clojure.spec.alpha$macroexpand_check.invokeStatic(alpha.clj:689)
   at clojure.spec.alpha$macroexpand_check.invoke(alpha.clj:681)
   at clojure.lang.AFn.applyToHelper(AFn.java:156)
   at clojure.lang.AFn.applyTo(AFn.java:144)
   at clojure.lang.Var.applyTo(Var.java:702)
   at clojure.lang.Compiler.checkSpecs(Compiler.java:6889)
   ... 152 more
Subprocess failed

Any ideas?

Thanks!

@deg
Copy link
Owner

deg commented Oct 14, 2017

Hmm, that's new to me. But, I just tested and I can duplicate your crash, running lein figwheel dev from the cmdline.

This does work fine when I start the project in my normal way: In Emacs, open one of the .cljs files and invoke C-c M-J (cider-jack-in-clojurescript).

I don't know why the cmdline startup fails (and I apologize that my readme led you down that path!).
My guess is that I have some figwheel version mismatch, that Cider is smart enough to work around. I will try to fix this, but it will probably be a couple of days. (If you see the problem first, a PR would be great!). Meanwhile, I suggest starting from Emacs, assuming you are comfortable in that environment and have Cider setup already.

deg added a commit that referenced this issue Oct 15, 2017
@deg
Copy link
Owner

deg commented Oct 15, 2017

Fixed now; thanks for catching this!

The problem had been a dependency on an older version of lein-figwheel. I'm not sure why lein ancient had not caught this earlier.

@deg deg closed this as completed Oct 15, 2017
@leontalbot
Copy link
Author

Thanks! Now I got an other error:

Compile Exception 
java.io.FileNotFoundException: checkouts/sodium/src (No such file or directory)

@deg deg reopened this Oct 16, 2017
@deg
Copy link
Owner

deg commented Oct 16, 2017

tl;dr - You can work around this problem by commenting out the four strings in your copy of project.clj that start "checkouts/".

Details: Lein uses the checkouts directory as a way to immediately see changes when actively working on both a project and its dependencies. Trilystro is my testbed app; I make changes to sodium and re-frame-firebase as I work on it.

So, in my local configuration, checkouts contains symlinks to those other projects. This works beautifully for development, and also for deployment, where lein nicely detects that the checkouts dirs are empty and ignores them with just a warning.

But, you've just discovered that Figwheel is not as forgiving. I don't know if this is a recent change to Figwheel, or if I simply never tested Figwheel without checkouts setup.

I'll check with the Figwheel folks and see if I can find a solution. I'll also update README.md to warn about this, if I can't find a fix.

Meanwhile, like I said above, you can run trilystro by removing the four references to checkouts in project.clj.

Alternatively, if you'd like to contribute to those projects, you can clone them to your machine and then create symlinks to them in your checkouts dir. See https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies for details.

@deg
Copy link
Owner

deg commented Oct 16, 2017

It looks like this is an open issue in Figwheel: bhauman/lein-figwheel#517

deg added a commit that referenced this issue Oct 16, 2017
@deg
Copy link
Owner

deg commented Oct 16, 2017

I've updated the README.md to explain the problem and workaround.

I don't think I can do any better, so I'm closing this issue.

Thank you for your help! If you know a better workaround for this problem, please re-open here.

If you hit any more problems, please open new issues for them.

@deg deg closed this as completed Oct 16, 2017
@leontalbot
Copy link
Author

It worked! Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants