I've been seeing folks use like clj -M:new
and clj -X:new
or whatever but if I put in anything but -A
I get an error. What are the other symbols doing and what should I do to get access to them if desired?
@chase-lambert Version 1.10.1.697 is the magic number when the flags change... but Alex put some nice fixes in since then so use the latest version from http://Clojure.org Getting Started page. Here is a crib sheet of tasks I use and where their definitions come from http://practicalli.github.io/clojure/clojure-tools/using-clojure-tools.html#common-tasks-for-clojure-development
If you get problems, delete any .cache directories
The Linux installer will install which ever version you install to the same place, so you only ever have one version installed (the last one you installed with the linux install script)
clojure -Sdescribe
to see what version is being used
Instead of deleting .cpcache
(not .cache
), it's better to use -Sforce
as a one-off to tell the CLI to recompute the cache for that specified set of aliases and dependencies etc.
Do you see a version number near the beginning of the output of clj -h
, and if so what is it?
Version: 1.10.1.536
I don't know what minimum version is required to support the command line options you see, but the one I currently have is 1.10.1.763
If you use homebrew on Linux or macOS, there are brew commands for both upgrading and downgrading the version of the clojure CLI tools. So far I've only ever upgraded.
I seem to remember having to install an alpha version of clojure from brew
I haven't kept track of all of the details of versions and command line option changes for Clojure CLI tools, but I see discussion flying by about it on #tools-deps
I'm on linux and used the script installer. Can I just repeat those steps with the latest one? Would that override my current one. I would rather not have multiple versions if that is going to trip me up down the line
but that was a while ago. Might be stable release now
1.10.1.763 is the current version mentioned here: https://clojure.org/guides/getting_started
On Linux, you can rerun the shell script installer and it will overwrite the version you installed earlier, no problems.
Perfect, exactly what I was wondering.
clj -h
version number is your friend if you are ever unsure what version you are getting.
tool version history can be found here: https://clojure.org/releases/tools
536 does pre-date the -M/-X support you mentioned in first post
2020 was a big year for Clojure CLI tools!
well, 2019 was as well, this history doesn't go back that far (but see the more detailed changelogs for that)
The clj-new README specifies you need at least 1.10.1.727 (as does depstar's README).