Skip to main content

WrapperError

Enum WrapperError 

Source
pub enum WrapperError {
Show 99 variants MissingEnvironment(&'static str), NonUtf8EnvironmentName(OsString), NonUtf8EnvironmentValue { name: String, value: OsString, }, UnsupportedWrapperMode(String), RelativeStagingDirectory(PathBuf), RelativeDescriptorTargetDirectory(PathBuf), RelativeSourceExclusionDirectory(PathBuf), RelativeCargoManifestDirectory(PathBuf), RelativeFinalUnitMap(PathBuf), RelativeFinalTarget(PathBuf), UnsafeFinalTarget(PathBuf), OutDirOutsideFinalTarget { out_dir: PathBuf, target: PathBuf, }, RelativeFinalPlan(PathBuf), InvalidFinalPhase, InvalidSha256 { name: &'static str, value: String, reason: String, }, InvalidCargoExtraFilename { context: &'static str, value: String, reason: String, }, FinalUnitMapFilename { path: PathBuf, expected: String, }, ReadFinalUnitMap { path: PathBuf, source: Error, }, FinalUnitMapHashMismatch { path: PathBuf, expected: String, actual: String, }, ParseFinalUnitMap { path: PathBuf, source: Error, }, FinalUnitMapFormat(String), FinalUnitMapSchema { actual: u16, expected: u16, }, FinalUnitMapPlanId { expected: String, actual: String, }, FinalUnitMapPlanFileHash { expected: String, actual: String, }, NonCanonicalFinalUnitMap, RelativeMappedManifest(PathBuf), NonCanonicalFinalCoordinate(&'static str), EmptyFinalProfile, FinalCoordinateContainsPlanCfg, FinalCoordinateFeatureMismatch, AmbiguousFinalUnitCoordinate { coordinate: FinalUnitCoordinate, first: String, second: String, }, UnexpectedFinalPlanCfg(String), MissingRustcProgram, ComposedWorkspaceWrapper { wrapper: OsString, rustc: OsString, }, SpawnRustc { program: PathBuf, source: Error, }, RustcIdentityFailed { program: PathBuf, status: ExitStatus, }, MissingRustcOptionValue(&'static str), MissingDepInfoOutput, DuplicateDepInfoOutput, UnsupportedDefaultDepInfoWithOutput, CurrentDirectory(Error), NonUtf8RustcArgument(OsString), UnsupportedRustcOption(String), UnsupportedBinaryDepDepInfo, UnsupportedLogicalEnvironmentInjection, UnsupportedDepInfoPathRemapping(String), MissingCrateName, MissingCrateType, MissingRustcInput, MultipleRustcInputs, MalformedExtern(String), ConflictingExtern(String), RelativeExternArtifact(PathBuf), HashInput { path: PathBuf, source: Error, }, HashPackageSourceClosure { path: PathBuf, source: Error, }, RelativeOutDir(PathBuf), RelativeDepInfoWorkingDirectory(PathBuf), OutDirOutsideDescriptorTarget { out_dir: PathBuf, target: PathBuf, }, ReadDepInfo { path: PathBuf, source: Error, }, WriteDepInfo { path: PathBuf, source: Error, }, UnsafeDepInfoOutput(PathBuf), UnrepresentableDepInfoPath(PathBuf), DepInfoOutsideTarget { path: PathBuf, target: PathBuf, }, MalformedDepInfo { path: PathBuf, reason: String, }, ReadOutDirDependency { path: PathBuf, source: Error, }, UnsafeOutDirDependency(PathBuf), ConflictingOutDirDependency(String), InconsistentObservedOutDir, InvalidObservedOutDirCoordinate(String), InvalidOutDirDependencyPath { path: String, reason: String, }, NonCanonicalOutDirDependencies, RelativeObservedSource(PathBuf), ReadObservedSource { path: PathBuf, source: Error, }, UnsafeObservedSource(PathBuf), ConflictingObservedSource(PathBuf), NonCanonicalSourceDependencies, ObservedSourceHashMismatch { path: PathBuf, expected: String, actual: String, }, NonCanonicalEnvironmentDependencies, InvalidEnvironmentDependencyName { name: String, }, DuplicateEnvironmentDependency { name: String, }, ObservedEnvironmentMismatch { name: String, }, PhaseOwnedEnvironmentMismatch { name: String, }, NonUtf8PhaseOwnedEnvironment(&'static str), MissingOutDirForDependencies, InvalidCachedOutDirDependencies(String), CachedObservedInputsMismatch { unit: DescriptorCargoUnitId, }, OutDirDependencyHashMismatch { path: PathBuf, expected: String, actual: String, }, FinalOutDirDependencySetMismatch { expected: Vec<DescriptorOutDirDependency>, actual: Vec<DescriptorOutDirDependency>, }, FinalSourceDependencySetMismatch { expected: Vec<DescriptorSourceDependency>, actual: Vec<DescriptorSourceDependency>, }, FinalEnvironmentDependencySetMismatch { expected: Vec<DescriptorEnvironmentDependency>, actual: Vec<DescriptorEnvironmentDependency>, }, ReadBuildScriptEnvironment { out_dir: Option<PathBuf>, source: Error, }, CreateStagingDirectory { path: PathBuf, source: Error, }, MissingDescriptorObject(PathBuf), SerializeUnitSidecar(Error), SidecarWithoutParent(PathBuf), InvalidSidecarFileName(PathBuf), WriteSidecar { path: PathBuf, source: Error, }, ConflictingUnitSidecar(PathBuf), InvalidCargoUnitId { value: String, reason: String, },
}
Expand description

Hidden rustc-wrapper failure.

Variants§

§

MissingEnvironment(&'static str)

Required wrapper configuration is missing.

§

NonUtf8EnvironmentName(OsString)

Process environment names must be deterministic UTF-8 hash inputs.

§

NonUtf8EnvironmentValue

Process environment values must be deterministic UTF-8 hash inputs.

Fields

§name: String

Variable name.

§value: OsString

Rejected value.

§

UnsupportedWrapperMode(String)

A future/unknown wrapper protocol was requested.

§

RelativeStagingDirectory(PathBuf)

Relative staging paths would depend on Cargo’s invocation cwd.

§

RelativeDescriptorTargetDirectory(PathBuf)

Descriptor source-closure exclusion must name the exact Cargo target.

§

RelativeSourceExclusionDirectory(PathBuf)

Package source exclusion must use one exact absolute generated root.

§

RelativeCargoManifestDirectory(PathBuf)

Package closure identity requires one absolute Cargo package root.

§

RelativeFinalUnitMap(PathBuf)

Final maps are resolved before Cargo starts and must be exact.

§

RelativeFinalTarget(PathBuf)

Final target confinement begins at one exact absolute runner path.

§

UnsafeFinalTarget(PathBuf)

The runner-owned final target must remain a plain directory.

§

OutDirOutsideFinalTarget

Cargo OUT_DIR must be a strict lexical descendant of the final target.

Fields

§out_dir: PathBuf

Cargo-provided build output directory.

§target: PathBuf

Exact invocation- and wrapper-policy-scoped final target.

§

RelativeFinalPlan(PathBuf)

Proc macros consume one exact content-addressed final plan.

§

InvalidFinalPhase

Final mode must be explicitly authorized by the orchestrator.

§

InvalidSha256

Hash inputs use one exact lowercase encoding.

Fields

§name: &'static str

Environment or field name.

§value: String

Rejected value.

§reason: String

Validation detail.

§

InvalidCargoExtraFilename

Cargo’s rustc output discriminator must be one safe filename fragment.

Fields

§context: &'static str

Validation boundary.

§value: String

Rejected discriminator.

§reason: String

Validation detail.

§

FinalUnitMapFilename

Content-addressed filename did not match the expected hash.

Fields

§path: PathBuf

Exact path.

§expected: String

Expected filename.

§

ReadFinalUnitMap

Map bytes could not be read.

Fields

§path: PathBuf

Exact path.

§source: Error

I/O failure.

§

FinalUnitMapHashMismatch

Content-addressed map bytes changed.

Fields

§path: PathBuf

Exact path.

§expected: String

Required digest.

§actual: String

Actual digest.

§

ParseFinalUnitMap

Map JSON was malformed.

Fields

§path: PathBuf

Exact path.

§source: Error

JSON failure.

§

FinalUnitMapFormat(String)

Wrong external map format.

§

FinalUnitMapSchema

Wrong map schema.

Fields

§actual: u16

Actual version.

§expected: u16

Required version.

§

FinalUnitMapPlanId

Map and final compilation named different plans.

Fields

§expected: String

Environment plan.

§actual: String

Map plan.

§

FinalUnitMapPlanFileHash

Map and final compilation named different exact plan files.

Fields

§expected: String

Environment hash.

§actual: String

Map hash.

§

NonCanonicalFinalUnitMap

Serialized entries must be strictly coordinate-sorted.

§

RelativeMappedManifest(PathBuf)

Deserialized coordinate must remain phase invariant.

§

NonCanonicalFinalCoordinate(&'static str)

Set-valued coordinate field was duplicated or unsorted.

§

EmptyFinalProfile

Optional profile names cannot use an empty sentinel.

§

FinalCoordinateContainsPlanCfg

Descriptor coordinates cannot contain final cfgs.

§

FinalCoordinateFeatureMismatch

Map feature list disagreed with its cfgs.

§

AmbiguousFinalUnitCoordinate

Two entries would let wrapper order choose identity.

Fields

§coordinate: FinalUnitCoordinate

Ambiguous coordinate.

§first: String

First unit.

§second: String

Second unit.

§

UnexpectedFinalPlanCfg(String)

Cargo-owned inputs may not contain a wrapper-owned final cfg.

§

MissingRustcProgram

Cargo did not provide the real rustc executable as argv[1].

§

ComposedWorkspaceWrapper

Cargo silently composes a configured workspace wrapper inside Proa’s wrapper. That extra program is not part of descriptor/final identity.

Fields

§wrapper: OsString

Workspace wrapper inserted by Cargo.

§rustc: OsString

Actual rustc program nested inside the workspace wrapper.

§

SpawnRustc

rustc could not be launched.

Fields

§program: PathBuf

Program supplied by Cargo.

§source: Error

Process error.

§

RustcIdentityFailed

rustc version material could not be obtained.

Fields

§program: PathBuf

Program supplied by Cargo.

§status: ExitStatus

Failed exit status.

§

MissingRustcOptionValue(&'static str)

rustc option lacks a required following value.

§

MissingDepInfoOutput

Cargo compilation must request one dep-info output for exact generated source auditing.

§

DuplicateDepInfoOutput

Multiple dep-info destinations would make the audited source set order-dependent.

§

UnsupportedDefaultDepInfoWithOutput

A default dep-info path cannot be inferred safely when rustc also owns a single explicit output path.

§

CurrentDirectory(Error)

The wrapper could not resolve a relative rustc output path.

§

NonUtf8RustcArgument(OsString)

Paths may be non-UTF-8, but rustc option spelling must be unambiguous.

§

UnsupportedRustcOption(String)

A future rustc option must be classified before entering unit identity.

§

UnsupportedBinaryDepDepInfo

Binary dependency dep-info would bind descriptor/final target-specific rlibs, metadata, and sysroot artifacts into the source protocol.

§

UnsupportedLogicalEnvironmentInjection

rustc’s logical environment injection is not yet modeled separately from the wrapper process environment.

§

UnsupportedDepInfoPathRemapping(String)

rustc remapping changes dep-info path spelling, so the strict v1 generated-input audit cannot resolve those paths back to exact files.

§

MissingCrateName

No --crate-name was present.

§

MissingCrateType

No crate type was present.

§

MissingRustcInput

No source input was present.

§

MultipleRustcInputs

More than one positional source was present.

§

MalformedExtern(String)

--extern syntax is incomplete.

§

ConflictingExtern(String)

Two paths for the same extern name had different bytes.

§

RelativeExternArtifact(PathBuf)

Exact Cargo joins require the absolute path Cargo reports in JSON.

§

HashInput

A source or exact dependency artifact could not be hashed.

Fields

§path: PathBuf

Exact input path.

§source: Error

Read error.

§

HashPackageSourceClosure

The conservative package-local source closure could not be hashed.

Fields

§path: PathBuf

Exact Cargo package root.

§source: Error

Traversal or read error.

§

RelativeOutDir(PathBuf)

Cargo build-script output directories must be absolute.

§

RelativeDepInfoWorkingDirectory(PathBuf)

Relative dep-info bases would make cached source resolution depend on the caller process cwd.

§

OutDirOutsideDescriptorTarget

The descriptor OUT_DIR must be owned by the exact descriptor target.

Fields

§out_dir: PathBuf

Cargo-provided build output directory.

§target: PathBuf

Orchestrator-owned target directory.

§

ReadDepInfo

rustc’s exact dep-info could not be read.

Fields

§path: PathBuf

Exact dep-info path.

§source: Error

Read failure.

§

WriteDepInfo

A stale dep-info output could not be removed before rustc.

Fields

§path: PathBuf

Exact dep-info path.

§source: Error

Filesystem failure.

§

UnsafeDepInfoOutput(PathBuf)

Dep-info paths must remain regular files owned by rustc.

§

UnrepresentableDepInfoPath(PathBuf)

rustc’s dep-info encoding cannot represent this path without ambiguity (non-UTF-8, backslash, non-space whitespace, or trailing space on a file).

§

DepInfoOutsideTarget

The wrapper may remove only Cargo target-owned dep-info outputs.

Fields

§path: PathBuf

Rejected dep-info path.

§target: PathBuf

Orchestrator-owned target.

§

MalformedDepInfo

rustc’s dep-info was not canonical Makefile dependency syntax.

Fields

§path: PathBuf

Exact dep-info path.

§reason: String

Parse detail.

§

ReadOutDirDependency

A generated source input could not be inspected or hashed.

Fields

§path: PathBuf

Exact generated input.

§source: Error

Filesystem failure.

§

UnsafeOutDirDependency(PathBuf)

Generated source inputs must be regular files beneath one exact OUT_DIR.

§

ConflictingOutDirDependency(String)

One dep-info file cannot report conflicting bytes for the same portable generated-source path.

§

InconsistentObservedOutDir

OUT_DIR presence, its portable coordinate, and its live path must agree.

§

InvalidObservedOutDirCoordinate(String)

A serialized OUT_DIR coordinate is not a portable relative path.

§

InvalidOutDirDependencyPath

Serialized generated-source paths are strict portable relative paths.

Fields

§path: String

Rejected path.

§reason: String

Validation detail.

§

NonCanonicalOutDirDependencies

Dependency records are sorted and unique so map order cannot select behavior.

§

RelativeObservedSource(PathBuf)

Non-OUT_DIR observed source paths must be canonical absolute paths.

§

ReadObservedSource

An observed source could not be inspected or hashed.

Fields

§path: PathBuf

Exact source path.

§source: Error

Filesystem failure.

§

UnsafeObservedSource(PathBuf)

Symlinks and special files are not stable exact source inputs.

§

ConflictingObservedSource(PathBuf)

Canonical aliases cannot appear twice in one exact source set.

§

NonCanonicalSourceDependencies

Absolute source records are sorted and unique.

§

ObservedSourceHashMismatch

Live source bytes changed after descriptor observation.

Fields

§path: PathBuf

Exact source path.

§expected: String

Descriptor-time hash.

§actual: String

Current hash.

§

NonCanonicalEnvironmentDependencies

Environment records are sorted, unique, and cannot contain wrapper control names.

§

InvalidEnvironmentDependencyName

Environment names must be nonempty and cannot be phase-owned controls.

Fields

§name: String

Rejected name. Values are never included.

§

DuplicateEnvironmentDependency

One dep-info file declared the same environment variable twice.

Fields

§name: String

Repeated name. Values are never included.

§

ObservedEnvironmentMismatch

Current user/Cargo environment presence or value hash diverged.

Fields

§name: String

Divergent name. Values are deliberately redacted.

§

PhaseOwnedEnvironmentMismatch

A compiler-tracked wrapper control disagreed with the exact child environment. Its value remains redacted.

Fields

§name: String

Divergent phase-owned name.

§

NonUtf8PhaseOwnedEnvironment(&'static str)

Phase-owned paths/IDs must be UTF-8 before rustc can report them in its UTF-8 dep-info protocol.

§

MissingOutDirForDependencies

A mapped unit that consumed generated source requires Cargo’s OUT_DIR.

§

InvalidCachedOutDirDependencies(String)

Cached sidecars are validated before any generated path is joined.

§

CachedObservedInputsMismatch

Current Cargo-authoritative dep-info no longer names the exact cached generation. Values remain redacted.

Fields

§unit: DescriptorCargoUnitId

Cached base unit.

§

OutDirDependencyHashMismatch

Current generated source bytes diverged before final compilation.

Fields

§path: PathBuf

Exact final input path.

§expected: String

Descriptor-time hash.

§actual: String

Current final hash.

§

FinalOutDirDependencySetMismatch

Final rustc observed a different generated-source set than descriptor rustc. This intentionally rejects final-only includes in v1.

Fields

§expected: Vec<DescriptorOutDirDependency>

Descriptor-time exact set.

§actual: Vec<DescriptorOutDirDependency>

Final rustc exact set.

§

FinalSourceDependencySetMismatch

Final rustc observed another exact non-OUT_DIR source set.

Fields

§expected: Vec<DescriptorSourceDependency>

Descriptor-time exact set.

§actual: Vec<DescriptorSourceDependency>

Final rustc exact set.

§

FinalEnvironmentDependencySetMismatch

Final rustc observed another redacted environment set.

Fields

§expected: Vec<DescriptorEnvironmentDependency>

Descriptor-time redacted set.

§actual: Vec<DescriptorEnvironmentDependency>

Final rustc redacted set.

§

ReadBuildScriptEnvironment

Cargo’s build-script output declares the arbitrary rustc-env names.

Fields

§out_dir: Option<PathBuf>

Cargo-provided output directory, when one was present.

§source: Error

Missing/malformed build-script output.

§

CreateStagingDirectory

Staging directory creation failed.

Fields

§path: PathBuf

Directory path.

§source: Error

I/O error.

§

MissingDescriptorObject(PathBuf)

Successful rustc did not produce the explicitly requested object.

§

SerializeUnitSidecar(Error)

Unit sidecar serialization failed.

§

SidecarWithoutParent(PathBuf)

Sidecar target has no valid parent.

§

InvalidSidecarFileName(PathBuf)

Sidecar path has no UTF-8 filename.

§

WriteSidecar

Atomic sidecar write failed.

Fields

§path: PathBuf

Output or temporary path.

§source: Error

I/O error.

§

ConflictingUnitSidecar(PathBuf)

Same content identity unexpectedly produced different sidecar bytes.

§

InvalidCargoUnitId

A sidecar or orchestrator input contained a malformed unit identity.

Fields

§value: String

Rejected representation.

§reason: String

Validation detail.

Trait Implementations§

Source§

impl Debug for WrapperError

Source§

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

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

impl Display for WrapperError

Source§

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

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

impl Error for WrapperError

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more