clojars

Takis_ 2021-11-02T20:09:53.009800Z

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

Takis_ 2021-11-07T12:16:39.022200Z

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

deactivateduser 2021-11-03T20:44:20.018900Z

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

seancorfield 2021-11-02T20:16:41.012100Z

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

Takis_ 2021-11-02T20:17:23.012300Z

Leiningen

seancorfield 2021-11-02T20:17:37.012500Z

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.

seancorfield 2021-11-02T20:17:55.012700Z

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

seancorfield 2021-11-02T20:19:12.012900Z

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.

Takis_ 2021-11-02T20:19:41.013100Z

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

seancorfield 2021-11-02T20:20:18.013400Z

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.

phronmophobic 2021-11-02T20:20:56.013600Z

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

seancorfield 2021-11-02T20:21:13.013800Z

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).

2021-11-02T20:21:48.014Z

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: https://repo.clojars.org/com/flipkart/aesop/runtime-snapshot-serializer/1.1.0-SNAPSHOT/

seancorfield 2021-11-02T20:21:48.014200Z

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

seancorfield 2021-11-02T20:22:42.014400Z

@tcrawley @smith.adriane Remind me, when/how often does lein check for an updated SNAPSHOT? Is it just once a day?

Takis_ 2021-11-02T20:23:03.014600Z

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

2021-11-02T20:23:04.014800Z

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

2021-11-02T20:23:25.015Z

I don't know what the SNAPSHOT refresh frequency is

phronmophobic 2021-11-02T20:23:37.015200Z

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

Takis_ 2021-11-02T20:25:05.015500Z

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

Takis_ 2021-11-02T20:25:15.015700Z

i will read about those and see : )

👍 1
Takis_ 2021-11-02T20:26:14.016Z

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

phronmophobic 2021-11-02T20:28:43.016200Z

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

Takis_ 2021-11-02T20:30:19.016400Z

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

seancorfield 2021-11-02T20:42:09.016600Z

@takis_ 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.

seancorfield 2021-11-02T20:45:27.016800Z

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

Takis_ 2021-11-02T20:45:57.017Z

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

seancorfield 2021-11-02T20:46:33.017200Z

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

Takis_ 2021-11-02T20:10:54.011Z

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

Takis_ 2021-11-02T20:11:31.011900Z

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