Lein Clojure 1.3 vs Clojure 1.2.1
Asked Answered
J

1

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.

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!

Jipijapa answered 13/4, 2012 at 4:56 Comment(0)
K
2

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

Kittrell answered 13/4, 2012 at 5:6 Comment(1)
Very nice. Thanks! I foolishly didn't realize I needed the 1.3.0 dependencies given it was already installed.Jipijapa

© 2022 - 2024 — McMap. All rights reserved.