(cycle-node g)Walk from the known root of the tree to the cycle, find the shortest path to a cycle, and return the last node before the cycle occurs.
For example, a cycle of [a b c b] will return c.
Walk from the known root of the tree to the cycle, find the shortest path to a cycle, and return the last node before the cycle occurs. For example, a cycle of [a b c b] will return c.
(cycle-paths g)Return all cycling paths in graph g.
Return all cycling paths in graph g.
(deps ns)Returns all alias and refer dependencies of a namespace.
Returns all alias and refer dependencies of a namespace.
(graph)(graph ns)Given a root namespace, returns a hashmap of ns -> set-of-namespaces-that-depend-on-ns.
Given a root namespace, returns a hashmap of ns -> set-of-namespaces-that-depend-on-ns.
(merge-graph nss)Given a list of namespace symbols, return a graph that includes the dependency graphs of all the namespaces.
Given a list of namespace symbols, return a graph that includes the dependency graphs of all the namespaces.
(namespaces nss)A transducer that will restrict a plan to the provided set of namespaces.
A transducer that will restrict a plan to the provided set of namespaces.
(plan {sym :com.potetm.lightweaver/symbol
rs :com.potetm.lightweaver/roots
xf :com.potetm.lightweaver/xf})Given var search criteria, return the list of vars in topological order.
::symbol - The var symbol to search for in the graph (e.g. 'start).
::roots - The root namespaces used to build the graph.
::xf - xform to apply to the sorted namespaces. See also namespaces,replace.
Given var search criteria, return the list of vars in topological order. ::symbol - The var symbol to search for in the graph (e.g. 'start). ::roots - The root namespaces used to build the graph. ::xf - xform to apply to the sorted namespaces. See also `namespaces, `replace.
(plan-rev {sym :com.potetm.lightweaver/symbol
rs :com.potetm.lightweaver/roots
xf :com.potetm.lightweaver/xf})Given var search criteria, return the list of vars in reverse topological order.
::symbol - The var symbol to search for in the graph (e.g. 'stop).
::roots - The root namespaces used to build the graph.
::xf - xform to apply to the sorted namespaces. See also namespaces,replace.
Given var search criteria, return the list of vars in reverse topological order. ::symbol - The var symbol to search for in the graph (e.g. 'stop). ::roots - The root namespaces used to build the graph. ::xf - xform to apply to the sorted namespaces. See also `namespaces, `replace.
(replace kmap)A transducer that takes a hashmap of {'original.namespace 'replacement.namespace} and replaces namespaces (e.g. for testing).
A transducer that takes a hashmap of {'original.namespace 'replacement.namespace}
and replaces namespaces (e.g. for testing).(run init vars)Reduce over namespaces running sym if it can be resolved and ignoring the namespace if sym cannot be resolved.
Reduce over namespaces running sym if it can be resolved and ignoring the namespace if sym cannot be resolved.
(start sys)Start a system by running 'start in topological order for all namespaces.
::symbol - The symbol to search for in the graph. Defaults to 'start.
::roots - The root namespaces to initialize the graph.
::xf - xform to apply to the sorted namespaces. See also namespaces,replace.
Start a system by running 'start in topological order for all namespaces. ::symbol - The symbol to search for in the graph. Defaults to 'start. ::roots - The root namespaces to initialize the graph. ::xf - xform to apply to the sorted namespaces. See also `namespaces, `replace.
(stop sys)Stop a system by running 'stop in topological order for all namespaces.
::symbol - The symbol to search for in the graph. Defaults to 'stop. ::roots - The root namespaces to initialize the graph. (Usually provided from `start.)
Stop a system by running 'stop in topological order for all namespaces. ::symbol - The symbol to search for in the graph. Defaults to 'stop. ::roots - The root namespaces to initialize the graph. (Usually provided from `start.)
(topo-sort g)(topo-sort ret g)Given a graph returned by `graph, sort all namespaces topologically.
If supplied a list () as ret, the return will be reverse topologically sorted.
Given a graph returned by `graph, sort all namespaces topologically. If supplied a list () as ret, the return will be reverse topologically sorted.
(topo-sort-rev g)Given a graph returned by `graph, reverse sort all namespaces topologically.
Given a graph returned by `graph, reverse sort all namespaces topologically.
(with-sys [binding args] & body)Initialize system, run body, and guarantee proper shutdown. Example usage:
(with-sys [sys {:my-val 123 ::roots '[my.root.ns]}] (do-work sys))
Initialize system, run body, and guarantee proper shutdown. Example usage:
(with-sys [sys {:my-val 123
::roots '[my.root.ns]}]
(do-work sys))cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |