tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
cfleming 2020-08-03T04:08:08.025200Z

With the new :paths alias data feature, I’m assuming that those aliases are just fished directly out of the :aliases map in the (combined system/user/project) deps.edn map? i.e. there’s no alias selection done based on which aliases are passed by the user, or anything like that.

alexmiller 2020-08-03T12:07:42.037900Z

Seems right

seancorfield 2020-08-03T04:09:28.025600Z

@cfleming That's my understanding based on playing with it a bit.

cfleming 2020-08-03T04:10:31.027Z

Thanks @seancorfield. It gets a little confusing in the case of :extra-paths - those are calculated using the provided aliases, but then their alias values are taken from the raw map (I think).

alexmiller 2020-08-03T12:03:30.035100Z

@cfleming right

alexmiller 2020-08-03T12:03:55.035700Z

@seancorfield not sure what you mean about overriding

alexmiller 2020-08-03T12:04:21.036300Z

This is about giving names to sunsets of paths

alexmiller 2020-08-03T12:04:28.036600Z

Subsets

alexmiller 2020-08-03T12:05:52.037500Z

One important place these names show up is in the classpath data in the basis

seancorfield 2020-08-03T16:54:23.039700Z

By "override" I meant that project aliases override user-level, and you can further override those on the command-line -- so I was thinking that you could provide a new :clj-paths alias on the command-line to "override" a :clj-paths alias in the project deps.edn.

seancorfield 2020-08-03T16:54:54.039900Z

Like I say, I'm still not seeing much benefit in that feature yet, so I assume there's a "bigger picture" and it will make more sense "soon" 🙂

alexmiller 2020-08-03T17:22:18.040100Z

you could do all that but I do not have any use case in mind where that would be a good idea

alexmiller 2020-08-03T17:22:54.040300Z

better to manipulate with a -C alias modifying :extra-paths or overrides

seancorfield 2020-08-03T17:46:27.040500Z

Aye, and that's what I would tend to do -- so, again, I'm not seeing much benefit in being able to specify parts of paths etc as aliases right now.

alexmiller 2020-08-03T17:54:34.040700Z

then you should not do it :)

seancorfield 2020-08-03T04:11:05.027700Z

I guess you can supply new values via the command-line (`-Sdeps`) but I don't see much value in it as it stands.

seancorfield 2020-08-03T04:12:21.028100Z

I assume it's part of a bigger picture that we don't have all the pieces of yet...

alexmiller 2020-08-03T04:44:56.028300Z

Right

alexmiller 2020-08-03T04:46:19.030100Z

In the latter question, aliases should be resolved from the merged edn map, same as paths. But maybe I’m not getting some nuance of your question

cfleming 2020-08-03T04:46:58.030400Z

Yep, that was what I had assumed.

cfleming 2020-08-03T04:47:14.030600Z

So using this map:

{:paths ["src" :clj-paths :resource-paths]
 :aliases {:clj-paths ["src2"]
           :resource-paths ["resources"]
           :moar {:extra-paths ["src3" :moar-paths]}
           :moar-paths ["src4"]}}

cfleming 2020-08-03T04:48:05.030800Z

src, src2 and resources will always be selected. src3 and src4 will be selected if the user has chosen to use the moar alias.

cfleming 2020-08-03T04:50:31.031Z

One further question: Cursive also shows aliases that the user can select in a tool window, which allows the user to decide which source paths etc should be synced to their project. I assume it doesn’t make sense to show these aliases there, i.e. it only makes sense to show those aliases whose value is a map.

seancorfield 2020-08-03T04:51:46.031500Z

@alexmiller It feels like this is part of a bigger picture that we don't have all the pieces of -- since the alias references in ;paths etc is all static at the moment, so you can't actually override any of it yet?

borkdude 2020-08-03T07:40:34.031900Z

What does -S stand for? Just a random name?

vlaaad 2020-08-03T08:08:48.033200Z

I just went through deps guide and reference searching for words starting with "s". My guess is it means "Some option" or "Specify"

dominicm 2020-08-03T11:08:27.033400Z

I think it was script

Janne Sauvala 2020-08-03T11:58:17.034300Z

Based on all the comments I guess it stands for “something” 😁

alexmiller 2020-08-03T12:07:56.038200Z

Setting

😲 1
alexmiller 2020-08-03T12:08:05.038500Z

Setting

borkdude 2020-08-03T12:10:26.038600Z

Riiight

alexmiller 2020-08-03T12:30:44.038800Z

but "something" or "stuff" is pretty good too :)

😄 1
borkdude 2020-08-03T12:54:37.039Z

🙂

borkdude 2020-08-03T12:54:57.039200Z

Btw, I have wondered how you prevent :) turning into an emoticon. Is that a setting?

borkdude 2020-08-03T12:55:28.039400Z

Nm, I found it :)