Lein Clojure 1.3 vs Clojure 1.2.1

耗尽温柔 提交于 2019-12-02 13:48:04

问题


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.

Context: I have been using Clojure for ~ 1 year now. Mainly just through the clojure repl. Now, I'm starting to use Lein.

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

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"

Now -- how do I fix this? I want leon to use 1.3.0, not 1.2.1

Thanks!


回答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"]])

Their is a more detailed and annotated example on Leiningen's github



来源:https://stackoverflow.com/questions/10135440/lein-clojure-1-3-vs-clojure-1-2-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!