Fork me on GitHub
#tools-deps
<
2019-08-21
>
Alex Miller (Clojure team)20:08:48

clj 1.10.1.469 and tools.deps.alpha 0.7.541 released...

Alex Miller (Clojure team)20:08:57

- FIX: exclusions were not canonicalized and could fail to match and exclude
- PERF: cache Maven session and use Maven session cache
- FIX: Remove slf4j-nop as dependency of tools.deps.alpha

Alex Miller (Clojure team)20:08:23

if you're a user of tools.deps.alpha, you can now define Maven session boundaries around your use of tools.deps.alpha by wrapping clojure.tools.deps.alpha.util.session/with-session around one or more calls into tda (see https://github.com/clojure/tools.deps.alpha/blob/master/src/main/clojure/clojure/tools/deps/alpha/script/make_classpath.clj#L58 for example)

Alex Miller (Clojure team)20:08:16

you may also need to add slf4j-nop as a dep if you were previously relying on getting it via tools.deps.alpha

seancorfield23:08:15

@alexmiller Under what circumstances might I expect with-session to make a difference?

seancorfield23:08:50

I just updated clj-new to use the latest t.d.a and wrapped the pair of t.d.a calls in that, but saw pretty much no difference in time spent generating a template (from an empty M2 repository each time).

(session/with-session
    (-> (deps/resolve-deps deps resolve-args)
        (deps/make-classpath (:paths deps) {})
        (str/split (re-pattern java.io.File/pathSeparator))
        (->> (run! pom/add-classpath)))))

Alex Miller (Clojure team)23:08:57

It will only help if you’re talking to repos of course

Alex Miller (Clojure team)23:08:15

But in particular it makes a difference taking to s3 as it’s slow

Alex Miller (Clojure team)23:08:12

For building a large classpath (without cp cache), when talking to s3 it was as much as 50% better

Alex Miller (Clojure team)23:08:29

And in other cases, no observable difference

seancorfield23:08:55

Ah, OK. So it's harmless at worst, and might be helpful for some small class of clj-new users...?