tools-deps

seancorfield 2026-03-04T23:59:13.414189Z

I did brew update && brew upgrade clojure and got 1.12.4.1612 which hasn't been announced -- I see the only difference from 1607 is the tools.deps update. Anything to be aware of? Also, I did a clojure -Ttools install-latest today and got complaints that a couple of tools had ambiguous coordinates -- I'd never seen that error before. The tools were installed with git deps (and have been for ages) but they also have mvn versions on Clojars. In the past, that's been fine and it has just updated to the latest git deps tag/sha and ignored the Clojars version. I don't recall seeing anything in recent releases that this change was intended -- did I miss that, or is it unintended?

seancorfield 2026-03-05T14:07:01.898939Z

Ah, something a bit odd:

(!2016)-> cat ~/.config/clojure/tools/
antq.edn        clj-new.edn     clj-watson.edn  new.edn         tools.edn

(2026-03-04.14:42:47)-(~/clojure)
(!2016)-> cat ~/.config/clojure/tools/tools.edn
{:lib io.github.clojure/tools.tools, :coord {:git/tag "v0.3.5", :git/sha "e73fe8f"}}

(2026-03-05.09:04:38)-(~/clojure)
(!2017)-> cat ~/workspace/wsmain/build/clojure/tools.edn
{:lib io.github.clojure/tools.tools
 :coord {:git/tag "v0.3.5"
         :git/sha "b35ee5b6defd5c3cf15ed052e0cd7a063c0e1379"}}
Those SHAs do not match. I use the XDG setup so there is no ~/.clojure folder, and we vendor the CLI installation into our work repo:
(!2018)-> which clojure
/home/sean/bin/clojure

(2026-03-05.09:06:30)-(~/clojure)
(!2019)-> ls -l `!!`
ls -l `which clojure`
lrwxrwxrwx 1 sean sean 47 Nov 28  2022 /home/sean/bin/clojure -> /var/www/worldsingles/build/clojure/bin/clojure
This is all on Linux, using the posix-installer.

seancorfield 2026-03-05T14:08:24.889259Z

TDEPS-268 does sound like a potential cause.

seancorfield 2026-03-05T20:28:44.454949Z

Just hit another weirdness @alexmiller -- if I switch these tools to use the :mvn/version instead of :git/*, the :ns-default from the tool's deps.edn isn't picked up and you have to use the fully-qualified fn name on the CLI. Is that a known limitation of installing tools as Maven deps instead of git deps?

Alex Miller (Clojure team) 2026-03-05T20:48:14.255069Z

yes

Alex Miller (Clojure team) 2026-03-05T20:49:54.467389Z

tools rely on getting that from the deps.edn, which is in a well-known place for local and git deps (file at the root of the project). with maven deps, where do you find that? you don't include the deps.edn in the jar typically, and I wouldn't want every jar to have a deps.edn at the root - they would all overlap in classpath space, that's crazy talk. so that is a problem to be solved still

Alex Miller (Clojure team) 2026-03-05T20:50:37.617289Z

there are several potential answers, have not decided on one

seancorfield 2026-03-05T21:13:37.980519Z

Thanks. Just wanted to make sure -- since I've never used maven deps for tools before. I was only trying that to get rid of the "ambiguous" coords issue.

seancorfield 2026-03-05T21:16:31.794139Z

The problem right now is this:

(!2005)-> ls ~/.config/clojure/tools/
antq.edn  clj-watson.edn  new.edn  tools.edn

(2026-03-05.16:14:51)-(~/clojure)
(!2006)-> clojure -Ttools install-latest :lib com.github.seancorfield/clj-new :as clj-new
clj-new: Installed com.github.seancorfield/clj-new 1.3.415 {:mvn/version "1.3.415"}

(2026-03-05.16:14:58)-(~/clojure)
(!2007)-> cat ~/.config/clojure/tools/clj-new.edn
{:lib com.github.seancorfield/clj-new, :coord {:mvn/version "1.3.415"}}
install-latest is finding the maven version and installing that -- and then clojure -Tclj-new app :name foo/bar fails because :ns-default isn't available now 😞

seancorfield 2026-03-05T21:19:24.149079Z

Is fixing tools.tools a priority? And can I help?

Alex Miller (Clojure team) 2026-03-05T21:21:56.944229Z

I'm working on it

seancorfield 2026-03-05T21:22:16.642199Z

LMK if I can help/test stuff/whatever 🙂

Alex Miller (Clojure team) 2026-03-05T23:51:37.201289Z

I released a new tools.tools - you can test it by updating your existing $CACHE/tools/tools.edn:

{:lib io.github.clojure/tools.tools
 :coord {:git/tag "v0.3.6"
         :git/sha "b35ee5b6defd5c3cf15ed052e0cd7a063c0e1379"}}

Alex Miller (Clojure team) 2026-03-05T23:52:05.455839Z

if that looks good, I'll do a CLI release

seancorfield 2026-03-05T23:52:44.426039Z

Trying it now.

seancorfield 2026-03-05T23:53:56.361169Z

Are you sure about that tag/sha? I get

Error building classpath. Library io.github.clojure/tools.tools has sha and tag that point to different commits

seancorfield 2026-03-05T23:55:27.014059Z

Looks like that SHA should be "b67e68d"?

Alex Miller (Clojure team) 2026-03-05T23:56:28.453519Z

oh, maybe I grabbed the 0.3.5

Alex Miller (Clojure team) 2026-03-05T23:56:52.902639Z

yeah, b67e68d2e0bdb540be736c4c442dc8de579766da

Alex Miller (Clojure team) 2026-03-05T23:57:04.316669Z

sorry, copy/pasted wrong thing

seancorfield 2026-03-05T23:57:22.946669Z

It solves the ambiguous coords issue but still won't install a lib from scratch:

(!2007)-> clojure -Ttools install-latest :lib com.github.seancorfield/clj-new :as clj-new
clj-new: Did not find versions for com.github.seancorfield/clj-new
That's after I moved the clj-new.edn file out of tools.

Alex Miller (Clojure team) 2026-03-05T23:59:43.541199Z

ok, let me look at that next

seancorfield 2026-03-06T00:01:53.955969Z

I'll keep an eye on Slack and test any new versions.

Lambda/Sierra 2026-04-01T15:05:58.748299Z

Related experience report: :ns-default not applied when a tool is installed from Maven https://github.com/liquidz/antq/issues/298

Lambda/Sierra 2026-04-01T15:11:28.291439Z

https://github.com/liquidz/antq/issues/298#issuecomment-4170777658, install-latest downloads the git version by default, instead of the Maven version.

👍🏻 1
Alex Miller (Clojure team) 2026-04-01T19:35:47.838679Z

re :ns-default - this is a known issue as there is no deps.edn to source the :tools/usage info from in a jar. Tracking in https://clojure.atlassian.net/browse/TDEPS-277 - I think I've settled on what to do there but haven't done it yet.

seancorfield 2026-04-01T20:41:05.394209Z

@alexmiller Am I understanding correctly that there are essentially two parts to that: • A "standard" location to look in a JAR file for a project's deps.edn so that clojure -T can find it and figure out :ns-default etc., • Changes to how tools maintainers build JARs for Maven/Clojars, to ensure they create that file path and copy deps.edn to it (I'm a little hazy on how/where the pom.xml file is copied to the "standard" location under META-INF as it is)

Alex Miller (Clojure team) 2026-04-01T20:46:39.989289Z

Yes on both. The pom files that get bundled into jar files now is just a maven convention that many build tools follow.

Alex Miller (Clojure team) 2026-04-01T20:49:07.781219Z

I think in Java land, that copying is done by the maven jar plugin, but merely as a convention

Alex Miller (Clojure team) 2026-03-05T00:33:10.645649Z

I guess I forgot the announcement on the CLI. I did put it on the release page https://clojure.org/releases/tools#v1.12.4.1612

Alex Miller (Clojure team) 2026-03-05T00:34:21.697739Z

The other, nothing new that I'm aware of. Examples?

seancorfield 2026-03-05T01:08:51.213219Z

Pick any tool that has both Clojars releases and (previously) git deps -- antq or clj-new were the two where I ran into this. Update the tools/*.edn manually to use the :git/tag and :git/sha for a release that also exists on Clojars. Then try to install-latest. That used to work and it would select a more recent git dep version. Now it finds the Clojars (`:mvn/version`) and says they are ambiguous.

seancorfield 2026-03-05T01:17:05.638009Z

Repro:

(!2010)-> cat ~/.config/clojure/tools/antq.edn
{:lib com.github.liquidz/antq,
 :coord {:git/tag "2.11.1269"
         :git/sha "9d78d7a"
         :git/url ""}}

(2026-03-04.20:16:25)-(~)
(!2011)-> clojure -Ttools install-latest
Checking out:  at b35ee5b6defd5c3cf15ed052e0cd7a063c0e1379
Downloading: com/github/liquidz/antq/maven-metadata.xml from clojars
antq: Failed: Coord type is ambiguous: {:git/tag "2.11.1269", :git/sha "9d78d7a", :git/url "", :mvn/version "2.11.1276"}

Alex Miller (Clojure team) 2026-03-05T02:47:21.027919Z

I'll look into it

Alex Miller (Clojure team) 2026-03-05T02:48:20.200239Z

Can't think of anything even adjacent to that that's changed in a while

seancorfield 2026-03-05T03:07:48.432429Z

I typically run install-latest every week, so it must be a fairly recent change (and I update all my deps based on clojure -Tantq outdated at least once a week too). I was surprised to see it with clj-new because that hasn't been updated in ages.

Alex Miller (Clojure team) 2026-03-05T05:43:45.402719Z

I can repro this as far back as 1.12.4.1597 and I suspect it's related to the tools.tools update in that release with https://clojure.atlassian.net/browse/TDEPS-268 but I'll try to verify that tomorrow. I'm wondering if this is could be a flaw in the installation/update of the ~/.clojure/tools/tools.edn where an old version is retained? is this the windows installer from deps.clj or one of the linux or mac installers?