Liking cljdoc? Tell your friends :D

polylith.clj.core.deps.project-brick-deps


all-brick-namespacesclj

(all-brick-namespaces brick suffixed-top-ns test-namespaces)

all-test-keysclj

(all-test-keys components suffixed-top-ns)

brick-depsclj

(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.
raw docstring

brick-namespaceclj

(brick-namespace {:keys [type name interface]})

brick-test-namespacesclj

(brick-test-namespaces {:keys [namespaces]} suffixed-top-ns test-namespaces)

circular?clj

(circular? namespaces)

clean-nsclj

(clean-ns ns-name)

clean-nssclj

(clean-nss ns-names)

component-depsclj

(component-deps deps ifc->comp)

drop-brick-nsclj

(drop-brick-ns ns-names src-test-brick-ns)

extract-nameclj

(extract-name path)

filter-component-nsclj

(filter-component-ns namespaces suffixed-top-ns)

ifc-namesclj

(ifc-names component-names bricks)

include-test?clj

(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.
raw docstring

interface-nameclj

(interface-name {:keys [namespace]} suffixed-top-ns)

ns-deps-recursivelyclj

(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.
raw docstring

project-depsclj

(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.
raw docstring

short-nsclj

(short-ns namespace suffixed-top-ns test-namespaces)

source-depsclj

(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.
raw docstring

src-namespacesclj

(src-namespaces {:keys [namespaces] :as brick} suffixed-top-ns)

test-context?clj

(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.
raw docstring

test-keyclj

(test-key {:keys [namespace]} suffixed-top-ns)

test-keysclj

(test-keys {:keys [namespaces]} suffixed-top-ns)

test-ns->namespacesclj

(test-ns->namespaces {:keys [namespaces]} suffixed-top-ns test-namespaces)

test-ns-suffixclj

(test-ns-suffix brick-ns)

test-path?clj

(test-path? {:keys [test?]})

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close