Trying to start Cider (via cider-jack-in) with Clojure 1.9.0-alpha18 fails.
Cider launches as normal.
Cider fails to launch with the following error/stack trace in *Messages*:
error in process sentinel: Could not start nREPL server: Error loading cider.nrepl.middleware.test: java.lang.RuntimeException: Invalid token: ::clojure.test/once-fixtures, compiling:(cider/nrepl/middleware/test.clj:129:57)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context, compiling:(/private/var/folders/mr/bcbnl6690qn9y500kp5yj0l40000gn/T/form-init6687442937272601453.clj:1:8319)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6953)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler.analyze(Compiler.java:6685)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3855)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6948)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler.analyze(Compiler.java:6685)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3855)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6948)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler.access$300(Compiler.java:38)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6324)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6946)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler.analyze(Compiler.java:6685)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6056)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5428)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3993)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6944)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler.eval(Compiler.java:7002)
at clojure.lang.Compiler.eval(Compiler.java:6995)
at clojure.lang.Compiler.load(Compiler.java:7457)
at clojure.lang.Compiler.loadFile(Compiler.java:7395)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
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: java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:716)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6946)
... 34 more
Subprocess failed
Presumably because of the following fix in alpha 18:
- Tighten autoresolved keywords and autoresolved namespace map syntax to support only aliases, as originally intended
(It doesn't seem like the compiler likes ::clojure.test/once-fixtures.
lein new whatever)1.9.0-alpha18.cider-jack-in.I don't get as far as seeing the version string. I'm using Cider 20170729.133 installed via melpa, tools.nrepl version 0.2.12, cider-nrepl version 0.15.1-SNAPSHOT.
Leiningen version 2.7.1
GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2017-04-21
mac OS Sierra 10.12.6
Clojure 1.9.0a18 new feature
Trivial to fix, but should be done through entire cider-nrepl codebase.
Tighten autoresolved keywords and autoresolved namespace map syntax to support only aliases, as originally intended
What does this mean? An example would be enlightening.
Sorry, that's from the Clojure 1.9.0-alpha18 announcement: https://groups.google.com/d/msg/clojure/rb22V98rPLM/MFBBcz-gAQAJ
I think it means you can't put a fully-qualified namespace in a double-colon keyword. E.g., this will work:
(ns whatever
(:require [clojure.test :as test]))
::test/whatever
But this won't:
::clojure.test/whatever
I probably should have made this ticket against cider-nrepl, sorry.
Correct - this has always worked, but not intentionally. The spec (and code) now follow the original intent. In this case, just deleting one of the colons should work as well: :clojure.test/once-fixtures would be the easiest and best change.
Oh, that makes sense. I didn't know ::foo.bar/baz even worked.
A fixed version of cider-nrepl is now deployed to Clojars. I'll likely cut 0.15.1 soon. I was just wondering whether to try to include there some of @vspinu's performance improvement patches or push those back to 0.16.
whether to try to include there some of @vspinu's performance improvement patches or push those back to 0.16.
I am sure people would appreciate them earlier but there is one small safety concern which is unlikely to affect anyone with only cider's middleware stack. Clojure seems to have troubles with loading namespaces in parallel, and loading middleware concurrently might cause issues. Moving this discussion to #2078.
I can only confirm that this problem doesn't come up with [org.clojure/clojure "1.9.0-alpha17"].
I'll likely cut 0.15.1 soon
@bbatsov please please please do cut it!
@bbatsov Can you cut 0.15.1 soon? This is a breaking bug that's causing everyone to have to craft their own work arounds.
Thanks!
@briprowe You can always upgrade to the latest version from Melpa repository, which I believe should contain the fix: https://melpa.org/#/cider
I'm using Spacemacs but I did a manual upgrade and clojure 1.9.0-alpha20 now works for me.
This is still happening to me on clojure 1.9.0-alpha20. I am on cider-20171001.112.
Looks like the problem was my cidr-nrepl version. After updating it from 0.15.0-SNAPSHOT to 0.15.1, cider is at least able to boot.
1.9.0-RC1 and 0.15.1 combo does work for me
I'm still getting this error with Clojure 1.9 after updating to what I believe is the latest cider:
cider 20180211.538 installed Clojure Interactive Development Environment that Rocks
Any ideas how to fix this?
You can run the command ‘cider-jack-in’ with C-c M-j
Starting nREPL server via "c:/bin/lein.bat" update-in :dependencies conj ^"[org.clojure/tools.nrepl \^"0.2.13\^" :exclusions [org.clojure/clojure]]^" -- update-in :plugins conj ^"[refactor-nrepl \^"2.4.0-SNAPSHOT\^"]^" -- update-in :plugins conj ^"[cider/cider-nrepl \^"0.17.0-SNAPSHOT\^"]^" -- repl :headless :host ::...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Retrieving cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-20180210.163221-12.pom from clojars
Retrieving cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-20180210.163221-12.jar from clojars
Error loading cider.nrepl.middleware.test: java.lang.RuntimeException: Invalid token: ::clojure.test/once-fixtures, compiling:(cider/nrepl/middleware/test.clj:103:57)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context, compiling:(C:\Users\mark\AppData\Local\Temp\form-init2242713738461957635.clj:1:7331)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
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$InvokeExpr.parse(Compiler.java:3881)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.access$300(Compiler.java:38)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368)
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.eval(Compiler.java:7059)
at clojure.lang.Compiler.eval(Compiler.java:7052)
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: java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
... 34 more
Subprocess failed
error in process sentinel: Could not start nREPL server: Retrieving cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-20180210.163221-12.pom from clojars
Retrieving cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-20180210.163221-12.jar from clojars
Error loading cider.nrepl.middleware.test: java.lang.RuntimeException: Invalid token: ::clojure.test/once-fixtures, compiling:(cider/nrepl/middleware/test.clj:103:57)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context, compiling:(C:\Users\mark\AppData\Local\Temp\form-init2242713738461957635.clj:1:7331)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
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$InvokeExpr.parse(Compiler.java:3881)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.access$300(Compiler.java:38)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368)
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.eval(Compiler.java:7059)
at clojure.lang.Compiler.eval(Compiler.java:7052)
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: java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
... 34 more
Subprocess failed
My problem seems to have been caused by the lein-gorilla plugin, which is interfering with nrepl in some way.
@Engelberg I think this is a bug that has been fixed in subsequent cider-nrepl's. it must be holding onto an old one. If its the issue I think it is, it is using a fully qualified keyword as an alias, something that is no longer valid as of clojure 1.9. ::clojure.test/something versus ::test-alias/something or just :clojure.test/something
and from its project.clj: [cider/cider-nrepl "0.10.2"]. you could probably add an exclusion to your project dependency on gorilla repl and it should work
Most helpful comment
https://github.com/clojure-emacs/cider/releases/tag/v0.15.1