Lein Clojure 1.3和Clojure 1.2.1 [英] Lein Clojure 1.3 vs Clojure 1.2.1
问题描述
我承认这个问题有点不太好。请让我知道我应该运行什么命令来提供更多信息,我会提供。
I admit this question is a bit poorly phrased. Please let me know what commands I should run to provide more information, and I will provide it.
上下文:我已经使用Clojure〜1年了。主要是通过clojure repl。现在,我开始使用Lein了。
Context: I have been using Clojure for ~ 1 year now. Mainly just through the clojure repl. Now, I'm starting to use Lein.
但是,leon不喜欢我的一些代码。这是我有的信息:
However, it leon does not like some of the code I have. Here is the info I have:
$ lein version
Leiningen 1.7.1 on Java 1.6.0_29 Java HotSpot(TM) 64-Bit Server VM
当我手动运行clojure时,我得到:
When I run clojure manually, I get:
Clojure 1.3.0
user=> (clojure-version)
"1.3.0"
When I run
$ lein repl
REPL started; server listening on localhost port 12572
user=> (clojure-version)
"1.2.1"
这个?我想让leon使用1.3.0,而不是1.2.1
Now -- how do I fix this? I want leon to use 1.3.0, not 1.2.1
谢谢!
推荐答案
project.clj
文件列出了您的lein项目的依赖关系,包括clojure的版本。所以简单地把 [org.clojure / clojure1.3.0]
放在依赖向量中,而不是 [org.clojure / clojure] 1.2.1 ]
。这是一个准系统示例:
The project.clj
file lists the dependencies for your lein project, including the version of clojure. So simply put [org.clojure/clojure "1.3.0"]
in the dependency vector instead of [org.clojure/clojure "1.2.1"]
. Here's a barebones example:
(defproject myproject "0.5.0-SNAPSHOT"
:description "A project for doing things."
:url "http://github.com/technomancy/myproject"
:dependencies [[org.clojure/clojure "1.3.0"]])
他们是一个更详细和注释的例子Leiningen的 github
Their is a more detailed and annotated example on Leiningen's github
这篇关于Lein Clojure 1.3和Clojure 1.2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!