Skip to content

Commit

Permalink
clojure-cli: clojure -X:deps list examples
Browse files Browse the repository at this point in the history
Add example output from deps list command

Update deps list command for aliases
  • Loading branch information
practicalli-johnny committed Nov 19, 2023
1 parent af2da26 commit 8b8d63e
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- intro: enhance clojure examples and simplify format for experimenting with code
- dev: checkout action v4 in all GitHub workflow
- clojure-cli: add `clojure -X:deps mvn-pom` built-in command description
- clojure-cli: `clojure -X:deps list` examples

## Changed
- mkdocs: emoji extension name update for Material 9.4
Expand Down
173 changes: 169 additions & 4 deletions docs/clojure-cli/built-in-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,185 @@

## List full dependencies

Report on the depenencies of a project and any included aliases, including the transitive dependencies (dependencies of dependencies).
List the library depenencies of a project, including the library version and software licence for each library.

Show the full dependencies for the project
The list includes the transitive dependencies, library dependencies of the project library dependencies.

The `aliases` argument will also list library dependencies from a given alias, either project alias or user alias.

```shell
clojure -X:deps list
```

Show the full dependencies for the project and the `:dev/reloaded` alias which could be useful if there are library conflicts when using an alias (unlikely but it could happen).
??? EXAMPLE "Dependency list from Practicalli Service project template"
```shell
❯ clojure -X:deps list
aero/aero 1.1.6 (MIT)
amalloy/ring-buffer 1.3.1 (EPL-1.0)
aysylu/loom 1.0.2 (EPL-1.0)
borkdude/dynaload 0.2.2 (EPL-1.0)
borkdude/edamame 0.0.18 (EPL-1.0)
com.bhauman/spell-spec 0.1.2 (EPL-1.0)
com.brunobonacci/mulog 0.9.0 (Apache-2.0)
com.brunobonacci/mulog-adv-console 0.9.0 (Apache-2.0)
com.brunobonacci/mulog-json 0.9.0 (Apache-2.0)
com.cnuernber/charred 1.010
com.cognitect/transit-clj 1.0.324 (Apache-2.0)
com.cognitect/transit-java 1.0.343 (Apache-2.0)
com.fasterxml.jackson.core/jackson-annotations 2.12.1 (Apache-2.0)
com.fasterxml.jackson.core/jackson-core 2.12.1 (Apache-2.0)
com.fasterxml.jackson.core/jackson-databind 2.12.1 (Apache-2.0)
com.fasterxml.jackson.datatype/jackson-datatype-jsr310 2.12.0 (Apache-2.0)
com.google.javascript/closure-compiler v20151015 (Apache-2.0)
com.googlecode.json-simple/json-simple 1.1.1 (Apache-2.0)
commons-codec/commons-codec 1.15 (Apache-2.0)
commons-fileupload/commons-fileupload 1.4 (Apache-2.0)
commons-io/commons-io 2.6 (Apache-2.0)
crypto-equality/crypto-equality 1.0.0 (EPL-1.0)
crypto-random/crypto-random 1.2.0 (EPL-1.0)
expound/expound 0.9.0 (EPL-1.0)
fipp/fipp 0.6.25 (EPL-1.0)
http-kit/http-kit 2.6.0 (Apache-2.0)
javax.xml.bind/jaxb-api 2.3.0 (CDDL 1.1)
lambdaisland/deep-diff 0.0-47 (EPL-1.0)
meta-merge/meta-merge 1.0.0 (EPL-1.0)
metosin/jsonista 0.3.1 (EPL-1.0)
metosin/malli 0.7.5 (EPL-2.0)
metosin/muuntaja 0.6.8 (EPL-1.0)
metosin/reitit 0.5.13 (EPL-1.0)
metosin/reitit-core 0.5.18 (EPL-1.0)
metosin/reitit-dev 0.5.18 (EPL-1.0)
metosin/reitit-frontend 0.5.13 (EPL-1.0)
metosin/reitit-http 0.5.13 (EPL-1.0)
metosin/reitit-interceptors 0.5.13 (EPL-1.0)
metosin/reitit-malli 0.5.13 (EPL-1.0)
metosin/reitit-middleware 0.5.13 (EPL-1.0)
metosin/reitit-ring 0.5.13 (EPL-1.0)
metosin/reitit-schema 0.5.13 (EPL-1.0)
metosin/reitit-sieppari 0.5.13 (EPL-1.0)
metosin/reitit-spec 0.5.13 (EPL-1.0)
metosin/reitit-swagger 0.5.13 (EPL-1.0)
metosin/reitit-swagger-ui 0.5.13 (EPL-1.0)
metosin/ring-swagger-ui 3.36.0 (EPL-1.0)
metosin/schema-tools 0.12.3 (EPL-1.0)
metosin/sieppari 0.0.0-alpha13 (EPL-1.0)
metosin/spec-tools 0.10.5 (EPL-1.0)
mvxcvi/arrangement 2.0.0 (Public Domain)
mvxcvi/puget 1.1.2 (Public Domain)
org.clojure/clojure 1.11.1 (EPL-1.0)
org.clojure/clojurescript 1.7.170 (EPL-1.0)
org.clojure/core.rrb-vector 0.0.14 (EPL-1.0)
org.clojure/core.specs.alpha 0.2.62 (EPL-1.0)
org.clojure/data.json 0.2.6 (EPL-1.0)
org.clojure/data.priority-map 0.0.5 (EPL-1.0)
org.clojure/google-closure-library 0.0-20151016-61277aea (Apache-2.0)
org.clojure/google-closure-library-third-party 0.0-20151016-61277aea (Apache-2.0)
org.clojure/java.classpath 1.0.0 (EPL-1.0)
org.clojure/spec.alpha 0.3.218 (EPL-1.0)
org.clojure/test.check 1.1.1 (EPL-1.0)
org.clojure/tools.namespace 1.3.0 (EPL-1.0)
org.clojure/tools.reader 1.3.6 (EPL-1.0)
org.javassist/javassist 3.18.1-GA (MPL 1.1)
org.mozilla/rhino 1.7R5 (Mozilla Public License, Version 2.0)
org.msgpack/msgpack 0.6.12 (Apache-2.0)
party.donut/system 0.0.202
prismatic/schema 1.1.12 (EPL-1.0)
ring/ring-codec 1.1.3 (MIT)
ring/ring-core 1.9.1 (MIT)
tailrecursion/cljs-priority-map 1.2.1 (EPL-1.0)
tech.droit/clj-diff 1.0.1 (EPL-1.0)
```

Use the `:aliases` option to also include the dependencies from a project or user alias. Showing the dependencies from an aliase can useful to identify conflicting dependencies when using an alias (unlikely but it could happen).

```shell
clojure -X:dev/reloaded:deps list
clojure -X:deps list :aliases '[:dev/reloaded]'
```

??? EXAMPLE "Dependency list from project and Practicalli :dev/reloaded alias"
```shell
❯ clojure -X:deps list :aliases '[:dev/reloaded]'
aero/aero 1.1.6 (MIT)
amalloy/ring-buffer 1.3.1 (EPL-1.0)
clj-commons/clj-yaml 1.0.27 (EPL-1.0)
com.brunobonacci/mulog 0.9.0 (Apache-2.0)
com.cognitect/transit-clj 1.0.333 (Apache-2.0)
com.cognitect/transit-cljs 0.8.280 (Apache-2.0)
com.cognitect/transit-java 1.0.371 (Apache-2.0)
com.cognitect/transit-js 0.8.874 (Apache-2.0)
com.fasterxml.jackson.core/jackson-core 2.14.2 (Apache-2.0)
com.google.code.gson/gson 2.10.1 (Apache-2.0)
com.googlecode.json-simple/json-simple 1.1.1 (Apache-2.0)
com.nextjournal/beholder 1.0.2
criterium/criterium 0.4.6 (EPL-1.0)
djblue/portal 0.49.0 (MIT)
expound/expound 0.9.0 (EPL-1.0)
fipp/fipp 0.6.26 (EPL-1.0)
hawk/hawk 0.2.11 (EPL-1.0)
http-kit/http-kit 2.7.0 (Apache-2.0)
io.methvin/directory-watcher 0.17.3 (Apache-2.0)
javax.activation/javax.activation-api 1.2.0 (CDDL/GPLv2+CE)
javax.xml.bind/jaxb-api 2.4.0-b180830.0359 (CDDL 1.1)
lambdaisland/clj-diff 1.4.78 (EPL-1.0)
lambdaisland/deep-diff2 2.10.211 (EPL-1.0)
lambdaisland/kaocha 1.87.1366 (EPL-1.0)
lambdaisland/tools.namespace 0.3.256 (EPL-1.0)
meta-merge/meta-merge 1.0.0 (EPL-1.0)
mvxcvi/arrangement 2.1.0 (Public Domain)
net.incongru.watchservice/barbary-watchservice 1.0 (GPLv2 + Classpath Exception)
net.java.dev.jna/jna 5.12.1 (LGPL-2.1-or-later)
org.clojure/clojure 1.11.1 (EPL-1.0)
org.clojure/core.rrb-vector 0.1.2 (EPL-1.0)
org.clojure/core.specs.alpha 0.2.62 (EPL-1.0)
org.clojure/data.json 2.4.0 (EPL-1.0)
org.clojure/java.classpath 1.0.0 (EPL-1.0)
org.clojure/spec.alpha 0.3.218 (EPL-1.0)
org.clojure/test.check 1.1.1 (EPL-1.0)
org.clojure/tools.cli 1.0.219 (EPL-1.0)
org.clojure/tools.namespace 1.4.4 (EPL-1.0)
org.clojure/tools.reader 1.3.6 (EPL-1.0)
org.clojure/tools.trace 0.7.11 (EPL-1.0)
org.flatland/ordered 1.15.11 (EPL-1.0)
org.javassist/javassist 3.18.1-GA (MPL 1.1)
org.msgpack/msgpack 0.6.12 (Apache-2.0)
org.slf4j/slf4j-api 2.0.9 (MIT)
org.slf4j/slf4j-nop 2.0.9 (MIT)
org.tcrawley/dynapath 1.1.0 (EPL-1.0)
org.yaml/snakeyaml 2.1 (Apache-2.0)
progrock/progrock 0.1.2 (EPL-1.0)
slingshot/slingshot 0.12.2 (EPL-1.0)
```

The `:aliases` option can be used to inspect the dependencies of a user alias, listing only dependencies from the specified aliases when run outside of a Clojure project.

??? EXAMPLE "Dependency list from Practicalli :repl/rebel alias only"
```shell
❯ clojure -X:deps list :aliases '[:repl/rebel]'
cider/cider-nrepl 0.42.1 (EPL-1.0)
cider/orchard 0.18.0 (EPL-1.0)
cljfmt/cljfmt 0.5.7 (EPL-1.0)
com.bhauman/rebel-readline 0.1.4 (EPL-1.0)
com.google.javascript/closure-compiler v20151216 (Apache-2.0)
compliment/compliment 0.3.6 (EPL-1.0)
mx.cider/logjam 0.1.1 (EPL-1.0)
nrepl/nrepl 1.1.0 (EPL-1.0)
org.clojure/clojure 1.11.1 (EPL-1.0)
org.clojure/clojurescript 1.7.228 (EPL-1.0)
org.clojure/core.specs.alpha 0.2.62 (EPL-1.0)
org.clojure/data.json 0.2.6 (EPL-1.0)
org.clojure/google-closure-library 0.0-20151016-61277aea (Apache-2.0)
org.clojure/google-closure-library-third-party 0.0-20151016-61277aea (Apache-2.0)
org.clojure/spec.alpha 0.3.218 (EPL-1.0)
org.clojure/tools.reader 1.0.0-alpha4 (EPL-1.0)
org.fusesource.jansi/jansi 1.16 (Apache-2.0)
org.jline/jline-reader 3.5.1 (The BSD License)
org.jline/jline-terminal 3.5.1 (The BSD License)
org.jline/jline-terminal-jansi 3.5.1 (The BSD License)
org.mozilla/rhino 1.7R5 (Mozilla Public License, Version 2.0)
rewrite-clj/rewrite-clj 0.5.2 (MIT)
rewrite-cljs/rewrite-cljs 0.4.3 (MIT)
```


## Dependency tree

Expand Down

0 comments on commit 8b8d63e

Please sign in to comment.