Fork me on GitHub
#tools-deps
<
2020-08-03
>
cfleming04:08:08

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.

cfleming04:08:31

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.

seancorfield04:08:28

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

cfleming04:08:31

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).

Alex Miller (Clojure team)04:08:19

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

cfleming04:08:58

Yep, that was what I had assumed.

cfleming04:08:14

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"]}}

cfleming04:08:05

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

seancorfield04:08:46

@U064X3EF3 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?

Alex Miller (Clojure team)12:08:55

@seancorfield not sure what you mean about overriding

Alex Miller (Clojure team)12:08:21

This is about giving names to sunsets of paths

Alex Miller (Clojure team)12:08:52

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

seancorfield16:08:23

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.

seancorfield16:08:54

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" 🙂

Alex Miller (Clojure team)17:08:18

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

Alex Miller (Clojure team)17:08:54

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

seancorfield17:08:27

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.

Alex Miller (Clojure team)17:08:34

then you should not do it :)

seancorfield04:08:05

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

seancorfield04:08:21

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

borkdude07:08:34

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

Janne Sauvala11:08:17

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

Alex Miller (Clojure team)12:08:44

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

😄 3
borkdude12:08:57

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

borkdude12:08:28

Nm, I found it :)

vlaaad08:08:48

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

dominicm11:08:27

I think it was script