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.

ChocoDeveloper
  • 14,160
  • 26
  • 79
  • 117

1 Answers1

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.

Michiel Borkent
  • 34,228
  • 15
  • 86
  • 149
  • 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. – deprecated Mar 08 '13 at 09:57
  • I asked technomancy on IRC just now. He said: "REPL's outside projects are hard coded to lein's version of clojure". – David J. Feb 24 '14 at 19:52
  • BTW, https://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" – David J. Feb 24 '14 at 19:57