Fork me on GitHub

hello, when i should use a -SNAPSHOT version for a project? i have 3 projects, and 1 of them is dependency to both , they are under active development, not well tested etc


Are you using Leiningen or the Clojure CLI to do development/JAR building?


The CLI (`deps.edn`) supports both local (filesystem) and git deps so you don't need anything published to Clojars -- you can just depend on the unpublished versions.


I think Leiningen has checkout dependencies that let you do something similar.


If you publish SNAPSHOTs, the dependency management system (in lein or clojure) is not going to check for updates every time, as I recall, so it is harder to work with development projects with SNAPSHOTs anyway.


thank you so i will just use github? and people will find it from github? and deploy nothing on clojars?


The other downside to SNAPSHOTs is that a lot of people won't use any libraries that have dependencies that are SNAPSHOTs so you'd have to do non-snapshot releases of them all if you release JARs for other people to use.


if you don't need public access, you can test locally with lein by using lein install which will install the library in your local maven repository


Yes, it's common with deps.edn and the Clojure CLI to get libraries direct from GitHub with nothing published on Clojars. Less common with lein (because it's not so good for working with git deps etc).


In general, you use SNAPSHOT versions when you want to share something that is still in progress. To answer your questions about overwriting: • non-SNAPSHOT versions are immutable - you cannot overwrite them when deployed • SNAPSHOTs are really a pointer to a timestamped version. So you can deploy a new SNAPSHOT of the same version, but under the hood that is a timestamped version that the SNAPSHOT version points to. For example, here are the timestamped versions for a SNAPSHOT version:


lein install is still a clunky manual process compared to proper local filesystem dependencies.


@U06SGCEHJ @U7RJTCH6J Remind me, when/how often does lein check for an updated SNAPSHOT? Is it just once a day?


my projects are leinengein projects, would like to use github dependencies but i dont know how


You can pin to a timestamped SNAPSHOT if you want build stability, since it is immutable (for example, using 1.1.0-20150327.093713-4 instead of 1.1.0-SNAPSHOT for that examlpe


I don't know what the SNAPSHOT refresh frequency is


right, but learning a new tool and reconfiguring all your projects can also be clunky. I think deps.edn does help with these types of workflows, but I'm also aware that changing tools is non trivial


if deps.edn and the Clojure CLI, are better way i can read those. anyway thank you for the information


i will read about those and see : )

👍 1

but people that use lein they will not be able to use my library from github?


I think there are lein plugins that work with git dependencies, but I haven't tried any of them and I'm not sure how easy it is. With deps.edn, it is possible to do a combination of local/git on your machine and publish snapshots to clojars as needed


thank you alot : ) i will read about deps.edn and the lein plugin


@U68Q5G1BJ Re: lein and github -- that's why I said: > The other downside to SNAPSHOTs is that a lot of people won't use any libraries that have dependencies that are SNAPSHOTs so you'd have to do non-snapshot releases of them all if you release JARs for other people to use. I wasn't suggesting you try to let others use your libraries via GitHub -- I was just offering that as an option for you while you are developing and still evolving your libraries. lein checkouts is apparently a common approach for using checked-out git repos locally (via symlinks) when you're working on multiple libraries in parallel like that.


(I don't have any details -- I stopped using Leiningen six years ago -- but I remember people talking about that approach)


ok thank you i saved all those, and i will read for those : )


The #leiningen channel might be helpful if you want to dig into checkouts


(apologies for Lazarus’ing this thread) this is a good use case for (which supports Leiningen, amongst other build tools).


thank you pmonks looks useful alot, i saw it in the past i will re-check it.


also if i deploy a specific version (snapshot or not), can i overwrite that version?


i used clojars in the past, but i cant say i understand all things, any link is welcomed , i read the tutorial now on wiki of clojars