tools-deps 2025-03-06

I am running the latest Clojure and CLI. I am in an empty directory. I have deps-new installed as a tool. When I try clojure -A:deps -Tnew help/dir I get the help for the clojure CLI, and not deps-new. Same for other installed tools. It used to work. Transcript in thread.

(base) dorab@Dorabs-Mac-mini /tmp % clojure -version
Clojure CLI version 1.12.0.1517
(base) dorab@Dorabs-Mac-mini /tmp % clojure -Ttools list
TOOL         LIB                              TYPE  VERSION
antq         com.github.liquidz/antq          :git  2.11.1269
clj-new      com.github.seancorfield/clj-new  :git  v1.3.415
cljfmt       io.github.weavejester/cljfmt     :git  0.13.0
http-server  io.github.babashka/http-server   :git  v0.1.13
lein2deps    io.github.borkdude/lein2deps     :git  v0.1.1
new          io.github.seancorfield/deps-new  :git  v0.8.0
tools        io.github.clojure/tools.tools    :git  v0.3.4
(base) dorab@Dorabs-Mac-mini /tmp % clojure -A:deps -Tnew help/dir
aliases
find-versions
git-resolve-tags
list
mvn-install
mvn-pom
prep
tree
(base) dorab@Dorabs-Mac-mini /tmp % clojure -A:deps -Tantq help/dir
aliases
find-versions
git-resolve-tags
list
mvn-install
mvn-pom
prep
tree
(base) dorab@Dorabs-Mac-mini /tmp % clojure -Sverbose
version      = 1.12.0.1517
install_dir  = /opt/homebrew/Cellar/clojure/1.12.0.1517
config_dir   = /Users/dorab/.clojure
config_paths = /opt/homebrew/Cellar/clojure/1.12.0.1517/deps.edn /Users/dorab/.clojure/deps.edn deps.edn
cache_dir    = /Users/dorab/.clojure/.cpcache
cp_file      = /Users/dorab/.clojure/.cpcache/2983778365.cp

Clojure 1.12.0
user=> ^D
(base) dorab@Dorabs-Mac-mini /tmp % 
Where should I look for the problem? Happy to write this up as an Ask, if deemed useful.

And what if you leave out the -A:deps

Alex Miller (Clojure team) 2025-03-06T00:36:37.755769Z

probably was broken in the tools refactor a couple months ago most likely

Alex Miller (Clojure team) 2025-03-06T00:37:16.306109Z

you can't leave out the :deps as you won't have help

I tried winding back tools.deps.cli and then tools.deps but couldn't find a working version, so I'm assuming this is something that changed in the CLI (with it's bundled tools.deps). I don't have older versions of the CLI right now to test.

Alex Miller (Clojure team) 2025-03-06T00:38:04.234619Z

knowing what changed, I would strongly suspect I broke it, I am happy to chase it down and fix it tomorrow

Thanks.

Alex Miller (Clojure team) 2025-03-06T00:41:22.427809Z

help/dir uses :ns-default and I'm presuming both :deps and these tools set ns-default, so it's ending up with the wrong one

:deps:

:deps {:replace-paths []
           :replace-deps {org.clojure/tools.deps.cli {:mvn/version "0.11.78"}}
           :ns-default clojure.tools.deps.cli.api
           :ns-aliases {help }}

Alex Miller (Clojure team) 2025-03-06T00:43:43.331169Z

clojure -A:deps -Tnew help/dir :ns org.corfield.new can set it explicitly

Alex Miller (Clojure team) 2025-03-06T00:44:07.393649Z

as a workaround for the moment

👍🏻 1

Thanks. At Sean's suggestion, I tried previous versions of the CLI and 1488 is the last version that works.

Alex Miller (Clojure team) 2025-03-06T02:22:19.447349Z

as expected, was just a dumb bug with ordering, fixed in new release 1.12.0.1530

🙏 1