How to list dependencies for an alias?

How to list dependencies for an alias?

Problem Description:

Assume I have this config.edn:

{:deps {org.clojure/clojure {:mvn/version "1.11.1"}}
 :aliases {:dev {:extra-deps {org.clojure/tools.namespace {:mvn/version "1.3.0"}}}}}

How can I list dependencies in a way that extra-deps from dev alias are included too?

$ clj -X:dev:deps list
org.clojure/clojure 1.11.1  (EPL-1.0)
org.clojure/core.specs.alpha 0.2.62  (EPL-1.0)
org.clojure/spec.alpha 0.3.218  (EPL-1.0)

Solution – 1

If you run clj -X:deps help/doc and scroll to the function, you’ll see that it supports an extra :aliases argument.

So you can use something like clj -X:deps list :aliases '[:dev]'.

Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.