tools-deps 2025-10-20

Q about using RELEASE and/or LATEST in :mvn/version with the CLI: I know that they're deprecated and not really recommended, although they can be convenient for dev tooling. If I use clojure -Sdeps ... {:mvn/version "RELEASE"} ..., how often will the version actually be checked for/updated? I know RELEASE defeats the cache staleness check, since the "version" isn't changing, but does that completely prevent new versions being picked up, or does it just cause a lag as the actual release version is only checked for once a day or whatever?

Alex Miller (Clojure team) 2025-10-20T19:49:49.421699Z

it won't be checked

Alex Miller (Clojure team) 2025-10-20T19:50:28.226279Z

so it will never be updated

Okay, so picking up new versions would happen only when other deps got changed or -Sforce was used?

Alex Miller (Clojure team) 2025-10-20T19:53:57.827999Z

yes

Thanks. The context of this is a thread in #calva discussing the jack-in deps going stale.

Alex Miller (Clojure team) 2025-10-20T19:55:42.377569Z

RELEASE is just seen as another "version" by deps and doesn't cause staleness by itself

Alex Miller (Clojure team) 2025-10-20T19:56:02.705959Z

I think that's the useful thing to say

Alex Miller (Clojure team) 2025-10-20T19:57:17.397119Z

for all Maven virtual versions (including SNAPSHOT)

Alex Miller (Clojure team) 2025-10-20T19:58:36.244209Z

if I was going to "fix" this, then that would be the generic approach I would take - virtual versions should become stale based on some policy (there is a per-repo one for snapshots, would need one for others)

Alex Miller (Clojure team) 2025-10-20T20:00:28.552259Z

but I think the flip side of this is needing to (slowly) run code to determine staleness more often, which would affect startup time. current staleness checks are local, needing only file timestamp checks from bash, which is fast

Yeah, I just use occasional clojure -Sforce invocations (although I've now moved away from using RELEASE in my dot-clojure repo).

hm i’m curious now whether it would be possible to improve startup time by reducing process spawning in bash

i might take a look at that at some point

Alex Miller (Clojure team) 2025-10-24T19:13:42.558559Z

the purpose of the current caching is to reduce process spawning (skip classpath computation when known) and improve perf time

👍 1

I’ve been using RELEASE in my dot files too. I got it from @seancorfield’s examples. I didn’t realize it was deprecated! What’s the next best alternative if you want to be running “the current” thing? It seems like the cache having a TTL would make sense. Maybe something like 24 hours. One lookup per day.

I run clojure -Tantq outdated regularly 🙂

I used to think RELEASE was good for dev tools since you'd "always" get the most recent version (modulo the caching -- so when other deps in your project changed) but partly it felt weird having git deps which had to be tag/sha versions and other stuff being just "recent", combined with caching issues making RELEASE not update to important new versions a couple of times... so I switched away from it completely.

Yeah, have an “outdated” alias too. It seems like it should be a built in—especially since RELEASE is deprecated. Finding the latest version of something seems like a behavior that should be scope for a dependency resolver.

antq is one of my globally installed tools

Yeah. Me too.

Well, I should clarify. I have it set up as an alias and not as a tool. But I set it up globally.