Fork me on GitHub
#tools-deps
<
2021-05-19
>
dpsutton20:05:36

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

seancorfield20:05:10

You mean for “aliases as data”?

seancorfield20:05:00

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

dpsutton20:05:41

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

dpsutton20:05:17

> 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

seancorfield20:05:21

No, there’s no such feature.

seancorfield20:05:30

(but it’s commonly requested 🙂 )

dpsutton20:05:35

yeah. perhaps on june 5th 🙂

borkdude21:05:28

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

dpsutton21:05:57

yeah been eyeing that for sure.

seancorfield21:05:41

@borkdude How does your task runner solve that issue?

borkdude21:05:35

@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

dpsutton21:05:42

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

borkdude21:05:50

sure, why not

seancorfield21:05:35

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.

seancorfield21:05:06

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.

borkdude21:05:17

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

seancorfield21:05:18

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

vemv22:05:48

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?

vemv22:05:21

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

seancorfield22:05:26

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

🙂 2