Fork me on GitHub
#tools-deps
<
2020-04-04
>
cfleming00:04:53

How does deps handle snapshot versions? There doesn’t seem to be any setting for how often repos should be checked for new snapshots. Is there even any concept of a snapshot version in deps?

seancorfield00:04:11

I thought the underlying Maven library checked snapshots once a day?

cfleming00:04:21

I’m not sure. It can be configured, using lein it can be set to :daily, :always or :never: https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L117

cfleming00:04:42

Deps doesn’t seem to have a knob for that and I’m not sure what the default is.

hiredman01:04:36

I think snapshot builds may be fundamentally incompatible with how tools deps caches the built classpath

hiredman01:04:12

Or, I guess what is more likely is tools deps checks every time it needs to rebuild the cache, but if the classpath is cached and doesnt need rebuilding you'll never get a new snapshot

seancorfield01:04:19

Hmm, yeah, that makes sense. I guess the "knob" there is that you can -Sforce a rebuild of the classpath. I know Alex has said in the past that "RELEASE" and "LATEST" fly in the face of the stability that deps.edn is aiming for...

cfleming05:04:53

Yeah, I did wonder if deps might be philosophically opposed to them. If hiredman is correct that explains what some people are seeing in Cursive (very slow launches of REPLs) since Cursive doesn’t use the classpath caching.

ghadi13:04:48

RELEASE & LATEST and origin/master are mutable references SHAs are values

Alex Miller (Clojure team)14:04:05

Snapshots are checked daily by default and there is no knob to change that atm

Alex Miller (Clojure team)14:04:12

-Sforce will NOT force a recheck (although I’ve thought about making that flag also trigger update always so it would)

Alex Miller (Clojure team)14:04:55

The only real way to force a snapshot to update right now is to rm from your m2 repository AND -Sforce

Alex Miller (Clojure team)14:04:52

I don’t see how snapshots would be any more likely to cause slowness than any other version

cfleming20:04:09

This can happen with lein if it’s configured to check for new versions always. That means every project resolve will hit the remote repo for every snapshot dep.

Alex Miller (Clojure team)23:04:30

Ah, yeah. Should just be daily w deps

athomasoriginal19:04:00

Compiling a CLJS program and running a CLJS repl is straightforward enough with

clj --main cljs.main --compile ns.name.here --repl
However, if I want to run a cljs socket repl so I can connect my editor to it (Atom) I cam up with these two options Option 1
; compile cljs
clj --main cljs.main --watch "src" --compile ns.name.here

; run a socket repl
clj -J-Dclojure.server.browser="{:port 4444 :accept cljs.server.browser/repl}"
Option 2
; do both in one command
clj -J-Dclojure.server.browser="{:port 4444 :accept cljs.server.browser/repl}" -- --main cljs.main --watch "src" --compile ns.name.here
I’m now wondering if there is a better option which I missed? 🙈