Skip to main content

GraphBuildError

Enum GraphBuildError 

Source
pub enum GraphBuildError {
Show 23 variants RootTargetMismatch, SnapshotFingerprintMismatch, MissingUnitBinding { unit: u32, }, DanglingUnitBinding { unit: u32, }, SharedUnitBinding { held: u32, unit: u32, }, RepeatedUnitContainer { unit: u32, container: u32, }, MissingUnitDeclaration { unit: u32, }, RepeatedUnitDeclaration { unit: u32, }, SharedUnitRoot { root: u32, }, MissingDependencyUnit { edge: u32, alias: Box<str>, }, MissingSourceNode { unit: u32, path: Box<str>, }, RepeatedUnitSource { unit: u32, path: Box<str>, }, ReferenceRecordMismatch { references: u32, records: u32, }, MissingDefinitionNode { definition: u32, }, UnnamedDefinitionKind { definition: u32, }, UnnamedReferenceKind { reference: u32, }, MissingReferenceRecord { reference: u32, }, UnknownContainmentNode { node: u32, }, MultiplyContained { parent: u32, child: u32, }, UnparentedNode { node: u32, }, RootHasParent { root: u32, parent: u32, }, ContainmentCycle { node: u32, }, CapacityExceeded { collection: GraphCollection, limit: u32, },
}
Expand description

A refusal taken while projecting one resolution into a graph.

Variants§

§

RootTargetMismatch

The supplied snapshot and resolution were requested for other targets.

§

SnapshotFingerprintMismatch

The supplied snapshot is not the one the resolution was validated against, even though both name the same root target.

§

MissingUnitBinding

A report unit has no graph container, or no source scope beneath one.

Fields

§unit: u32

The report-local unit identifier that no binding answers for.

§

DanglingUnitBinding

A report unit is bound to a build unit the supplied snapshot does not hold, which is a binding that names nothing rather than a missing one.

Fields

§unit: u32

The report-local unit identifier whose binding names nothing.

§

SharedUnitBinding

Two report units are bound to one build unit, so one unit-qualified source would have two owners.

Fields

§held: u32

The report-local unit identifier that bound the build unit first.

§unit: u32

The report-local unit identifier that bound it again.

§

RepeatedUnitContainer

One planned unit was given two container nodes, so everything it holds would be rooted at whichever was bound last.

Fields

§unit: u32

The plan-local unit position bound a second time.

§container: u32

The container node that unit already took.

§

MissingUnitDeclaration

A report unit states no declaration this projection can root it at.

A unit whose container is named by its own sources — a Go package clause, and not a manifest — has no node at all when the report states no such declaration for it.

Fields

§unit: u32

The report-local unit identifier that declares no container.

§

RepeatedUnitDeclaration

A report unit states more than one declaration of its own container.

Fields

§unit: u32

The report-local unit identifier that declares two containers.

§

SharedUnitRoot

Two planned units name one node as the root of their own trees.

Fields

§root: u32

The node claimed as a root twice.

§

MissingDependencyUnit

A snapshot dependency edge names a build unit with no graph container.

Fields

§edge: u32

The edge’s position among the snapshot’s dependency edges.

§alias: Box<str>

The namespace-local name that edge declares its target under.

§

MissingSourceNode

A stated site names a source the bound unit does not instantiate.

Fields

§unit: u32

The report-local unit identifier the site belongs to.

§path: Box<str>

The normalized repository-relative path the site named.

§

RepeatedUnitSource

One report unit instantiates one normalized path twice, so a second file node would be minted for a source that already holds one.

Fields

§unit: u32

The report-local unit identifier that instantiates it twice.

§path: Box<str>

The normalized repository-relative path stated more than once.

§

ReferenceRecordMismatch

The report states a different number of references and resolution records, so no pairing between them is stated at all.

Fields

§references: u32

How many references the report states.

§records: u32

How many resolution records the report states.

§

MissingDefinitionNode

A stated join names a definition this graph holds no node for.

Fields

§definition: u32

The report-local definition identifier that named nothing.

§

UnnamedDefinitionKind

A report definition states a kind the adapter reading it has no node for.

The shared report vocabulary carries every language’s kinds. Each language’s resolution is validated against its own subset before it is published, so this refusal answers a report that reached the projection without that validation rather than a repository that declares something new.

Fields

§definition: u32

The report-local definition identifier whose kind has no node.

§

UnnamedReferenceKind

A report reference states a kind the adapter reading it has no record for.

Fields

§reference: u32

The report-local reference identifier whose kind has no record.

§

MissingReferenceRecord

An edge was produced for a reference record this graph does not hold.

Fields

§reference: u32

The reference identity that answers for no record.

§

UnknownContainmentNode

A containment edge names a node this graph holds no record for.

Fields

§node: u32

The node identity the containment relation named.

§

MultiplyContained

One node is contained by more than one parent.

Fields

§parent: u32

One parent the child is contained by.

§child: u32

The multiply-contained child.

§

UnparentedNode

One node below the unit roots is contained by nothing.

Fields

§node: u32

The node no containment edge claims.

§

RootHasParent

One unit root is contained by another node.

Fields

§root: u32

The unit root that must own itself.

§parent: u32

The node that claims it.

§

ContainmentCycle

One containment chain returns to a node it already visited.

Fields

§node: u32

The node the chain returned to.

§

CapacityExceeded

One collection reached its configured ceiling.

Fields

§collection: GraphCollection

Which collection refused the insertion.

§limit: u32

The ceiling that collection is bounded by.

Trait Implementations§

Source§

impl Debug for GraphBuildError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GraphBuildError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for GraphBuildError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.