tools-deps

2024-07-12T09:20:14.587759Z

I've created a build that I want to run with clj -T:build build Can I add the dependencies from the dev alias to that or do I need to declare them again in the build alias?

2024-07-12T11:25:58.066149Z

Seems so. Oh well.

seancorfield 2024-07-12T15:36:09.131049Z

If I have a dependency with a version of "LATEST" or "RELEASE", how often (if at all) does the CLI check for/download a new version when run? I'm assuming for the CLI, if I use -Sforce it always checks and picks up any new version but, without that, is it just cached "forever"? (I only use these for dev tooling)

Alex Miller (Clojure team) 2024-07-12T16:03:51.280129Z

the cache becomes stale if something changes. a version of "LATEST" or "RELEASE" is the literal string "LATEST" or "RELEASE", which never changes, and thus never invalidates the cache

Alex Miller (Clojure team) 2024-07-12T16:04:36.402829Z

if you use -Sforce, you are recomputing the classpath and you are then subject to whatever the update frequency of the repo is, by default daily

seancorfield 2024-07-12T17:29:00.664249Z

Thanks, both. I periodically use -Sforce with -P to "reset" things so that all sits right with my expectations. This came up for me because the NIST NVD APIs have been timing out a lot and the dependency check library was updated (to 10.0.2) and they issued a "mandatory update notice" because earlier versions were spamming their servers (due to a bug in the retry code) -- I run some tasks directly from the CLI and some via tools.deps in our build.clj, so I just wanted to check when/if I needed to "intervene" with -Sforce.

Alex Miller (Clojure team) 2024-07-12T17:32:25.284549Z

you can also peep the ~/.m2/repository/GROUP/ARTIFACT/maven-metadata-local.xml to check it's lastUpdated timestamp (and compare to the resolver-status.properties there)

👍🏻 1
lread 2024-07-12T21:40:32.436569Z

Thanks, I have a better understanding now, too!