How to change Clojure or Lein's Clojure default version?
Asked Answered
R

1

4

I'm not sure why but when I enter the REPL through $ clojure or $ lein repl, >(clojure-version) says '1.2.1'. I want it to say '1.5'.

Version 1.5 works fine in my projects managed by lein. I just want to tell lein to always use 1.5 by default, instead of 1.2.

Rounded answered 2/3, 2013 at 3:32 Comment(0)
S
3

Currently this isn't supported outside a project, but it's being worked on: https://github.com/technomancy/leiningen/issues/966

A workaround for now is just to specify it in your project.clj

Further recommendation: upgrade to Leiningen 2.0.

Strongbox answered 2/3, 2013 at 9:36 Comment(3)
When creating new projects, how to tell lein to use 1.5 instead of 1.4? (I mean by default, so I don't have to edit project.clj every single time). Adding 1.5 as a dependency in profiles.clj didn't work.Gabby
I asked technomancy on IRC just now. He said: "REPL's outside projects are hard coded to lein's version of clojure".Justify
BTW, github.com/technomancy/leiningen/issues/966 is not the underlying issue (according, again, to an IRC discussion) "You can use :dependencies (in /.lein/profiles.clj) to add things to the non-project REPL" but "you just can't use profiles.clj to replace things that have already been loaded"Justify

© 2022 - 2024 — McMap. All rights reserved.