tools-deps

2024-02-19T19:36:43.277399Z

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]}'

dpsutton 2024-02-19T19:46:13.377209Z

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)

dpsutton 2024-02-19T19:46:37.689379Z

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

2024-02-19T19:47:41.307219Z

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]

2024-02-19T19:47:43.644839Z

Also, hi Dan!

dpsutton 2024-02-19T19:48:36.357909Z

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

dpsutton 2024-02-19T19:49:43.929909Z

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

2024-02-19T19:50:18.381549Z

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

2024-02-19T19:50:51.028799Z

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
2024-02-19T19:51:17.462339Z

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

dpsutton 2024-02-19T19:51:30.267669Z

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