Skip to main content

maintain_shared_incremental_target_at_most_every

Function maintain_shared_incremental_target_at_most_every 

Source
pub fn maintain_shared_incremental_target_at_most_every(
    spec: &WasmBuildSpec,
    policy: SharedIncrementalTargetPrunePolicy,
    minimum_interval: Duration,
) -> Result<SharedIncrementalTargetMaintenanceOutcome, WasmBuildError>
Expand description

Apply whole-target retention at most once per interval across processes.

The schedule marker is checked under the same lock used by shared Cargo builds. A matching successful pass inside minimum_interval returns SharedIncrementalTargetMaintenanceOutcome::Skipped without resolving Cargo inputs or traversing the target. Missing targets are not created. Changing the policy makes maintenance immediately due, and a zero interval always evaluates retention.

Due maintenance performs exact Cargo input resolution before inspecting or clearing the target. Failures are returned and are not recorded as a successful pass, so an unsafe configuration cannot be hidden by the schedule.