pub enum ResolverError {
Show 16 variants
NotADependency {
name: String,
},
MissingFile {
dep: String,
path: PathBuf,
kind: MissingFileKind,
},
AmbiguousSubPath {
dep: String,
path: String,
entries: Vec<String>,
},
MissingManifest {
path: PathBuf,
},
NotInLockfile {
dep: String,
},
LockfileSourceMismatch {
dep: String,
},
SignerKeyMismatch {
dep: String,
source_url: Option<String>,
path: Option<String>,
expected: Box<VerifyingKey>,
observed: Box<VerifyingKey>,
},
UntrustedSigner {
dep: String,
signer: Box<VerifyingKey>,
identity: Option<SignerIdentity>,
},
UnexpectedSigner {
dep: String,
observed: Box<VerifyingKey>,
identity: Option<SignerIdentity>,
},
SignatureDowngrade {
dep: String,
expected_signer: Box<VerifyingKey>,
},
RequireSignedViolation {
dep: String,
},
QuotedImportEscapesRoot {
dep: String,
file: String,
import: String,
},
Io {
path: PathBuf,
source: Error,
},
Manifest(ManifestError),
Lockfile(LockfileError),
RelativePath(RelativePathError),
}Expand description
An error returned by the Resolver trait or
any resolver-layer operation.
Variants§
NotADependency
The symbolic path’s head does not appear in the consumer’s
dependencies map.
MissingFile
A required file was not found, or was excluded.
Fields
kind: MissingFileKindWhich kind of lookup failed.
AmbiguousSubPath
A symbolic sub-path component matched more than one directory entry after hyphen-to-underscore normalization.
Fields
MissingManifest
A dependency directory did not contain a module.json.
NotInLockfile
A dependency is not present in the lockfile. Run
sprocket dev module lock to update it.
LockfileSourceMismatch
The manifest source for a dependency does not match the
lockfile source. Run sprocket dev module lock to update.
SignerKeyMismatch
A cached module’s signature key does not match the lockfile’s recorded signer.
Fields
expected: Box<VerifyingKey>The signer key recorded in the lockfile.
observed: Box<VerifyingKey>The signer key observed in the cache.
UntrustedSigner
A locked dependency signer is not present in the trust store.
Fields
signer: Box<VerifyingKey>The signer key recorded in the lockfile.
identity: Option<SignerIdentity>Optional signer identity metadata.
UnexpectedSigner
A dependency was unsigned when locked but now has a signature.
Fields
observed: Box<VerifyingKey>The signer key observed in module.sig.
identity: Option<SignerIdentity>Authenticated signer identity metadata.
SignatureDowngrade
A dependency was signed when the lockfile was written but is now
unsigned. This prevents a supply-chain downgrade where an
attacker strips the signature from a module whose content hash
has not changed (since module.sig is excluded from the hash).
Fields
expected_signer: Box<VerifyingKey>The signer key recorded in the lockfile.
RequireSignedViolation
require_signed is enabled and the dependency is unsigned.
QuotedImportEscapesRoot
A quoted import inside a module resolves to a file outside the
module root, which makes the module invalid.
Fields
Io
An I/O error.
Manifest(ManifestError)
A Manifest parse or validation error.
Lockfile(LockfileError)
A Lockfile parse or validation error.
RelativePath(RelativePathError)
A RelativePath validation error.
Trait Implementations§
Source§impl Debug for ResolverError
impl Debug for ResolverError
Source§impl Display for ResolverError
impl Display for ResolverError
Source§impl Error for ResolverError
impl Error for ResolverError
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()