gpt4 book ai didi

emacs - 为什么 cider 会找到错误版本的 cider-nrepl,我该如何解决?

转载 作者:行者123 更新时间:2023-12-03 23:54:14 27 4
gpt4 key购买 nike

我已经通过 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>

我可以在 cider 中运行我的单元测试,但是很多其他的东西都不起作用,比如文档查找等。请注意,提示也在用户命名空间中,而不是在项目命名空间中。

我的 ~/.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"]])

我如何让苹果酒拿起正确的苹果酒-nrepl?

最佳答案

错误非常清楚:

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 .

关于emacs - 为什么 cider 会找到错误版本的 cider-nrepl,我该如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26317179/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com