pub struct PackageCycle {
pub packages: Vec<String>,
pub package_roots: Vec<PathBuf>,
pub length: usize,
pub edges: Vec<PackageCycleEdge>,
pub group_truncated: bool,
}Expand description
A dependency cycle between workspace packages.
Each workspace package is a node. A resolved import from a file in one
package to a file in another package is an edge. Declared package.json
dependencies are not edges, and imports from test, spec, story, fixture
and tooling config files are not edges. A package cycle can exist when no
file-level cycle exists.
Fields§
§packages: Vec<String>Workspace package labels in cycle order. The first entry is the
lexicographically smallest label; the last entry imports the first.
A label is the package name. When two or more workspace packages
share a name, the label is name (root) with the project-relative
package root, so that each label names one package.
package_roots: Vec<PathBuf>Package root directories in cycle order: package_roots[i] is the
root of packages[i].
length: usizeNumber of packages in the cycle.
edges: Vec<PackageCycleEdge>One example import per hop, in cycle order: edges[i] goes from
packages[i] to packages[(i + 1) % length].
group_truncated: boolTrue when the group of packages that holds this cycle has more cycles than fallow lists. The listing stops at 20 cycles per group, or earlier on a very dense package graph. Break a listed cycle and run again to see the rest.
Implementations§
Source§impl PackageCycle
impl PackageCycle
Sourcepub const GROUP_TRUNCATED_NOTE: &'static str = "this package group has more cycles than listed"
pub const GROUP_TRUNCATED_NOTE: &'static str = "this package group has more cycles than listed"
The note that every output format shows for a cycle with
PackageCycle::group_truncated set.