Fork me on GitHub
#tools-deps
<
2018-07-17
>
martinklepsch13:07:16

Is there a way to specify an entirely different set of :deps for an alias? (i.e. no merge, no override, just different value)

martinklepsch13:07:58

@dominicm not sure I understand what you mean by context? 😄

martinklepsch13:07:03

I’d like to swap out the value of :deps in the top level map by another value via an alias

dominicm13:07:31

So from the clj command line use? What's the use case?

ghadi14:07:58

:override-deps should do it, but I think there is an acknowledged bug when the override is of a different "type" (mvn/git)

dominicm14:07:42

@ghadi I think @martinklepsch means that he wants to have:

{:deps {A {:mvn/version "1.1.0"}}
 :aliases {:B {:the-new-deps {B {:mvn/version "5.4.1"}}}}}
And when doing clj -A:B that should result in only B being on the classpath

ghadi15:07:18

I think this has come up before -- not supported by aliases, but perhaps by a different deps.edn file

dominicm15:07:23

I don't understand why you'd practically need that though 🙂

dominicm15:07:35

I suppose you could actually have:

{:deps {}
 :aliases {:A {:extra-deps {A …}} :B {:extra-deps {B …}}}}

martinklepsch15:07:57

yeah aliases would work I think

martinklepsch15:07:30

I’m not 100% sure I need it either but I come up with some approaches and have no idea what tools-deps allows for so just asking 😄 sorry for the noise 🙂

ghadi15:07:29

no problem @martinklepsch not noise at all

ghadi15:07:49

It does seem a bit "off-label prescription"

ghadi15:07:55

(the use case)

martinklepsch15:07:49

@ghadi cool, thanks 🙂

martinklepsch15:07:15

If I specify a deps.edn with -Sdeps any local deps.edn in the working directory should be ignored — is that correct?

dominicm15:07:51

No, though others have tripped over that wording too.

martinklepsch15:07:58

uh, yeah, especially that “final” part: “Deps data to use as the final deps file”

martinklepsch15:07:16

is there another way to achieve it then? specifying a file would also be fine, just looking for something that ignores an existing deps.edn

dominicm16:07:00

Final in the context of merging together deps.edn files 🙂

martinklepsch17:07:55

Hm, the word “final” creates a different expectation for me 😄 So is the only way to run a clj process with a deps.edn that’s different than the one in the current working directory to move files around?

dominicm18:07:46

I think the proposal was to change it to last.

dominicm18:07:44

Not that I know of. I think pack is unique in utilizing tools.deps.alpha in that way, and I'm not sure it really works due to the cwd being internal to t.d.a rather than passed in.

martinklepsch18:07:48

Maybe another option could be added

dominicm19:07:40

How well does that work in shells?

Alex Miller (Clojure team)22:07:11

I was actually kidding :)