【发布时间】:2014-12-01 14:43:37
【问题描述】:
上个月有人帮助我让 Cider 参与 Clojure 项目。我喜欢这个功能,尤其是 M-., cider-jump-to-var。但是从那以后,无论是在原始项目中还是在新项目中,我都无法复制正确的行为,并且最初帮助我设置的人不再可用。
在我仍然签出的原始项目中,有一行
[cider/cider-nrepl "0.7.0"]
在我的project.clj 的:dependencies 部分。当我将这样一行添加到我的新项目中,然后运行 lein repl 和 cider-connect 时,我收到以下消息:
; CIDER 0.8.0alpha (package: 20141006.507) (Java nil, Clojure 1.6.0, nREPL 0.2.3)
WARNING: The following required nREPL ops are not supported:
classpath complete info inspect-start inspect-refresh inspect-pop inspect-push inspect-reset macroexpand ns-list ns-vars resource stacktrace toggle-trace 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)
果然,当我跳转到一个符号的定义(比如first)时,我得到:
cider-ensure-op-supported: Can't find nREPL middleware providing op "info". Please, install (or update) cider-nrepl 0.8.0-snapshot and restart CIDER
奇怪的是,当我在project.clj 中将cider/cider-nrepl 的版本更改为"0.8.0-SNAPSHOT" 时,我得到了同样的错误。
但是我在 cider-nrepl Github 页面上注意到 cider/cider-nrepl 行应该在 :plugins 中,而不是 :dependencies。它绝对不在我的原始项目中,但它仍然以某种方式工作。好的,所以我在我的新项目中将其移至:plugins。这次 nrepl 进程启动时没有错误,但是当我尝试跳转到 first 的定义时,我得到:
Symbol first not resolved
现在,如果我尝试降级回0.7.0,我会在启动 cider 时收到一条较短的消息:
WARNING: The following required nREPL ops are not supported:
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)
...但是我得到了和以前一样的“符号首先没有解析”。
这真是令人沮丧。我隐约记得在我最初的项目中工作时出现了某种版本不匹配的消息,并且跳转到定义的功能仍然有效。现在我无法让它为我的生活工作。任何帮助将不胜感激。
编辑添加:
在开始上述探索之前,我从我的软件包列表中删除并重新安装了 Cider。我还在每一步之间删除了~/.m2/repository/cider。
今天早上,我有苹果酒版本20141006.507。有一个更新可用,所以我现在有版本20141007.452。命令cider-version 只返回CIDER 0.8.0-snapshot。在我的project.clj 的:plugins 部分中使用[cider/cider-nrepl "0.8.0-SNAPSHOT"],无论我尝试哪个符号,我仍然会得到Symbol <whatever> not resolved。
【问题讨论】: