pub struct PruneOptions {
pub idle_days: u64,
pub dry_run: bool,
pub force: bool,
pub only_dirs: Option<Vec<String>>,
pub adapters: AdapterFilter,
pub min_size_bytes: u64,
pub scan_depth: usize,
pub allow_manifest_rewrite: bool,
pub command_timeout_secs: u64,
pub build_idle_days: u64,
pub adapter_idle_days: BTreeMap<String, u64>,
}Expand description
Everything that shapes a prune pass beyond the repository itself.
Default is written out rather than derived: scan_depth has a real default that is
not zero, and a derived one would have made every ..Default::default() call site
quietly walk a single level and report a monorepo as empty.
Fields§
§idle_days: u64Days of inactivity required before the repository is eligible.
dry_run: boolReport sizes and stop. Nothing is verified and nothing is deleted.
force: boolBypass the idle check. Lockfile verification still applies.
only_dirs: Option<Vec<String>>Restrict the pass to these repository-relative bloat directory labels.
Some means a caller has already chosen — the interactive selector, or the
second phase of devp run. The size floor is not applied on top of an explicit
choice, because the caller has already decided these directories are wanted.
adapters: AdapterFilterWhich package managers may act.
min_size_bytes: u64Smallest directory worth deleting. 0 disables the floor.
scan_depth: usizeHow deep to walk each repository looking for projects.
The global setting. A repository’s own .devprune.json may raise or lower it —
see workspace::resolve_depth, which this is fed into.
allow_manifest_rewrite: boolWhether an adapter may run the sync command that rewrites its tracked lockfile.
command_timeout_secs: u64Ceiling on any one package-manager command, in seconds.
The user’s command_timeout_secs. It was settable, displayed by devp status
and named in the timeout message long before anything actually read it here.
build_idle_days: u64Idle days required before build-tree directories are touched.
Applied as max(build_idle_days, idle_days), only to adapters that answer
crate::adapters::PackageManager::opt_in — cargo, gradle, maven and swift. A
recompile costs more than a reinstall, so those directories wait longer.
adapter_idle_days: BTreeMap<String, u64>Per-adapter idle windows, keyed by adapter name; the user’s adapter_idle_days.
A floor on top of everything else, never a bypass — see
PruneOptions::idle_threshold_for.
Implementations§
Trait Implementations§
Source§impl Clone for PruneOptions
impl Clone for PruneOptions
Source§fn clone(&self) -> PruneOptions
fn clone(&self) -> PruneOptions
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 PruneOptions
impl Debug for PruneOptions
Auto Trait Implementations§
impl Freeze for PruneOptions
impl RefUnwindSafe for PruneOptions
impl Send for PruneOptions
impl Sync for PruneOptions
impl Unpin for PruneOptions
impl UnsafeUnpin for PruneOptions
impl UnwindSafe for PruneOptions
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> 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