14

When I type (clojure-version) into my repl in LightTable, I get "1.5.1" as output. Is there any way to upgrade to 1.6.0?

I am assuming that it is drawing the Clojure version from Leiningen (2.3.4 on my machine), which is stocked with 1.5.1 out of the box. How can I make sure that both Leiningen and LightTable are using the most recent version of Clojure? I have googled around and can't find any clear answers.

I did find this SO question, but it didn't address my problem specifically. Is there like a "lein update" command I can call that automates this process, and which LightTable will recognize and pick up, or is this wishful thinking?

Community
  • 1
  • 1
kurofune
  • 1,055
  • 12
  • 26
  • have you tried updating project.clj's clojure version, then run `lein update`? – Fabricator Jun 07 '14 at 06:57
  • 1
    Right, right. I just realized it's "lein upgrade". and you were right to suggest that I do it from the project root. I can get both the lein repl and the LightTable repl to run at version 1.6.0. When I run lein repl in a non-clojure-project directory, however, it still defaults to 1.5.1. If you can tell me how to upgrade from Lein 2.3.4 to the most recent version, and package that with what you have above, I would be happy to accept your answer. [The official documentation](https://github.com/technomancy/leiningen/wiki/Upgrading) on upgrading only handles to going fron lein1 to lein2. – kurofune Jun 07 '14 at 07:08
  • y not just create a dummy project for this? – Fabricator Jun 07 '14 at 07:23
  • I can get it to work with Clojure projects, but I mean in general, setting leiningen to use a new *default* version. If I am in the `dummy-project` directory in the terminal, I can definitely get it to switch to 1.6.0. But if I'm in, say, my workspace folder, which is not necessarily a Clojure project, it reverts back to 1.5.1. See the SO question in my original post that discusses why. – kurofune Jun 07 '14 at 07:34
  • 3
    There still isn't an official release of Leiningen that uses 1.6.0. You can either wait for a stable release or use leiningen from github trunk if you really want 1.6.0 in a default repl outside of a project. – Diego Basch Jun 07 '14 at 08:11
  • Thanks Diego. Is the leiningen update process for subsequent versions the same as is outlined on their website, regarding the update from lein1 to lein2, or is there a simpler way for incremental 2.x versions? – kurofune Jun 07 '14 at 10:00
  • 2
    for 2.x versions, `lein upgrade` with no arguments should suffice to get you the latest stable as it is available – noisesmith Jun 08 '14 at 22:04

1 Answers1

20

To upgrade your Leiningen version, run lein upgrade, and type 'Y' when asked if you want to continue. This will automatically upgrade your Leiningen to the latest stable release. At the time of writing this used Clojure 1.6.0.

To upgrade your project's version of Clojure, look in your project.clj for the [org.clojure/clojure] dependency, and change the version number to the desired version.

Daniel Compton
  • 13,878
  • 4
  • 40
  • 60