This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-12
Channels
- # announcements (2)
- # babashka (26)
- # beginners (48)
- # calva (32)
- # cider (23)
- # clj-kondo (61)
- # cljfx (3)
- # clojure (93)
- # clojure-australia (2)
- # clojure-europe (23)
- # clojure-losangeles (1)
- # clojure-nl (5)
- # clojure-uk (4)
- # clojurescript (46)
- # cloverage (9)
- # code-reviews (1)
- # copenhagen-clojurians (1)
- # cursive (39)
- # data-science (6)
- # datahike (8)
- # deps-new (8)
- # depstar (2)
- # etaoin (1)
- # fulcro (2)
- # funcool (2)
- # graalvm (5)
- # jackdaw (3)
- # java (17)
- # jobs-discuss (43)
- # kaocha (2)
- # leiningen (25)
- # malli (8)
- # minecraft (1)
- # missionary (8)
- # observability (6)
- # off-topic (37)
- # other-languages (12)
- # practicalli (1)
- # reagent (4)
- # releases (78)
- # remote-jobs (1)
- # sci (9)
- # shadow-cljs (13)
- # spacemacs (6)
- # sql (1)
- # tools-deps (30)
- # xtdb (3)
I read a book yesterday which suggested seancorfield/clj-new, alias :new, starting as clj -X:new etc. I looked up cjl-new readme on github, which suggested deps.new instead, at least for non maven coordinates. The readme's for clj-new and deps-new both suggest starting with clj -Tclj-new or clj -Tnew, i.e. with -T. So I thought -T is now preferred to -X. But I read in Clojurians today a post that suggested -T is deprecated, https://clojurians.slack.com/archives/C03S1KBA2/p1642012260272200 . I was going to ask should I learn to use clj-new and deps-new with -X or -T? But then I noticed it may depend on whether they are installed as tools or not. So my question becomes, how do I decide whether to install as a tool or use deps.edn? Then the above question, should I learn to use clj-new and deps-new with -X or -T?
@brendnz He got that warning because he was on an old version of the CLI -- he needed to update his CLI.
-T
originally had a different meaning, was removed, and then came back with a different meaning.
In general, -X
executes a function, based on an alias in one of the deps.edn
files (either the root one -- which only has the :deps
alias -- or your user one -- usually in ~/.clojure/
-- or your project one -- in the current directory).
Whereas -T
executes a function, based on a globally installed tool name (with no :
) or based on an alias as with -X
except that it ignores the main dependencies (of your project) and only uses the dependencies from that alias. In addition, -T
with an alias puts the current directory on the classpath and ignores any other paths in your deps.edn
files.
The TL;DR is that the "readme's for clj-new and deps-new both suggest starting with clj -Tclj-new or clj -Tnew, i.e. with -T." -- and that's correct, that's the instructions you should follow.
See https://clojure.org/releases/tools for a lot of the history (but not all of it, unfortunately).