Liking cljdoc? Tell your friends :D

apollo-test.graph

Static ns form parsing and dependency graph construction. Parses ns forms using clojure.core/read (no eval, no external deps) and builds a directed dependency graph.

Static ns form parsing and dependency graph construction.
Parses ns forms using clojure.core/read (no eval, no external deps)
and builds a directed dependency graph.
raw docstring

affected-test-nssclj

(affected-test-nss graph changed-ns-syms test-ns-syms)

Given the dependency graph, a set of changed namespace symbols, and a set of known test namespace symbols, returns only those test namespaces that are transitively affected by the changes.

Given the dependency graph, a set of changed namespace symbols, and
a set of known test namespace symbols, returns only those test namespaces
that are transitively affected by the changes.
raw docstring

build-graphclj

(build-graph src-dirs test-dirs)

Scans all .clj files in the given source and test directories. Parses ns forms and returns a DependencyGraph: {:nodes #{ns-symbols...} :edges {ns-sym #{dep-ns-sym...}}}

Scans all .clj files in the given source and test directories.
Parses ns forms and returns a DependencyGraph:
{:nodes #{ns-symbols...} :edges {ns-sym #{dep-ns-sym...}}}
raw docstring

build-graph-for-platformclj

(build-graph-for-platform src-dirs test-dirs platform)

Like build-graph, but dispatches file discovery by platform (:clj or :cljs).

Like build-graph, but dispatches file discovery by platform (:clj or :cljs).
raw docstring

build-graph-from-parsedclj

(build-graph-from-parsed parsed-seq)

Builds a DependencyGraph from a seq of parsed ns-form maps ({:ns-sym <symbol> :deps #{<dep-symbols>}}). Returns {:nodes #{ns-symbols...} :edges {ns-sym #{dep-ns-sym...}}}

Builds a DependencyGraph from a seq of parsed ns-form maps
({:ns-sym <symbol> :deps #{<dep-symbols>}}).
Returns {:nodes #{ns-symbols...} :edges {ns-sym #{dep-ns-sym...}}}
raw docstring

parse-ns-formclj

(parse-ns-form file-path)

Reads the first form from a .clj file. If it is an ns form, returns {:ns-sym <symbol> :deps #{<dep-symbols>}}. Otherwise returns nil. Uses clojure.core/read — no code is evaluated.

Reads the first form from a .clj file. If it is an ns form, returns
{:ns-sym <symbol> :deps #{<dep-symbols>}}. Otherwise returns nil.
Uses clojure.core/read — no code is evaluated.
raw docstring

reverse-edgesclj

(reverse-edges graph)

Inverts the dependency graph: for each edge A -> B (A depends on B), produces B -> A (B is depended-on by A). This lets us walk from a changed namespace to all its dependents.

Inverts the dependency graph: for each edge A -> B (A depends on B),
produces B -> A (B is depended-on by A). This lets us walk from a changed
namespace to all its dependents.
raw docstring

transitive-dependentsclj

(transitive-dependents graph changed-ns-syms)

Given a graph and a set of changed namespace symbols, returns the full set of transitively affected namespaces (including the changed ones themselves). Uses BFS over the reversed dependency graph. Handles cycles safely.

Given a graph and a set of changed namespace symbols, returns the full set
of transitively affected namespaces (including the changed ones themselves).
Uses BFS over the reversed dependency graph. Handles cycles safely.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close