(brick-deps brick
components
bases
suffixed-top-ns
ifc->comp
interface-names
interface-names-in-project
interface-names-in-project-test
bricks-to-test)
Calculates all dependencies for a given brick. To describe what's going on here, lets introduce a few abbreviations: IB = Component interface name, e.g. 'util', or base name, e.g. 'poly-cli'. SN = Short namespace name (only used by the tests right now), e.g. 'util.util-test' where 'util' in this case is an IB and 'util-test' is a top namespace within that brick (a brick with the interface 'util' in this case).
The 'all-src-ns->namespaces' map has an IB as key, and a sequence of component interfaces as a value for each key (components and bases can't depend on bases).
The 'all-test-ns->namespaces' map has an SN as key, and a sequence of IB's and SN's as a value for each key. If depending on another test namespace, either within its own brick or another brick's test namespace (which is allowed) then the value is an SN, but if depending on a component's namespace, then the value will be the component interface name, regardless if it's an interface sub namespace (e.g. 'util.interface.str') or just a normal top interface, e.g. 'util.interface'. The two maps are then merged into 'all-ns->namespaces'.
The 'namespaces' is then populated with the brick's IB and test namespaces.
The 'all-ns->namespaces' map is then passed into the dependency calculation together with one namespace from the 'namespaces' at a time as a starting point.
The 'src' dependencies are then calculated, and also the 'test' dependencies if the brick is not excluded in workspace.edn > :projects > PROJECT-KEY > :test.
Calculates all dependencies for a given brick. To describe what's going on here, lets introduce a few abbreviations: IB = Component interface name, e.g. 'util', or base name, e.g. 'poly-cli'. SN = Short namespace name (only used by the tests right now), e.g. 'util.util-test' where 'util' in this case is an IB and 'util-test' is a top namespace within that brick (a brick with the interface 'util' in this case). The 'all-src-ns->namespaces' map has an IB as key, and a sequence of component interfaces as a value for each key (components and bases can't depend on bases). The 'all-test-ns->namespaces' map has an SN as key, and a sequence of IB's and SN's as a value for each key. If depending on another test namespace, either within its own brick or another brick's test namespace (which is allowed) then the value is an SN, but if depending on a component's namespace, then the value will be the component interface name, regardless if it's an interface sub namespace (e.g. 'util.interface.str') or just a normal top interface, e.g. 'util.interface'. The two maps are then merged into 'all-ns->namespaces'. The 'namespaces' is then populated with the brick's IB and test namespaces. The 'all-ns->namespaces' map is then passed into the dependency calculation together with one namespace from the 'namespaces' at a time as a starting point. The 'src' dependencies are then calculated, and also the 'test' dependencies if the brick is not excluded in workspace.edn > :projects > PROJECT-KEY > :test.
(brick-test-namespaces {:keys [namespaces]} suffixed-top-ns test-namespaces)
(include-test? {:keys [name]} bricks-to-test)
Checks if the brick is included in workspace.edn > :projects > PROJECT-KEY > :test > :include. If the :test key is not present, then it is treated as included.
Checks if the brick is included in workspace.edn > :projects > PROJECT-KEY > :test > :include. If the :test key is not present, then it is treated as included.
(ns-deps-recursively test-context?
current-ns
ns->namespaces
brick-paths
visited
path)
This is the core calculation of the dependencies for a specific namespace living in a brick for a specific project. The ns->namespaces is a bit misleading because it not only contains namespaces pointing to other namespaces, but also component interfaces and base (IB) names, pointing to both namespaces and other IB names.
This is the core calculation of the dependencies for a specific namespace living in a brick for a specific project. The ns->namespaces is a bit misleading because it not only contains namespaces pointing to other namespaces, but also component interfaces and base (IB) names, pointing to both namespaces and other IB names.
(project-deps components
bases
component-names-src
component-names-test
base-names-src
base-names-test
suffixed-top-ns
bricks-to-test)
Calculate the source and test dependencies for a project. The returned dependencies are stored in a map with a :src and :test key and includes a key for each brick that is included in the project together with the direct, indirect, and circular dependencies (if any) + missing dependencies on interfaces.
Calculate the source and test dependencies for a project. The returned dependencies are stored in a map with a :src and :test key and includes a key for each brick that is included in the project together with the direct, indirect, and circular dependencies (if any) + missing dependencies on interfaces.
(source-deps ns-paths
ifc->comp
interface-names
interface-names-in-project
src-test-brick-ns)
Takes a sequence of namespace paths and calculates direct, indirect, and circular dependencies + dependencies on missing interfaces (if any). All incoming dependencies are on interfaces, but are then translated to corresponding components, using the ifc->comp map that is based on the components in the project for which this calculation operates on.
Takes a sequence of namespace paths and calculates direct, indirect, and circular dependencies + dependencies on missing interfaces (if any). All incoming dependencies are on interfaces, but are then translated to corresponding components, using the ifc->comp map that is based on the components in the project for which this calculation operates on.
(test-context? namespace test-only-interfaces {:keys [type interface]})
If a component is only used in the test context from a project, then test-only-interfaces will contain its interface.
If a component is only used in the test context from a project, then test-only-interfaces will contain its interface.
(test-ns->namespaces {:keys [namespaces]} suffixed-top-ns test-namespaces)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close