deps.edn
in each component, base, and project:components/COMPONENT-DIR
> deps.edn
> :deps
components/COMPONENT-DIR
> deps.edn
> :aliases
> :test
> :extra-deps
bases/BASE-DIR
> deps.edn
> :deps
bases/BASE-DIR
> deps.edn
> :aliases
> :test
> :extra-deps
./deps.edn
> :aliases
> :dev
> :extra-deps
./deps.edn
> :aliases
> :test
> :extra-deps
projects/PROJECT-DIR
> deps.edn
> :deps
projects/PROJECT-DIR
> deps.edn
> :aliases
> :test
> :extra-deps
x
means that the library is added to the src
context, while t
means that it's only used from the test context.tools.deps
:clj-time/clj-time {:mvn/version "0.15.2"}
where the key is the Maven groupId/artifactId
. Those dependencies are stored locally in the ~/.m2/repositories
directory (but can be changed in ~/.polylith/config.edn
, property m2-dir
).clj-time {:local/root "/local-libs/clj-time-0.15.2.jar"}
where the key is an arbitrary identifier. A local dependency is a path to a locally stored file.clj-time/clj-time {:git/url "https://github.com/clj-time/clj-time.git", :sha "d9ed4e46c6b42271af69daa1d07a6da2df455fab"}
where the key must match the path for the library in ~/.gitlibs/libs
(to be able to calculate the KB
column).-
. One way to solve this is to force dependencies to be downloaded by executing something like this from the workspace root::local/root
, only :src
dependencies will be inherited while the :test
dependencies will be ignored. The poly
tool builds upon tools.deps but has its own test runner that is accessed via the test
command. A difference between tools.deps CLI and the poly
tool is that it also inherits dependencies from the test context. If you want to run the tests directly from a project using the tools.deps CLI tool, then you also have to add the test dependencies again in the project's deps.edn
file under :aliases > :test > :extra-paths
. As long as you run the tests with the built-in test command you don't have to worry about this.x
if the library is used by the src
code and with a t
if it's only used by the test
code.x
if the library is used by the src
code and with a t
if it's only used by the test
code.override-deps
in a project's deps.edn
file, e.g.:libs
command:clj-time
where the rb
project uses "0.15.1" and the user
component uses "0.15.2"../deps.edn
> :aliases
> :dev
> :override-deps
./deps.edn
> :aliases
> :test
> :override-deps
projects/PROJECT-DIR
> deps.edn
> :override-deps
projects/PROJECT-DIR
> deps.edn
> :aliases
> :test
> :override-deps
src
scope it will also affect the test
scope. If a library is overridden in the test
scope it will only affect the test
scope.:compact-views
to #{"libs"}
in ./deps.edn
or by passing in :compact
: