Repository navigation
A long-running test no longer has to keep every build directory on a machine alive. On macOS and Windows, kache clean can reclaim an idle target while Cargo or a test runner uses another. If Kache cannot tell where a command will write, it protects all targets. #2051
What changes for builds
- More cache hits in short checkout paths. An artifact that embeds
/buildor/srccan now be reused in the checkout that produced it. Kache keeps that entry local and scans static archives and Windows import libraries for embedded paths too. Runkache explain <crate>to see why an entry stays local. #2037 · #2040 - Correct objects when compiler inputs change. C and C++ builds now distinguish changes to
SOURCE_DATE_EPOCHand assembler options such as-Wa,--noexecstack. If mise has no active Clang, Kache can find the system Clang without looping through the shim. #2033 · #2023 - More reliable shared stores. Starting the daemon preserves the store directory’s permissions. Linux runners with a shared home and Nix build sandboxes can use a private daemon socket. Remote downloads can also reuse connections after an earlier download finishes. #2041 · #2043 · #2055 · #2056 · #2035
- Cleanup that reclaims more space. Garbage collection can free the parts of an entry that a target no longer holds. If another sweep holds the lock, periodic cleanup retries the busy store after ten minutes. On macOS, a reused process ID no longer makes a dead build appear active. #2050 · #2044 · #2049
GitHub Actions cache writes
To warm the shared cache from a merge queue or a scheduled run on a protected branch, set the events on the job.
env:
KACHE_GITHUB_WRITES: "schedule,merge_group"The runner’s TOML config also accepts github_writes = ["schedule", "merge_group"] under [cache]. Both events are read-only by default. A merge queue checkout cannot grant itself write access through its own project config. #2024
Build reports and diagnostics
Stats JSON records which Cargo command started a build. Cache reports count a compile as a miss when the lookup failed and Kache later declined to store the result. They also credit a prefetch when the downloaded entry serves a local hit. If SQLite cannot open the index, the error now includes the filesystem cause when Kache can identify it. #2023 · #2036 · #2038
Contributors
Thanks to @ainhoa-a, @jleni, @jrandolf, @lightsofapollo, @skyf0l, and @TastyCZ for contributing code to v2.3.1.
These contributions started in community PRs.
- @jrandolf added merge queue cache writes. #2022
- @lightsofapollo fixed macOS process tracking, narrowed target locks, and made partial entries eligible for eviction. #2045 · #2046 · #2047
- @skyf0l fixed C/C++ cache keys, SQLite write contention, remote downloads, report accounting, and checkout-bound artifacts. #2027 · #2028 · #2029 · #2031 · #2032
- @TastyCZ fixed a race in the schema-upgrade tests and added retries for busy stores during periodic garbage collection. #2025 · #2042
Thanks also to the people whose reports helped shape this release.
- @nickbabcock reported the Clang shim loop with mise. #1967
- @macalinao requested Cargo command attribution in build stats and reported the daemon changing shared-store permissions. #1968 · #2039
- @fdietze reported an absolute
OUT_DIRpath in cache keys for a generated parser. #1982 - @skyf0l reported missed cache reuse in short checkout paths and missing static archive scans. #2026
- @fe3dback reported the SQLite index-open error that prompted better diagnostics. #1698