I have installed cider via el-get, just today. When I start up cider in emacs, the following banner is printed:
; CIDER 0.8.0-snapshot (Java 1.7.0_65, Clojure 1.6.0, nREPL 0.2.6)
WARNING: The following required nREPL ops are not supported:
eldoc ns-list ns-vars undef
Please, install (or update) cider-nrepl 0.8.0-snapshot and restart CIDER
WARNING: CIDER's version (0.8.0-snapshot) does not match cider-nrepl's version (0.7.0)
user>
I can run my unit tests in cider, but lots of other things don't work, like doc lookup, etc. Notice that the prompt is also in the user namespace, rather than the project namespace.
My ~/.lein/profiles.clj
{:user
{:plugins
[[cider/cider-nrepl "0.7.0"]]}
}
I see that lein has downloaded what's required (and then some, strangely):
$ find ~/.m2 -name "*nrepl*"
~/.m2/repository/cider/cider-nrepl
~/.m2/repository/cider/cider-nrepl/0.8.0-SNAPSHOT/cider-nrepl-0.8.0-20140914.152356-14.jar.sha1
~/.m2/repository/cider/cider-nrepl/0.8.0-SNAPSHOT/cider-nrepl-0.8.0-20140914.152356-14.pom
~/.m2/repository/cider/cider-nrepl/0.8.0-SNAPSHOT/cider-nrepl-0.8.0-20140914.152356-14.jar
~/.m2/repository/cider/cider-nrepl/0.8.0-SNAPSHOT/cider-nrepl-0.8.0-20140914.152356-14.pom.sha1
~/.m2/repository/cider/cider-nrepl/0.8.0-SNAPSHOT/cider-nrepl-0.8.0-SNAPSHOT.pom
~/.m2/repository/cider/cider-nrepl/0.8.0-SNAPSHOT/cider-nrepl-0.8.0-SNAPSHOT.jar
~/.m2/repository/cider/cider-nrepl/0.7.0/cider-nrepl-0.7.0.jar.sha1
~/.m2/repository/cider/cider-nrepl/0.7.0/cider-nrepl-0.7.0.pom.sha1
~/.m2/repository/cider/cider-nrepl/0.7.0/cider-nrepl-0.7.0.jar
~/.m2/repository/cider/cider-nrepl/0.7.0/cider-nrepl-0.7.0.pom
~/.m2/repository/org/clojure/tools.nrepl
~/.m2/repository/org/clojure/tools.nrepl/0.2.6/tools.nrepl-0.2.6.pom.sha1
~/.m2/repository/org/clojure/tools.nrepl/0.2.6/tools.nrepl-0.2.6.pom
~/.m2/repository/org/clojure/tools.nrepl/0.2.6/tools.nrepl-0.2.6.jar.sha1
~/.m2/repository/org/clojure/tools.nrepl/0.2.6/tools.nrepl-0.2.6.jar
I also see that lein wants to bring in both cider-nrepl and tools.nrepl, although I surely don't understand why:
$ lein deps :tree
warn
[cider/cider-nrepl "0.7.0"]
[cljs-tooling "0.1.3" :exclusions [[org.clojure/clojure]]]
[compliment "0.1.3" :exclusions [[org.clojure/clojure]]]
[org.clojure/java.classpath "0.2.0" :exclusions [[org.clojure/clojure]]]
[org.clojure/tools.namespace "0.2.5" :exclusions [[org.clojure/clojure]]]
[org.clojure/tools.trace "0.7.8" :exclusions [[org.clojure/clojure]]]
[org.tcrawley/dynapath "0.2.3" :exclusions [[org.clojure/clojure]]]
[clojure-complete "0.2.3" :scope "test" :exclusions [[org.clojure/clojure]]]
[org.clojure/clojure "1.6.0"]
[org.clojure/tools.nrepl "0.2.6" :scope "test" :exclusions [[org.clojure/clojure]]]
Finally, my project.clj, though I am seeing this problem for all of my clojure projects:
(defproject cider-demo "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]])
How do I get cider to pick up the correct cider-nrepl?
The error is presented very clearly:
WARNING: CIDER's version (0.8.0-snapshot) does not match cider-nrepl's version (0.7.0)
You need to change your profiles.clj
dependency:
{:user
{:plugins
[[cider/cider-nrepl "0.8.0-SNAPSHOT"]]}
}
Or downgrade your emacs cider version to match the version of cider-nrepl
you are currently asking for.
tools.nrepl
isn't a problem here, and furthermore, cider
actually cannot work without tools.nrepl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With