Skip to content

README: document early cutoff, trade-offs, and cache invalidation#19

Merged
r-vdp merged 1 commit intomainfrom
readme-cutoff
Apr 22, 2026
Merged

README: document early cutoff, trade-offs, and cache invalidation#19
r-vdp merged 1 commit intomainfrom
readme-cutoff

Conversation

@r-vdp
Copy link
Copy Markdown
Member

@r-vdp r-vdp commented Apr 22, 2026

Stacked on #17.

The README's "How it works" still described the pre-#17 drv-path-only cache
key, so the headline behaviour (edit a deep crate → 2 rebuilt instead of
N) wasn't explained anywhere user-facing.

Adds:

  • Early cutoff section: the eff(c) = H(own_src ‖ dep output hashes)
    model, the worked 20-revdep example, and why it differs from cargo's
    mtime cascade.
  • Two-tier propagation: why lib→lib keys on rmeta (deterministic,
    early-gated) but link targets key on full rlib bytes (rlibs aren't
    reproducible under -C incremental).
  • Trade-offs: hash cost on the critical path; reliance on rmeta
    determinism (degrades to slow-not-wrong if rustc breaks it); leaf
    relinks always fire; the ambient-build.rs-input gap; not for CI.
  • When to invalidate manually: the four cases that actually need
    bob clean (ambient rerun-if-env-changed, non-hermetic cc,
    -C incremental corruption, disk pressure) and a table of what each
    clean variant removes — including the footnote that tracked units'
    eff-keyed artifacts aren't addressable by member name.

Also fixes the stale module doc on crates/core/src/cache.rs.

Base automatically changed from early-cutoff to main April 22, 2026 15:06
The "How it works" cache step still described the pre-cutoff drv-path
keying. Add the eff-key model, the rmeta/rlib two-tier split, the cases
where cutoff doesn't help (rmeta non-determinism, leaf relinks, ambient
build.rs inputs), and what `bob clean` actually removes — in particular
that tracked units' eff-keyed artifacts aren't addressable by name.

Also fix the stale module doc on cache.rs.
@r-vdp r-vdp enabled auto-merge April 22, 2026 15:09
@r-vdp r-vdp merged commit e30fcb6 into main Apr 22, 2026
2 checks passed
@r-vdp r-vdp deleted the readme-cutoff branch April 22, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant