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.
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
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
InvalidCargoExtraFilename
Cargo’s rustc output discriminator must be one safe filename fragment.
Fields
FinalUnitMapFilename
Content-addressed filename did not match the expected hash.
ReadFinalUnitMap
Map bytes could not be read.
FinalUnitMapHashMismatch
Content-addressed map bytes changed.
ParseFinalUnitMap
Map JSON was malformed.
FinalUnitMapFormat(String)
Wrong external map format.
FinalUnitMapSchema
Wrong map schema.
FinalUnitMapPlanId
Map and final compilation named different plans.
FinalUnitMapPlanFileHash
Map and final compilation named different exact plan files.
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: FinalUnitCoordinateAmbiguous coordinate.
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
SpawnRustc
rustc could not be launched.
RustcIdentityFailed
rustc version material could not be obtained.
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.
HashPackageSourceClosure
The conservative package-local source closure could not be hashed.
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
ReadDepInfo
rustc’s exact dep-info could not be read.
WriteDepInfo
A stale dep-info output could not be removed before rustc.
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.
MalformedDepInfo
rustc’s dep-info was not canonical Makefile dependency syntax.
ReadOutDirDependency
A generated source input could not be inspected or hashed.
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.
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.
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
NonCanonicalEnvironmentDependencies
Environment records are sorted, unique, and cannot contain wrapper control names.
InvalidEnvironmentDependencyName
Environment names must be nonempty and cannot be phase-owned controls.
DuplicateEnvironmentDependency
One dep-info file declared the same environment variable twice.
ObservedEnvironmentMismatch
Current user/Cargo environment presence or value hash diverged.
PhaseOwnedEnvironmentMismatch
A compiler-tracked wrapper control disagreed with the exact child environment. Its value remains redacted.
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: DescriptorCargoUnitIdCached base unit.
OutDirDependencyHashMismatch
Current generated source bytes diverged before final compilation.
Fields
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
CreateStagingDirectory
Staging directory creation failed.
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.
ConflictingUnitSidecar(PathBuf)
Same content identity unexpectedly produced different sidecar bytes.
InvalidCargoUnitId
A sidecar or orchestrator input contained a malformed unit identity.
Trait Implementations§
Source§impl Debug for WrapperError
impl Debug for WrapperError
Source§impl Display for WrapperError
impl Display for WrapperError
Source§impl Error for WrapperError
impl Error for WrapperError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for WrapperError
impl !UnwindSafe for WrapperError
impl Freeze for WrapperError
impl Send for WrapperError
impl Sync for WrapperError
impl Unpin for WrapperError
impl UnsafeUnpin for WrapperError
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> 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