dev module declared-dependencies
Validate that declared dependencies match actual module structure
- Command version
0.0.0- Command configuration
dev-tool:dev.module.declared-dependencies@0.0.0
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
--validate, --no-validate | boolean | No | false | Validate declared dependencies for unknown references, cycles, and executable dependency violations |
--out | string | No | Optional path for dependency graph output. Relative paths are resolved from --repo-root. | |
--format | string one of dot | No | "dot" | Dependency graph output format (default: dot) |
--group-by | string one of type, module | No | "type" | Group the dependency listing by dependency type or by module (default: type) |
--exclude-tests, --no-exclude-tests | boolean | No | false | Exclude testDependencies from command output and validation |
--hide-submodule-dependencies, --no-hide-submodule-dependencies | boolean | No | false | Hide dependencies that target descendant submodules of the same module in response output and DOT export |
--recurse, --no-recurse | boolean | No | false | Validate every repository this one pins as well, each in its own checkout by its own manifest and what it vendored -- what its own gate reads standing alone -- and the adapter checkout a tracked adapter catalog pins among them. A run from a tree's root otherwise reads the root's manifest, and can pass a manifest the repository holding it would refuse. Refused without --validate |
It also takes the global arguments.
Output
It answers with a declared_dependencies.declaredDependenciesResult.
Types
declared_dependencies.declaredDependenciesResult
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
moduleCount | integer | Yes | How many modules the manifest declares | |
declaredDependencies | list[declared_dependencies.DeclaredDependencyEntry] | No | [] | What each module of the manifest declares, one entry per module in the manifest's order |
dependencyDelivery | list[declared_dependencies.DependencyDeliveryEntry] | No | [] | How the repository declaring each coordinate edge obtains the package it names: vendored from a build catalog, vendored as a schema, taken from a path by the language's package manager, or delivered by none of its own declarations. A path is build and deployment coupling a vendored package does not have. Reported, never validated. |
validated | boolean | No | false | Whether --validate was given, so that validation and isValid say what it found |
excludeTests | boolean | No | false | Whether --exclude-tests was given, which leaves test dependencies out of the listing and of the validation |
hideSubmoduleDependencies | boolean | No | false | Whether --hide-submodule-dependencies was given, which leaves out each dependency on a submodule nested under the module that declares it |
groupBy | enum one of type, module | No | "type" | How the human-readable listing is grouped, as --group-by gave it: by kind of dependency or by module |
outputPath | string | No | The graph file the run wrote, as an absolute path; absent where --out was not given | |
outputFormat | string | No | The format of the file outputPath names, as --format gave it; absent where --out was not given | |
validation | declared_dependencies.DependencyValidationResult | No | {} | What --validate found, each kind of finding in a list of its own; left at its defaults where the run did not validate |
isValid | boolean | No | Whether --validate found nothing in validation; absent where it was not given |
declared_dependencies.DeclaredDependencyEntry
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
module | string | Yes | The module's name | |
dependencies | list[string] | No | [] | The module's runtime dependencies, each a module name or a coordinate, with its direct submodules added after them unless --hide-submodule-dependencies was given |
buildDependencies | list[string] | No | [] | What the module declares as buildDependencies, each a module name or a coordinate |
devDependencies | list[string] | No | [] | What the module declares as devDependencies, each a module name or a coordinate |
testDependencies | list[string] | No | [] | What the module declares as testDependencies, each a module name or a coordinate; empty under --exclude-tests |
declared_dependencies.DependencyDeliveryEntry
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
repository | string | Yes | Whose declarations answered, as a path from the tree's root. One edge can have two answers: the tree taking a package from a path so its edits are live, and the checkout holding the module vendoring it. | |
module | string | Yes | The module that declares the edge. | |
dependency | string | Yes | The coordinate the edge names. | |
type | string | Yes | The kind of edge -- runtime, build, dev or test. | |
delivery | enum one of vendored, vendored-schema, path, undelivered | Yes | How that repository obtains the package: vendored from a build catalog, vendored-schema as a schema, path through the language's package manager, or undelivered where none of its declarations delivers it. | |
via | string | No | "" | What delivers it: the vendored library or schema coordinate, or the path as the package manager's declaration writes it. Empty when nothing does. |
declared_dependencies.DependencyValidationResult
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
isValid | boolean | No | false | Whether every list of findings here is empty |
moduleCount | integer | No | 0 | How many modules the manifest declares |
unknownDependencies | list[declared_dependencies.ValidationIssue] | No | [] | Each dependency written as a module name that the manifest declares no module by |
executableDependencies | list[declared_dependencies.ValidationIssue] | No | [] | Each runtime, dev or test edge onto an executable module. Nothing depends on an application but its generated API, the library declared with apiOf naming it in the same manifest |
internalDependencies | list[declared_dependencies.ValidationIssue] | No | [] | Each runtime or build edge from a library released to a client -- one declared public or hidden -- onto a module declared neither: a client obtains the library and cannot obtain what it depends on |
hiddenApplications | list[string] | No | [] | Each executable module declared audience: hidden, by coordinate: hidden is a library's audience, since an application's commands are public or internal and take theirs from it |
testLibraryDependencies | list[declared_dependencies.ValidationIssue] | No | [] | Each runtime or dev edge onto a test-library module, which a test dependency alone may name |
explicitSubmoduleDependencies | list[declared_dependencies.ValidationIssue] | No | [] | Each dependency a module declares on its own direct submodule, which is implied and is not to be declared |
independentNestedModules | list[declared_dependencies.ValidationIssue] | No | [] | Each module rooted inside another module's rootDir without being declared its submodule: module is the nearest enclosing module and dependency the nested one |
submoduleExternalDependencies | list[declared_dependencies.ValidationIssue] | No | [] | Each runtime, dev or test edge from a submodule onto a module of the manifest outside its own top-level module. A runtime edge the submodule also declares as a build edge is not reported |
invalidSubmoduleRootPaths | list[declared_dependencies.ValidationIssue] | No | [] | Each submodule whose rootDir is not inside its parent's: module is the parent and dependency the submodule |
cycles | list[list[string]] | No | [] | Each dependency cycle among runtime edges, a module's submodules counted as its dependencies, or among build edges: the module names along it, ending with the one it began with |
declared_dependencies.ValidationIssue
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
module | string | No | "" | The module the finding is about, which for an edge is the module that declares it |
dependency | string | No | "" | The other end of the finding: the module name or coordinate the edge names |
type | string | No | "" | The kind of edge: runtime, build, dev or test. Empty for a finding that is about where a module is rooted and not about an edge |