#[non_exhaustive]pub enum ValidationError {
ParseError {
message: String,
location: Location,
},
DuplicateAttribute(DuplicateAttr),
FollowsCycle {
cycle: Cycle,
location: Location,
},
FollowsStale {
edge: Edge,
location: Location,
},
FollowsTargetNotToplevel {
edge: Edge,
location: Location,
},
FollowsContradiction {
edges: Vec<Edge>,
location: Location,
},
FollowsStaleLock {
source_path: AttrPath,
declared_target: AttrPath,
lock_target: Option<AttrPath>,
location: Location,
},
FollowsDepthExceeded {
edge: Edge,
depth: usize,
max_depth: usize,
location: Location,
},
}Expand description
Errors raised while parsing or analysing a flake.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParseError
rnix could not parse the source.
DuplicateAttribute(DuplicateAttr)
Duplicate attribute in an attribute set.
FollowsCycle
A declared inputs.X.inputs.Y.follows chain forms a cycle.
FollowsStale
A follows declaration in flake.nix points at a nested input that no
longer exists in flake.lock. Warning: the auto-follow pass should
drop the declaration on the next run.
Fields
FollowsTargetNotToplevel
A follows target points at something that is not a top-level input,
e.g. inputs.foo.inputs.bar.follows = "does-not-exist".
FollowsContradiction
Two follows declarations share a source path but disagree on the target.
FollowsStaleLock
A declared follows whose target diverges from the lockfile’s
resolution of the same source path. Warning: the user edited
flake.nix but never ran nix flake lock.
Fields
source_path: AttrPathSource path of the declared follows, e.g. crane.nixpkgs.
Renamed from source because thiserror treats a field named
source as the error’s #[source].
FollowsDepthExceeded
A follows path is deeper than the configured graph traversal bound.
Implementations§
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
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 ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
impl Eq for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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()
Source§impl PartialEq for ValidationError
impl PartialEq for ValidationError
Source§fn eq(&self, other: &ValidationError) -> bool
fn eq(&self, other: &ValidationError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more