tools-deps 2024-02-19

Small typo, on the doc page? At the bottom of here: https://clojure.org/guides/deps_and_cli#list_deps It says

clj -X:deps list '[:alias1 :alias2]'
But from my testing, it seems to need
clj -X:deps list '{:aliases [:alias1 :alias2]}'

for me, clj -X:deps list '{:aliases "[:test]"}' is identical to without that option

next-jdbc on  develop [?] via ☕ v21.0.2 on ☁️  metabase-query took 2s
❯ clj -X:deps list '{:aliases "[:test]"}'
camel-snake-kebab/camel-snake-kebab 0.4.3  (EPL-1.0)
org.clojure/clojure 1.11.1  (EPL-1.0)
org.clojure/core.specs.alpha 0.2.62  (EPL-1.0)
org.clojure/java.data 1.0.95  (EPL-1.0)
org.clojure/spec.alpha 0.3.218  (EPL-1.0)
org.clojure/tools.logging 1.2.1  (EPL-1.0)

next-jdbc on  develop [?] via ☕ v21.0.2 on ☁️  metabase-query
❯ clj -X:deps list
camel-snake-kebab/camel-snake-kebab 0.4.3  (EPL-1.0)
org.clojure/clojure 1.11.1  (EPL-1.0)
org.clojure/core.specs.alpha 0.2.62  (EPL-1.0)
org.clojure/java.data 1.0.95  (EPL-1.0)
org.clojure/spec.alpha 0.3.218  (EPL-1.0)
org.clojure/tools.logging 1.2.1  (EPL-1.0)

but

❯ clj -X:deps list :aliases "[:test]"
camel-snake-kebab/camel-snake-kebab 0.4.3  (EPL-1.0)
com.fasterxml.jackson.core/jackson-annotations 2.13.2  (Apache-2.0)
com.fasterxml.jackson.core/jackson-core 2.13.2  (Apache-2.0)
com.fasterxml.jackson.core/jackson-databind 2.13.2.1  (Apache-2.0)
com.github.stephenc.jcip/jcip-annotations 1.0-1  (Apache-2.0)
com.google.protobuf/protobuf-java 3.19.4  (BSD-3-Clause-Attribution)
com.h2database/h2 2.1.214  (MPL 2.0)
com.mchange/c3p0 0.9.5.5  (GNU Lesser General Public License, Version 2.1)
com.mchange/mchange-commons-java 0.2.19  (GNU Lesser General Public License, Version 2.1)
is the standard convention for -X invocation and works for me

clj --version
Clojure CLI version 1.11.1.1435

# use the invocation from the docs
clj -X:deps tree '[:test-dependencies]'
Key is missing value: [:test-dependencies]

hi jeff! yeah. you need to provide key value pairs

clj -X:deps list :aliases "[:test]" here i use :aliases. What key should go with [:test-dependencies]?

Sorry, that’s from my own project. Same result with the example from the doc

My only point is that where is says

clj -X:deps list '[:alias1 :alias2]'
It should probably say
clj -X:deps list :aliases '[:alias1 :alias2]'

👍 1

I suspect for most who reach the last sentence of the docs, it’s obvious, but I’m still (slowly) getting my head around deps

yeah you are right. your first message wasn’t that though

clj -X:deps list '{:aliases [:alias1 :alias2]}'
that’s what i wanted to correct

👍 1
Alex Miller (Clojure team) 2024-02-19T19:54:03.816029Z

Will fix, thx