(ensure-no-cycles! packages)
Same as k16.kmono.core.graph/find-cycles
but will throw an exception if any
cycles are found.
Same as `k16.kmono.core.graph/find-cycles` but will throw an exception if any cycles are found.
(filter-by filter-fn packages)
(filter-by filter-fn {:keys [include-dependents]} packages)
Filter a given map of packages
by those that the given filter-fn
predicate returns true
.
If the :include-dependents
property is true
then all dependent packages of
the retained packages will also be kept.
This function will update the :depends-on
and :dependent
keys of each
retained package to include only other packages that still remain.
Filter a given map of `packages` by those that the given `filter-fn` predicate returns `true`. If the `:include-dependents` property is `true` then all dependent packages of the retained packages will also be kept. This function will update the `:depends-on` and `:dependent` keys of each retained package to include only other packages that still remain.
(find-cycles packages)
Try find cyclic dependencies between packages in a given packages
map
Try find cyclic dependencies between packages in a given `packages` map
(parallel-topo-sort packages)
Sort a give packages
map by the order in which the packages therein depend
on each other.
As an example, if I have 3 packages a
, b
, c
and b
depends on a
then:
(parallel-topo-sort {a {} b {} c {}})
;; => [[a c] [b]]
Sort a give `packages` map by the order in which the packages therein depend on each other. As an example, if I have 3 packages `a`, `b`, `c` and `b` depends on `a` then: ```clojure (parallel-topo-sort {a {} b {} c {}}) ;; => [[a c] [b]] ```
(query-dependents packages pkg-name)
Find all transitive dependent packages of pkg-name
within the give
packages
map.
Find all transitive dependent packages of `pkg-name` within the give `packages` map.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close