You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/reference/deps_edn.adoc
+66-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The deps.edn file is a data file specifying all information needed to form a pro
17
17
18
18
If you are building a tool that would like to leverage deps.edn, create well-known namespaced <<deps_edn#aliases,:aliases>> as a means to convey tool configuration, rather than adding new arbitrary tags elsewhere in the deps.edn data - these may not be preserved or conveyed during processing. Tools can access alias data via the basis at runtime, or programatically via tools.deps.
19
19
20
-
.Index of all attributes
20
+
.Index of deps.edn attributes
21
21
[[index]]
22
22
[subs=+macros]
23
23
----
@@ -493,3 +493,68 @@ If your library needs preparation, add the `:deps/prep-lib` key to your `deps.ed
493
493
==== :fn
494
494
495
495
`:fn` is the function to invoke with `-T` during prep
496
+
497
+
[[basis]]
498
+
== Runtime basis
499
+
500
+
The runtime basis is a representation of the dependency environment when the Clojure runtime starts. It includes information about the dependencies, classpath, and how the basis was created.
501
+
502
+
The runtime basis can be accessed from within Clojure, using the https://clojure.github.io/clojure/#clojure.java.basis[clojure.java.basis] API. It includes access to both the initial basis and the current basis, which may be modified by the https://clojure.github.io/clojure/clojure.repl-api.html#clojure.repl.deps/add-libs[add-libs] and related functions.
503
+
504
+
.Index of deps.edn attributes
505
+
[[index]]
506
+
[subs=+macros]
507
+
----
508
+
{;; The basis is a superset of the merged <<deps_edn#index,deps.edn>>
509
+
;; so may contain all of those attributes plus these:
The `:basis-config` attribute contains the parameters used when the basis was created and should be sufficient to recreate the basis later. That property is in particular used by https://clojure.github.io/clojure/clojure.repl-api.html#clojure.repl.deps/sync-deps[sync-deps].
529
+
530
+
The `:basis-config` may have the following attributes:
531
+
532
+
* `:dir` - absolute or relative path to the project directory (containing project deps.edn), defaults to current directory
533
+
* `:root` - root deps.edn source, one of `:standard` (read from classpath), a path, or a literal map
534
+
* `:user` - user deps.edn source, one of `:standard` (read from user config dir), a path, or a literal map
535
+
* `:project` - project deps.edn source, one of `:standard` (read from `:dir`), a path, or a literal map
536
+
* `:extra` - extra deps.edn source, either a path or a literal map
537
+
* `:aliases` - a vector of supplied alias keywords providing argmap keys
538
+
* `:args` - a map of extra argmap args, applied after alias argmaps are merged
539
+
540
+
[[basis_argmap]]
541
+
=== :argmap
542
+
543
+
The basis `:argmap` contains the merged argmap that was used when resolving dependencies and computing the classpath. The argmaps can be supplied either indirectly by the `:aliases` or directly via the `:args` key when creating the basis.
544
+
545
+
See the <<clojure_cli#aliases,Clojure CLI reference page>> for a complete list of argmap args and what they do.
546
+
547
+
[[basis_libs]]
548
+
=== :libs
549
+
550
+
The basis `:libs` key is a map of every dependency, both direct and transitive, included in the basis classpath. The `:libs` value is a map from lib name (qualified symbol) to lib coordinate with some additional keys. While most of the keys are non-normative, one important added key is the `:paths` vector of file paths to add to the classpath for this lib.
551
+
552
+
[[basis_classpath]]
553
+
=== :classpath
554
+
555
+
The `:classpath` key is a map where the keys are classpath paths (strings) and the values describe why that path is included. Most commonly this will be either a map with `:lib-name` key (for libs) or a map with `:path-key` key for source paths.
556
+
557
+
[[basis_classpath_roots]]
558
+
=== :classpath-roots
559
+
560
+
The `:classpath-roots` key is a vector that orders the classpath (the path strings should match the keys of the `:classpath` key). See the <<clojure_cli#_classpath_construction,Clojure CLI section on classpath construction>> for ordering rules.
0 commit comments