dev module graph

Query the typed module dependency graph of declared and detected edges

Command version
0.0.0
Command configuration
dev-tool:dev.module.graph@0.0.0

Arguments

ArgumentTypeRequiredDefaultDescription
--fromstringNoScope the graph to edges reachable from this module (its dependencies)
--tostringNoScope the graph to edges that reach this module (its dependents); with --from, report the shortest path between the two modules
--edge-typelist[string]No[]Restrict edges to these dependency types (runtime, build, dev, test); repeat the flag or separate values with commasRepeatable
--provenancestring one of declared, detected, declared-only, detected-onlyNoRestrict edges by provenance (default: no restriction)
--transitive, --no-transitivebooleanNofalseFollow --from/--to reachability transitively instead of only direct edges

It also takes the global arguments.

Output

It answers with a graph.moduleGraphResult.

Types

graph.moduleGraphResult

FieldTypeRequiredDefaultDescription
moduleCountintegerYesHow many modules the manifest declares, whatever the query narrowed
edgeCountintegerYesHow many edges edges holds
nodeslist[graph.graphNode]No[]The modules of the answer, sorted by name: every module of the manifest where nothing narrowed the query, and otherwise the ones an edge of the answer touches, with the modules --from and --to named
edgeslist[graph.graphEdge]No[]The edges that match the query, sorted by source, then target, then kind
pathlist[string]No[]The shortest path from the --from module to the --to module, as the module names along it; empty where either was not given or no path joins them
pathFoundbooleanNofalseWhether --from and --to were both given and a path joins them
skippedModuleslist[graph.graphSkippedModule]No[]Each module whose dependencies could not be detected, and why
isCompletebooleanYesWhether every module's dependencies were detected; false where skippedModules names any, and the detected edges of those modules are then missing
sourceModulestringNo""The module --from named; empty where it was not given
targetModulestringNo""The module --to named; empty where it was not given
edgeTypeslist[string]No[]The kinds of edge --edge-type restricted the query to; empty for no restriction
provenancestringNo""The restriction --provenance gave: declared or detected keeps the edges that are so, declared-only or detected-only the edges that are one and not the other; empty for no restriction
transitivebooleanNofalseWhether --transitive was given, so that --from or --to follows edges past the direct ones

graph.graphNode

FieldTypeRequiredDefaultDescription
namestringYesThe module's name, as the manifest declares it
kindstringYesThe module's kind in the manifest, such as library or executable
parentModulestringNo""The module this one is a submodule of; empty for a top-level module

graph.graphEdge

FieldTypeRequiredDefaultDescription
sourcestringYesThe module that depends
targetstringYesThe module it depends on
kindstringYesThe kind of dependency: runtime, build, dev or test
declaredbooleanNofalseWhether the manifest declares the edge
detectedbooleanNofalseWhether the edge was found in the depending module's source or schema documents

graph.graphSkippedModule

FieldTypeRequiredDefaultDescription
modulestringYesThe module whose dependencies could not be detected
reasonstringYesWhy detection failed for it, as the failure was reported