user4813927
user4813927

Reputation:

Emacs live+Clojure+Cider matter

I am experiencing this problem: Cider stacks and stops evaluating the code. I reinstalled the GNU emacs 24.4.1 and Emacs Live. When I try to launch M-x cider-jack-in I get the following error:

; CIDER 0.9.1 (Java 1.7.0_79, Clojure 1.6.0, nREPL 0.2.6)
WARNING: CIDER requires nREPL 0.2.7 (or newer) to work properly
WARNING: The following required nREPL ops are not supported: 
apropos classpath complete eldoc format-code format-edn info inspect-pop inspect-push inspect-refresh macroexpand ns-list ns-vars ns-path refresh resource stacktrace toggle-trace-var toggle-trace-ns undef
Please, install (or update) cider-nrepl 0.9.1 and restart CIDER
WARNING: The following nREPL ops are not supported:
artifact-list artifact-versions clean-ns configure extract-definition find-debug-fns find-symbol find-unbound hotload-dependency rename-file-or-dir resolve-missing stubs-for-interface version warm-ast-cache
Please, install (or update) refactor-nrepl and restart REPL.
You can mute this warning by changing cljr-suppress-middleware-warnings.
WARNING: CIDER's version (0.9.1) does not match cider-nrepl's version (not installed)

I have also Leiningen 2.5.1 on Java 1.7.0_79 OpenJDK Server VM.

Upvotes: 1

Views: 553

Answers (1)

Leon Grapenthin
Leon Grapenthin

Reputation: 9266

Warning saying you have to use nREPL 0.2.7+

CIDER currently requires at least nREPL 0.2.7 to work properly (there were some nasty bugs in 0.2.6). Unfortunately the latest leiningen (2.5.1) pulls in exactly 0.2.6, so you if you're a lein user you'll have to do a bit of manual work. Just add this to your profiles.clj:

{:user {:dependencies [[org.clojure/tools.nrepl "0.2.10"]]}}

Make sure you add the newer nREPL dependency to the :dependencies key instead of :plugins (where cider-nrepl Lein plugin resides). That's a pretty common mistake.

Generally you're advised to use the newest nREPL with CIDER, as bugs get fixed in pretty much every release.

Note, that running cider-jack-in from outside the scope of a project will result in the older (0.2.6) nREPL dependency being used (at least on Leiningen 2.5.1). This is likely a Leiningen bug.

https://github.com/clojure-emacs/cider#warning-saying-you-have-to-use-nrepl-027

Upvotes: 1

Related Questions