tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
dpsutton 2021-05-19T20:29:36.003400Z

was there a way to specify other aliases to use inside of an alias? I feel like i've both seen that and also heard that's explicitly not a thing

seancorfield 2021-05-19T20:31:10.003700Z

You mean for “aliases as data”?

seancorfield 2021-05-19T20:33:00.005500Z

The :paths/`:extra-paths` can use aliases instead of strings as I recall. I think you can also specify :exec-args as an alias (which is defined elsewhere as a hash map). And some tooling allows for specific exec args to be aliases that get looked up (`depstar` does, I think deps-deploy does too).

dpsutton 2021-05-19T20:33:41.005900Z

kinda copying from a coworker. it's more an inheritance thing.

dpsutton 2021-05-19T20:34:17.006300Z

> With deps.edn is there a way top make an alias inherit from another alias? For example in Leiningen we have the :eastwood profile which includes :linters-common which in turn includes :include-all-drivers, :ee, and :test-common. > I know you can give it a list of aliases in the CLI but I wouldn't want to have to either type clojure -M:include-all-drivers:ee:test-common:eastwood > or just have the :eastwood alias duplicate everything in the :include-all-drivers, :ee, and :test-common aliases

seancorfield 2021-05-19T20:37:21.006500Z

No, there’s no such feature.

seancorfield 2021-05-19T20:37:30.006700Z

(but it’s commonly requested 🙂 )

dpsutton 2021-05-19T20:38:35.007Z

yeah. perhaps on june 5th 🙂

borkdude 2021-05-19T21:00:28.008600Z

@dpsutton FWIW, I made a task runner in babashka that solves these kinds of issues for me (typing long combinations of aliases or hard-to-remember combinations)

dpsutton 2021-05-19T21:00:57.008900Z

yeah been eyeing that for sure.

seancorfield 2021-05-19T21:02:41.009500Z

@borkdude How does your task runner solve that issue?

borkdude 2021-05-19T21:04:35.010100Z

@seancorfield Here is a brief example: https://github.com/borkdude/jayfu/blob/main/bb.edn#L6-L10 When you type bb tasks you get an overview of all available tasks in the project: https://github.com/borkdude/jayfu#tasks

dpsutton 2021-05-19T21:05:42.010700Z

and you would string join some def'ed common aliases?

borkdude 2021-05-19T21:05:50.010900Z

sure, why not

borkdude 2021-05-19T21:06:29.011100Z

Full docs are here: https://book.babashka.org/#tasks

seancorfield 2021-05-19T21:13:35.012200Z

Ah, so you’d have a task that does apply clojure and the list of aliases. That’s kinda side-stepping the issue by using something outside the Clojure CLI though.

seancorfield 2021-05-19T21:15:06.014Z

That’s essentially what our build shell script does: you say build test subproject and it calls clojure with a bunch of aliases because it knows how to expand test in relation to subproject.

borkdude 2021-05-19T21:16:17.014800Z

Correct. At work most of our projects have already been ported to the bb task runner so we have a unified way of running things

seancorfield 2021-05-19T21:16:18.014900Z

build test lowlevel
=> 
/var/www/worldsingles/build/clojure/bin/clojure -J-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory -X:lowlevel:test:lowlevel-test:runner

vemv 2021-05-19T22:29:48.016300Z

what should be used instead of the deprecated t.d.alpha/make-classpath? the defns that its impl uses are not deprecated. is it a good idea to simply copy defn make-classpath?

vemv 2021-05-19T22:30:21.016700Z

oh whoops, it's asked right above. didn't expect that ^^

seancorfield 2021-05-19T22:44:26.017500Z

@vemv I’ve just been using calc-basis since that produces “all” the information you might need for pretty much any t.d.a operation.

🙂 1