我今天刚刚通过el-get安装了苹果酒。当我在emacs中启动苹果酒时,会打印以下横幅:
; 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>
我可以在苹果酒中运行我的单元测试,但很多其他的东西都不起作用,比如文档查找等。请注意,提示也在用户名称空间中,而不是项目名称空间。
我的〜/ .lein / profiles.clj
{:user
{:plugins
[[cider/cider-nrepl "0.7.0"]]}
}
我看到lein已经下载了所需要的东西(然后是一些奇怪的东西):
$ 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
我也看到lein想要引入cider-nrepl和tools.nrepl,虽然我当然不明白为什么:
$ 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]]]
最后,我的project.clj,虽然我看到了所有clojure项目的问题:
(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"]])
如何让苹果酒拿起正确的苹果酒?
答案 0 :(得分:7)
错误显示非常清楚:
WARNING: CIDER's version (0.8.0-snapshot) does not match cider-nrepl's version (0.7.0)
您需要更改profiles.clj
依赖项:
{:user
{:plugins
[[cider/cider-nrepl "0.8.0-SNAPSHOT"]]}
}
或者降级您的emacs cider版本以匹配您当前要求的cider-nrepl
版本。
tools.nrepl
此处不是问题,此外,cider
actually cannot work without tools.nrepl。