tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
2021-06-28T23:07:20.395400Z

Does anyone know if it's possible for deps.edn aliases to refer to or reuse each other? This would be pretty handy in certain scenarios, but doesn't seem to be possible. https://stackoverflow.com/questions/68170875/how-do-you-refer-to-or-reuse-one-alias-from-another-using-deps-edn

2021-06-29T19:41:44.409700Z

> Once you can have an alias depend on another, what is the precedence of any conflicting configs between aliases? Would we also need to have an excludes mechanism, as with dependencies? This is a great question/point! This is one clear argument for using a vector of aliases to be referred to instead of a set. Then "last wins", just as when you explicitly list several aliases in a cli invocation.

2021-06-29T19:43:33.409900Z

However, I don't know if much more is needed really. As long as there's no cycles (which should be an error), seems like you can simply resolve each alias by itself, and chain together the data from each such resolution at the next level up the tree using order for precedence, etc.

2021-06-29T19:45:30.410100Z

I think in many cases you are correct that explicitly listing out aliases may be advantageous. But I'd argue there are many others where it's pretty harmless, and saves folks a docs headache realizing that "oh, the alias I was trying to use doesn't work because I needed to include this other alias..."

practicalli-john 2021-06-29T21:06:41.410300Z

I have not experienced any docs headache when creating over 30 aliases for https://github.com/practicalli/clojure-deps-edn So I am afraid I am not able to relate to this point

seancorfield 2021-06-28T23:18:50.396100Z

@metasoarous It is not possible. But it is something people have requested quite often. You can vote for it here https://ask.clojure.org/index.php/10564/specify-an-alias-that-is-a-set-of-other-aliases

👍 1
seancorfield 2021-06-28T23:26:26.397300Z

We currently run our monorepo build script with clojure -M:build:everything:dev:test:runner build.clj ... and it sure would be nice to have :build be able to automatically "include" :everything:dev:test:runner!

✔️ 2
2021-06-28T23:33:24.397600Z

Thanks for confirming, and pointing to the ticket!