Skip to content

Keep weft's build folders to what is still used - #99

Merged
qfeuilla merged 2 commits into
mainfrom
bounded-build-caches
Oct 28, 2026
Merged

qfeuilla merged 2 commits into
mainfrom
bounded-build-caches

Conversation

@qfeuilla

Copy link
Copy Markdown
Contributor

weft's build folders grew by a full copy of weft at every update. Now each keeps only what is still used, with no time rule:

  • Project compile lanes and the seed (worker-target/): each program weft builds records the compiled units and shared source crates it used (used.json beside it). After every build a lane and the seed keep only what some program on the machine was built from.
  • Shared source crates (worker-crates/): same record. A build holds a shared lock from staging until its compile ends, so a reclaim never removes what a build in flight needs.
  • A checkout's target/ (setup.sh from source): weft trim-cargo-target keeps, of the units built the same way, the newest, plus everything the newest top-level builds were built against. Measured on a real tree: tests, clippy, e2e and release builds recompile nothing after the trim.

Removes the old 30-day / three-versions rules and WEFT_TARGET_CAP_GB.

@qfeuilla
qfeuilla merged commit 21c50be into main Oct 28, 2026
25 checks passed
@qfeuilla
qfeuilla deleted the bounded-build-caches branch October 28, 2026 10:06
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