2015-07-03 79 views
2

我想使用Leiningen REPL的Clojure 1.7。Leiningen REPL仍在使用Clojure 1.6

Clojure下載頁面http://clojure.org/downloads使我相信我只需要在profile.clj文件中添加Clojure 1.7作爲依賴項。我在~/.lein/profiles.clj中做了哪些。

[email protected]:~$ brew upgrade leiningen 
Error: leiningen 2.5.1 already installed 
[email protected]:~$ cat ~/.lein/profiles.clj 
{:user 
    {:dependencies [[org.clojure/clojure "1.7.0"]] 
    :plugins [[lein-pprint "1.1.1"]] 
    } 
} 
[email protected]:~$ lein repl 
nREPL server started on port 54016 on host 127.0.0.1 - nrepl://127.0.0.1:54016 
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=> 

些什麼,我需要做的有lein repl使用Clojure的1.7?

回答

1

您始終可以從使用Clojure 1.7的項目的上下文中運行lein repl

(defproject sandbox "0.1.0-SNAPSHOT" 
    :description "A project to run lein repl with a specific clojure version" 
    :dependencies [[org.clojure/clojure "1.7.0-RC1"]]) 
+1

這就是我最終做的。我爲REPLing製作了一個新項目。 –