Fork me on GitHub
#tools-deps
<
2021-05-12
>
Joshua Suskalo15:05:40

When calling resolve-deps, are all the aliases included in the deps-map assumed to be active? That seems like that'd be the only reasonable semantic to me, but I'm not sure.

delaguardo15:05:49

aliases might have overlapping deps, so the answer is - no, resolve-deps expect you to specify which aliases to use

Joshua Suskalo16:05:09

How's that done? The resolve-deps function takes a deps map with an :aliases key, but doesn't have any way to specify which of the aliases are active in the args-map or other arguments.

delaguardo16:05:31

https://github.com/clojure/tools.deps.alpha/blob/444b99b5d6b18e308d9a5817c8f07dc88a0bde2f/src/main/clojure/clojure/tools/deps/alpha.clj#L492 take a look. this function is looking only at :deps key. So I think resolve-deps function is just a part of resolution procedure which is taking care about used aliases.

delaguardo16:05:18

https://github.com/clojure/tools.deps.alpha/blob/9bf5778dc26dd5018dbf04fc8e7dbb32ddc4036c/src/main/clojure/clojure/tools/deps/alpha.clj#L184-L190 so I think before using resolve-deps you shoul use combine-aliases function to build second argument for resolve-deps

Alex Miller (Clojure team)16:05:42

which deps.edns to merge and which aliases to use will depend on the scenario so this is outside calc-basis/resolve-deps

thumbsup_all 2
Joshua Suskalo16:05:26

Oh, thanks! That helps out a lot!

Joshua Suskalo16:05:05

I see make-classpath is deprecated. Is there something preferred to be used?

Joshua Suskalo16:05:24

Just calc-basis and getting the classpath off of it?

Alex Miller (Clojure team)17:05:54

make-classpath-map is the replacement

Alex Miller (Clojure team)17:05:08

but also, calc-basis returns both a map of classpath data and just the cp

Alex Miller (Clojure team)17:05:17

so kind of depends what you need

Joshua Suskalo17:05:21

Alright. I definitely just need the classpath because I'm producing something to pass to the java compiler, but if calc-basis is preferred, I can definitely use that.

Alex Miller (Clojure team)18:05:49

if calc-basis serves your needs, I would use that over the fine-grained functions

Alex Miller (Clojure team)19:05:51

New release of Clojure CLI https://clojure.org/releases/tools#v1.10.3.833, just some relatively minor changes: • https://clojure.atlassian.net/browse/TDEPS-177 - Fix Maven mirrors to look up by id, not name • Remove flag when fetching git deps so that older git versions work • Tweak some warning messages • Clean up scripts to simplify variable replacement

Alex Miller (Clojure team)20:05:14

apologies, that was broken for linux - 1.10.3.839 is now available

seancorfield20:05:31

Ah, I guess I didn’t notice because I use brew on Linux to manage my Clojure CLI stuff?

practicalli-johnny23:05:07

I always use the Linux install, but I rarely use the clj wrapper script. I'll try remember to test a pre-release with clj as well next time

Alex Miller (Clojure team)23:05:29

well, I should have tested it better :)