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.
Trait Implementations§
Source§impl Clone for PackageCycle
impl Clone for PackageCycle
Source§fn clone(&self) -> PackageCycle
fn clone(&self) -> PackageCycle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PackageCycle
impl Debug for PackageCycle
Source§impl<'de> Deserialize<'de> for PackageCycle
impl<'de> Deserialize<'de> for PackageCycle
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PackageCycle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PackageCycle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PackageCycle
impl JsonSchema for PackageCycle
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for PackageCycle
impl Serialize for PackageCycle
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for PackageCycle
impl RefUnwindSafe for PackageCycle
impl Send for PackageCycle
impl Sync for PackageCycle
impl Unpin for PackageCycle
impl UnsafeUnpin for PackageCycle
impl UnwindSafe for PackageCycle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more