pub struct Settings {Show 25 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_cargo: bool,
pub enable_gradle: bool,
pub enable_maven: bool,
pub enable_swift: bool,
pub enable_dart: bool,
pub enable_mix_build: bool,
pub build_idle_days: u64,
pub auto_update: bool,
pub disabled_adapters: Vec<String>,
pub adapter_idle_days: BTreeMap<String, u64>,
}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_cargo: boolWhether the opt-in Cargo adapter is active. Off by default, and the reason is
the same one that keeps enable_gradle off: Rust’s target/ is compiler
output. cargo metadata --locked proves the crates come back from
Cargo.lock, but nothing downloads a compiled artefact — the directory returns
only by rebuilding, which on a large workspace is minutes rather than the
seconds a dependency reinstall costs. See crate::adapters::cargo_adapter.
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.
enable_dart: boolWhether the opt-in Dart and Flutter adapter is active. Off by default: the pub
metadata in .dart_tool/ is a second’s work to restore, but the build_runner
and flutter_build caches beside it are compiler output and come back only by
recompiling. See crate::adapters::dart.
enable_mix_build: boolWhether the opt-in Mix build-tree adapter is active. Off by default, and separate
from the always-on mix adapter: that one deletes deps/, which comes back by
downloading, while _build/ comes back only by recompiling the project and every
dependency in it. See crate::adapters::mix_build.
build_idle_days: u64Idle days required before build-tree directories (cargo, 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 a newer release installs itself at the end of a prune pass, once the periodic check has found one.
On by default. A pruner that runs on a schedule is exactly the kind of tool
nobody thinks to upgrade, and an old one keeps whatever bug it shipped with
forever. What runs here is the download-and-replace half only: see
crate::commands::update::maybe_auto_update, which never hands the machine to
a package manager unattended and stands aside entirely on WinGet, Scoop and
Homebrew, where the manager owns the upgrade.
disabled_adapters: Vec<String>Adapters switched off by name, whatever their lockfiles say.
A deny-list rather than twenty 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.
adapter_idle_days: BTreeMap<String, u64>Per-adapter idle windows, in days, keyed by adapter name.
The one dial that is neither global nor per-repository: “wait longer before touching Rust” is a statement about a toolchain, not about one checkout, and before this it could only be said by moving the global window for everything.
A floor, never a bypass. The value is applied as
max(idle_days, adapter_idle_days[name]), so it can only make an adapter wait
longer than the repository-level check already requires. A smaller number is
accepted and simply has no effect — the repository gate runs first and is the
same gate for every adapter, and letting one adapter lower it would be a
bypass of the idle check rather than a preference.
BTreeMap rather than HashMap so the JSON round-trips in a stable order and
a diff of the registry file shows what actually changed.
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