#[non_exhaustive]pub enum SyncError {
Tree(TreeError),
Validation {
errors: Vec<PackValidationError>,
},
Exec(ExecError),
Halted(Box<HaltedContext>),
WorkspaceBusy {
workspace: PathBuf,
lock_path: PathBuf,
},
Lockfile {
path: PathBuf,
source: LockfileError,
},
InvalidOnlyGlob {
pattern: String,
source: Error,
},
EventLogMigration(ManifestError),
SchedulerCancelled,
}Expand description
Error taxonomy surfaced by run.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Tree(TreeError)
The pack-tree walker failed (loader error, git error, cycle, …).
Validation
One or more plan-phase validators flagged the graph.
Fields
errors: Vec<PackValidationError>Aggregated errors from manifest-level + graph-level validators.
Exec(ExecError)
An action executor returned an error.
Retained for backward compatibility; new call sites should prefer
SyncError::Halted which carries full pack + action context.
Kept non-deprecated because From<ExecError> still materialises
the variant for non-sync-loop callers (e.g. ad-hoc helpers).
Halted(Box<HaltedContext>)
Action execution halted; full context (pack, action index, error,
optional recovery hint) lives in HaltedContext. This is the
variant the sync driver emits — SyncError::Exec is only
surfaced by ancillary code paths.
WorkspaceBusy
Another grex process (or thread) already holds the workspace-level
lock. The running sync refused to start to avoid racing two concurrent
walkers into the same workspace. If the lock file at lock_path is
stale (no other grex is actually running), remove it by hand.
Fields
Lockfile
Reading or parsing the resolved-state lockfile failed. Surfaced as
its own variant (rather than folded into Validation) because a
corrupt / unreadable lockfile is an I/O or schema fault, not a
dependency-satisfaction fault. Resolution is operator-level
(restore a backup, delete the file, re-sync), not author-level.
Fields
source: LockfileErrorUnderlying lockfile error.
InvalidOnlyGlob
One of the --only <GLOB> patterns failed to compile. Surfaced
as its own variant so the CLI can map it to a dedicated usage
error exit code instead of the generic sync-failure bucket.
Fields
EventLogMigration(ManifestError)
Migrating the v1.x event log (grex.jsonl) to the v2 canonical
path (.grex/events.jsonl) failed. Operator-level resolution
(check filesystem permissions, free disk space, then retry).
SchedulerCancelled
Cooperative cancellation fired (Ctrl-C / SIGTERM) during a parallel sync. v1.2.0 Stage 1.g wires the rayon walker to surface this distinct-from-failure variant so the CLI can exit with a dedicated cancellation code instead of a generic sync error. Dormant until Stage 1.g — the existing CLI does not yet emit it.
Trait Implementations§
Source§impl Error for SyncError
impl Error for SyncError
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 Freeze for SyncError
impl !RefUnwindSafe for SyncError
impl Send for SyncError
impl Sync for SyncError
impl Unpin for SyncError
impl UnsafeUnpin for SyncError
impl !UnwindSafe for SyncError
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<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