Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 views
in Technique[技术] by (71.8m points)

emacs - How to upgrade nrepl version of leiningen?

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> 

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

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=>

The content of leiningen profile is:

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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'.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...