clojars

seancorfield 2021-09-23T00:28:56.009500Z

What is Clojars' policy on snapshots? I am considering publishing snapshots from CI runs but it seems like that would push a lot of artifacts to Clojars...?

eskos 2021-09-27T07:23:51.011Z

That sounds very dangerous and I hope no one really does that on purpose, as SNAPSHOT is meant to be magic by design and is a constantly moving target 🙂

eskos 2021-09-27T07:25:43.011200Z

The timestamp in SNAPSHOT dependency’s name is meant for caching mechanisms so that one doesn’t end up in constantly updating deps loop; Maven’s own default is updating SNAPSHOTs daily at most, and in most private repos I’ve worked with each artifact has been limited to only three latest SNAPSHOTs.

2021-09-27T10:59:14.011400Z

Folks using snapshots that want a stable build do depend on timestamped versions on purpose, to avoid a constantly moving target. the SNAPSHOT version is a mutable pointer, but the underlying repo shouldn't be mutable.

eskos 2021-09-27T12:35:09.011600Z

That’s not part of Aether though 🙂 To be clear, it has never been specified, but SNAPSHOTs have always been considered garbage of sorts in the larger ecosystem so they’re cannot be used as part of eg. repeatable builds.

eskos 2021-09-27T12:37:52.011800Z

A potential save for this situation though is that with build tools and clj/deps.edn a Clojure specific project type could be defined, which allows making these assumptions explicit in Maven compatible way; it seems the community is going into that direction anyway, especially since the build tools resolve order is different from Maven itself, so this looks more like a bubbling of new management format and model comparable to eg. npm, which shares quite a few things with Maven/Aether but is its own beast, especially in the version range syntax and behavior.

eskos 2021-09-24T09:37:45.010300Z

If that ever was an issue, Clojars could implement automatic short retention to the SNAPSHOT artifacts anyway and the S3 bucket would self-clean over time… 🙂

eskos 2021-09-24T09:38:00.010500Z

such retention can be done per bucket, per path and per file even

2021-09-25T13:30:41.010700Z

Thanks @suomi.esko! Our policy has been to not purge snapshots ever, since that would break builds that were dependent on the timestamp version of a snapshot.

👍🏻 1
2021-09-23T01:21:50.009600Z

Several projects do that, and it isn't an issue. The incoming network + s3 storage costs are dwarfed by the outgoing network costs, so feel free.

2021-09-23T01:21:58.009800Z

Thanks for asking!

seancorfield 2021-09-23T01:23:04.010Z

Thank you!!