tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
practicalli-john 2021-05-12T03:30:44.131300Z

No problems so far, thank you.

2021-05-12T15:56:40.132100Z

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.

2021-05-12T15:57:49.132200Z

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

2021-05-12T16:00:09.132400Z

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.

2021-05-12T16:06:31.132600Z

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.

2021-05-12T16:11:18.132900Z

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

alexmiller 2021-05-12T16:12:00.133200Z

that is correct

alexmiller 2021-05-12T16:13:42.133400Z

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

1
2021-05-12T16:29:26.133700Z

Oh, thanks! That helps out a lot!

2021-05-12T16:44:05.134200Z

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

2021-05-12T16:44:24.134500Z

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

alexmiller 2021-05-12T17:26:54.134700Z

make-classpath-map is the replacement

alexmiller 2021-05-12T17:27:08.135100Z

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

alexmiller 2021-05-12T17:27:17.135400Z

so kind of depends what you need

2021-05-12T17:40:21.136100Z

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.

alexmiller 2021-05-12T18:02:49.136600Z

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

alexmiller 2021-05-12T19:06:51.136800Z

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

alexmiller 2021-05-12T20:09:14.137100Z

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

seancorfield 2021-05-12T20:17:31.137600Z

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

alexmiller 2021-05-12T20:18:37.137800Z

yeah

practicalli-john 2021-05-12T23:03:07.139100Z

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

alexmiller 2021-05-12T23:16:29.139400Z

well, I should have tested it better :)