如何升级leiningen的nrepl版本? [英] How to upgrade nrepl version of leiningen?

查看:19
本文介绍了如何升级leiningen的nrepl版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 leiningenemacs + cider 进行 clojure 开发.几天前,在我通过 emacs 包管理器升级 cider 后,当我运行 Mx cider-connectMx cider- 时,我收到以下警告消息插入.

I'm using leiningen and emacs + cider for clojure development. A few days ago, after I upgrade cider through emacs package manager, I'm getting the following warning message when I run M-x cider-connect or M-x cider-jack-in.

; CIDER 0.9.0snapshot (package: 20150222.137) (Java 1.8.0_31, Clojure 1.6.0, nREPL 0.2.6)
WARNING: CIDER requires nREPL 0.2.7 to work properly
user> 

警告信息明确指出我必须将 nrepl 升级到 0.2.7,但是,我不知道如何进行.

The warning message clearly says that I have to upgrade nrepl to 0.2.7, however, I don't know how.

我通过 brew 安装了 leiningen,它使用 nrepl 0.2.6.

I installed leiningen via brew, and it uses nrepl 0.2.6.

$ lein repl
nREPL server started on port 53218 on host 127.0.0.1 - nrepl://127.0.0.1:53218
REPL-y 0.3.5, nREPL 0.2.6
Clojure 1.6.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_31-b13
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=>

leiningen 个人资料内容为:

The content of leiningen profile is:

{:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"]]}}

问题::leiningen使用的nrepl版本如何升级?

Question:: How to upgrade the version of nrepl used by leiningen?

推荐答案

我刚刚遇到了这个问题,我通过添加对较新版本 tools.nrepl 的显式依赖来解决它profiles.clj.我的~/.lein/profiles.clj:

I've just had this problem, and I solved it by adding an explicit dependency on the newer version of tools.nrepl to profiles.clj. My ~/.lein/profiles.clj:

{:repl {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"]]
        :dependencies [[org.clojure/tools.nrepl "0.2.7"]]}}

不知道这是最好的还是官方的方式,不过.

No idea whether that's the best or official way to do it, tho'.

这篇关于如何升级leiningen的nrepl版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆