This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-19
Channels
- # aleph (11)
- # announcements (1)
- # babashka (9)
- # beginners (90)
- # calva (6)
- # clj-kondo (24)
- # cljs-dev (26)
- # clojure (92)
- # clojure-europe (48)
- # clojure-nl (1)
- # clojure-spec (4)
- # clojure-sweden (2)
- # clojure-uk (41)
- # clojurescript (60)
- # code-reviews (1)
- # conjure (6)
- # core-logic (3)
- # datascript (1)
- # datomic (3)
- # deps-new (1)
- # depstar (4)
- # dirac (3)
- # emacs (8)
- # fulcro (1)
- # helix (27)
- # introduce-yourself (2)
- # jobs (1)
- # off-topic (4)
- # pathom (2)
- # polylith (8)
- # re-frame (3)
- # remote-jobs (1)
- # shadow-cljs (5)
- # spacemacs (2)
- # tools-deps (22)
- # vim (3)
- # xtdb (27)
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
You mean for “aliases as data”?
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).
> 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
No, there’s no such feature.
(but it’s commonly requested 🙂 )
@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)
@borkdude How does your task runner solve that issue?
@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
Full docs are here: https://book.babashka.org/#tasks
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.
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
.
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
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
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 I’ve just been using calc-basis
since that produces “all” the information you might need for pretty much any t.d.a operation.