pub struct Settings {Show 21 fields
pub idle_days: u64,
pub check_interval_days: u64,
pub auto_daemon: bool,
pub auto_hooks: bool,
pub auto_setup: bool,
pub auto_config: bool,
pub require_confirmation: bool,
pub command_timeout_secs: u64,
pub min_size_mb: u64,
pub update_check: bool,
pub scan_depth: usize,
pub allow_manifest_rewrite: bool,
pub update_check_interval_days: i64,
pub update_check_timeout_secs: u64,
pub auto_hooks_chain: bool,
pub enable_gradle: bool,
pub enable_maven: bool,
pub enable_swift: bool,
pub build_idle_days: u64,
pub auto_update: bool,
pub disabled_adapters: Vec<String>,
}Expand description
Global settings that control prune behavior.
Fields§
§idle_days: u64Number of inactive days before a repo is eligible for pruning.
check_interval_days: u64Interval in days between automated daemon checks.
auto_daemon: boolWhether the setup pass installs the OS scheduler. On by default.
auto_hooks: boolWhether the setup pass installs the global Git hooks. On by default.
auto_setup: boolWhether dev-prune installs its own missing integrations. On by default.
auto_config: boolWhether link and init write a default .devprune.json into repositories
they register. Off by default; see constants::DEFAULT_AUTO_CONFIG.
require_confirmation: boolWhether interactive confirmation is required before pruning.
command_timeout_secs: u64Timeout in seconds for lockfile enforcement / CLI commands (default 600s = 10m).
min_size_mb: u64Smallest bloat directory worth deleting, in MiB. 0 disables the floor.
Below this size the reinstall costs more than the space is worth, so the directory is not offered as a candidate at all.
update_check: boolWhether dev-prune asks GitHub for the latest release from time to time.
On by default, and opt-out rather than opt-in: an out-of-date cleanup tool is a
tool whose safety fixes you do not have. The request sends nothing but itself —
no identifier, no configuration, no usage data. Turn it off with
devp config set update_check false.
scan_depth: usizeHow many directory levels below a repository root discovery descends.
Six by default. A flat repository never notices; a monorepo that nests projects
under packages/@scope/name/app does. Raise it when devp status does not list
a project you know is there, and remember that the walk gets more expensive with
every level. Clamped to constants::MAX_SCAN_DEPTH_LIMIT.
allow_manifest_rewrite: boolWhether cargo and go may run the sync command that rewrites tracked manifests.
Off. See constants::DEFAULT_ALLOW_MANIFEST_REWRITE — with this off, both are
verified read-only and a project with no lockfile at all is simply not pruned.
update_check_interval_days: i64Days between automatic release checks.
Only the automatic check honours this; devp update always asks, because you
are standing there waiting for the answer.
update_check_timeout_secs: u64How long the release check waits for GitHub before giving up, in seconds.
Five is right on a normal connection and too short behind some corporate proxies, which is the whole reason this is a setting rather than a constant.
auto_hooks_chain: boolWhether the setup pass may install the Git hooks in front of another tool’s.
Off. With it on, a core.hooksPath that belongs to husky is not a reason to skip:
dev-prune takes the slot and forwards every hook back to the directory it
displaced. Behaviour-preserving, but it is still someone else’s setup, so it is
asked for rather than assumed. Same thing as devp hook install --chain.
enable_gradle: boolWhether the opt-in Gradle build-tool adapter is active. Off by default:
build/ comes back by recompiling the project, so nobody should find it
deleted without having asked. See crate::adapters::gradle.
enable_maven: boolWhether the opt-in Maven build-tool adapter is active. Off by default, for the
same reason as enable_gradle. See crate::adapters::maven.
enable_swift: boolWhether the opt-in Swift Package Manager adapter is active. Off by default, for
the same reason as enable_gradle: .build/ holds compiled modules and comes
back through swift build. See crate::adapters::swift.
build_idle_days: u64Idle days required before build-tool directories (gradle, maven, swift) are pruned.
Separate from idle_days because the cost of being wrong is different: a
deleted node_modules is one npm ci away, a deleted Android build/ is a
long recompile. Applied as max(build_idle_days, idle_days).
auto_update: boolWhether devp update --install runs by itself at the end of a prune pass when
a newer release is known. Off by default: replacing the binary is visible,
channel-specific behaviour the user opts into.
disabled_adapters: Vec<String>Adapters switched off by name, whatever their lockfiles say.
A deny-list rather than eighteen enable_* booleans, because the answer for
almost everyone is “none of them” and a list of exceptions says that in one
place. It is a preference, and the opposite of enable_gradle and friends:
those are off until asked for because deleting a build tree is expensive to
undo, whereas node_modules is safe to prune and merely something a particular
person may not want touched.
Names are the adapter names --only/--skip take. Applied in
crate::adapters::detect_adapters, so a disabled adapter is invisible to
every command at once rather than listed by status and skipped by run.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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