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

Cider won't start under Clojure 1.9.0-alpha18 #2081

Closed
mohiji opened this issue Aug 23, 2017 · 18 comments
Closed

Cider won't start under Clojure 1.9.0-alpha18 #2081

mohiji opened this issue Aug 23, 2017 · 18 comments

Comments

@mohiji
Copy link

mohiji commented Aug 23, 2017

Trying to start Cider (via cider-jack-in) with Clojure 1.9.0-alpha18 fails.

Expected behavior

Cider launches as normal.

Actual behavior

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.

Steps to reproduce the problem

  1. Create an empty project (e.g. lein new whatever)
  2. Set the Clojure version in project.clj to 1.9.0-alpha18.
  3. Try to launch Cider via cider-jack-in.

Environment & Version information

CIDER version information

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.

Lein/Boot version

Leiningen version 2.7.1

Emacs version

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

Operating system

mac OS Sierra 10.12.6

@vspinu
Copy link
Contributor

vspinu commented Aug 23, 2017

Clojure 1.9.0a18 new feature

  • Tighten autoresolved keywords and autoresolved namespace map syntax to support only aliases, as originally intended

Trivial to fix, but should be done through entire cider-nrepl codebase.

@xiongtx
Copy link
Member

xiongtx commented Aug 23, 2017

Tighten autoresolved keywords and autoresolved namespace map syntax to support only aliases, as originally intended

What does this mean? An example would be enlightening.

@mohiji
Copy link
Author

mohiji commented Aug 23, 2017

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.

@puredanger
Copy link

puredanger commented Aug 24, 2017

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.

@xiongtx
Copy link
Member

xiongtx commented Aug 24, 2017

Oh, that makes sense. I didn't know ::foo.bar/baz even worked.

@bbatsov
Copy link
Member

bbatsov commented Aug 24, 2017

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.

@vspinu
Copy link
Contributor

vspinu commented Aug 24, 2017

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.

@Bost
Copy link

Bost commented Aug 29, 2017

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!

@briprowe
Copy link
Contributor

@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!

@jumarko
Copy link

jumarko commented Sep 13, 2017

@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.

@bbatsov
Copy link
Member

bbatsov commented Sep 13, 2017

https://github.com/clojure-emacs/cider/releases/tag/v0.15.1

koodi-viima pushed a commit to Opetushallitus/oti that referenced this issue Sep 25, 2017
This also required cider-nrepl to be upgraded to 0.15.1,
due to the following: clojure-emacs/cider#2081
@johanatan
Copy link

johanatan commented Nov 6, 2017

This is still happening to me on clojure 1.9.0-alpha20. I am on cider-20171001.112.

@johanatan
Copy link

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.

@alexei-matveev
Copy link

1.9.0-RC1 and 0.15.1 combo does work for me

@Engelberg
Copy link

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

@Engelberg
Copy link

My problem seems to have been caused by the lein-gorilla plugin, which is interfering with nrepl in some way.

@dpsutton
Copy link
Contributor

@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

@dpsutton
Copy link
Contributor

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

kot-behemoth added a commit to kot-behemoth/cljs-rum-realworld-example-app that referenced this issue Oct 16, 2019
Any `cider/cider-nrepl` version prior to 0.15.1 would error out if ran. This is the [exact issue](clojure-emacs/cider#2081). Bumped version fixes everything.
markxnelson added a commit to markxnelson/emacs-live that referenced this issue Nov 14, 2019
The versions currently listed can cause errors which prevent the REPL from starting. See clojure-emacs/cider#2081 for details.  Upgrading to more current versions fixes that issue.
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