This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-10
Channels
- # announcements (14)
- # beginners (55)
- # calva (4)
- # cider (9)
- # clojure (56)
- # clojure-austin (25)
- # clojure-brasil (1)
- # clojure-dev (29)
- # clojure-europe (44)
- # clojure-mexico (1)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-uk (5)
- # clojurescript (15)
- # cursive (9)
- # datomic (5)
- # emacs (30)
- # events (1)
- # graalvm (30)
- # honeysql (17)
- # hyperfiddle (54)
- # introduce-yourself (1)
- # jobs-discuss (6)
- # kaocha (2)
- # leiningen (5)
- # lsp (6)
- # malli (3)
- # missionary (16)
- # off-topic (42)
- # overtone (40)
- # pedestal (2)
- # re-frame (21)
- # shadow-cljs (16)
- # squint (2)
- # tools-deps (14)
When a tool is installed (`clojure -Ttools install ...`) and the run (`clojure -Tsome-tool ...`) what determines the version of Clojure it uses?
I ask because I have a tool that specifies Clojure 1.12 Alpha 5 in its :deps
but when I run it via clojure
CLI 1.11.1435, that seems to be ignored and it uses Clojure 1.11.1 instead.
I can get around it with an alias in my user deps.edn
and :override-deps
so that clojure -A:1.12 -Tsome-tool ...
then runs with Clojure 1.12 but that's kind of a pain.
Can you share a repro?
I suspect since the tool has it as a transitive dep, the top-level root deps.edn is the one that defines the version
When running as an installed tool it’s like the top level dep is the tool itself (+ Clojure from root deps)
deps-new
latest SHA on the develop branch -- its deps.edn
specifies Clojure 1.12 -- but if you install and run it with the 1.11.1.1435 CLI, it uses 1.11 (and breaks because it uses 1.12-specific features).
So it sounds like you're saying an installed tool can't override the version of Clojure being used?
I think that is a practical consequence of this setup (I think maybe we've even talking about this here before, or maybe it was someone else)
can't say that was really the intention though
Thanks. Is that likely to get fixed "soon" or is a 1.12 version of the CLI likely to come first?
(just considering my options for deps-new
at this point)
not sure when I will get to it. not sure I even have a good thought on how to fix it
I can make deps-new
"adaptive" and not break if you run it with 1.11 -- but dynamically adding git deps to the classpath in order to make it easier to use third-party templates is my current priority for that project right now. 1.12 makes that a lot easier (but I have some separate Qs around that I'll ask in #C06E3HYPR probably).
Obvs. I could use a sub-process and a basis etc but I'd prefer not to go that route if a 1.12 CLI is on the horizon -- I don't mind "forcing" people to upgrade to that to get the new features...