Skip to content

Commit 4e71af4

Browse files
committed
TDEPS-264 Add basis program
1 parent 57a8da8 commit 4e71af4

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Changelog
22
===========
33

44
* next
5+
* TDEPS-264 - Add `basis` program
56
* Update mvn-install docstring example
67
* 0.11.93 on Jun 3, 2025
78
* Update to latest tools.deps and Clojure 1.12.1

src/main/clojure/clojure/tools/deps/cli/api.clj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@
3737

3838
(set! *warn-on-reflection* true)
3939

40+
(defn basis
41+
"Print basis, by default using the same settings as the CLI for the current project.
42+
43+
Each dep source value can be :standard, a string path, a deps edn map, or nil.
44+
Sources are merged in the order - :root, :user, :project, :extra.
45+
46+
Basis options:
47+
:dir - directory root path, defaults to current directory
48+
:root - dep source, default = :standard
49+
:user - dep source, default = :standard
50+
:project - dep source, default = :standard (\"./deps.edn\")
51+
:extra - dep source, default = nil
52+
:aliases - coll of kw aliases of argmaps to apply to subprocesses"
53+
[opts]
54+
(let [basis (deps/create-basis opts)]
55+
(binding [*print-namespace-maps* false]
56+
(pprint/pprint basis))))
57+
4058
(defn prep
4159
"Prep the unprepped libs found in the transitive lib set of basis.
4260

0 commit comments

Comments
 (0)