Four of the fixes here change what the cache is allowed to serve you. If you share a cache between checkouts, machines or CI jobs, upgrade.
Nothing in this release invalidates an existing cache. Entries that were keyed under an unsound rule simply stop matching, which costs a rebuild, never a wrong artifact.
Correctness
- A build that loads a codegen backend is no longer cached (#1093). A backend passed with
-Zcodegen-backendcan write files rustc never reports, so a hit restored the artifacts without them. Found on a CUDA project where 214 of 228 examples came back missing their device artifact. - A crate that reads
OUT_DIRat runtime keeps the absolute path in its key (#1108). The scan that proved a use was only aninclude!locator missed several shapes, among them a computed name, a forwardingmacro_rules!, and a lifetime the scanner read as a character literal. A crate whose sources never mention the variable — because a macro from another crate expands to it — now fails closed.CARGO_MANIFEST_DIRis refused in every allowlist form. - Windows: the garbage collector stops evicting entries still linked into a target directory (#1106). The guard that reads a blob's link count existed only on Unix, so on Windows it did not exist at all. Automatic sweeps also back off when they cannot clear size pressure, instead of sweeping again on every store.
- macOS: an example binary no longer bakes in the path of the checkout that built it (#1102). The debug-map prefix was the output directory, which covers
depsbut notexamples.
Cross-checkout hits
- C-built
-syscrates hit again on Linux (#1101). Every archive a build script produces withcchas a long-name table, whose header GNUarwrites with a blank date. The parser rejected that, so the key fell back to a digest containing the archive's absolute path. Measured on a workspace of ten such crates: all ten missed in a second checkout, and the path-independent digest was used for none of the fifteen archives. - Build-script runs keyed the same in every checkout (#1095), when a path-remapping flag in
CFLAGSspelled the checkout path and the script declaredrerun-if-env-changed=CFLAGS. - A build script's input record is shared across build directories (#1097). Six Cargo jobs on one store each rediscovered the same consumers from scratch.
Speed
- Cold builds spend less time in the store (#1094). Header read-sets are hashed once per content rather than once per translation unit, and a miss stores without an inline fsync, with durability flushed by a detached worker. A hit on a pending entry verifies every blob first. Set
[cache] deferred_durability = falseto keep the old behaviour. Isolated cold builds: eza 35.0 → 31.5 s, hk 94 → 84 s. - Cargo starts dependents earlier (#1100), because rustc's metadata notification is forwarded while output is still being captured.
Diagnostics
kache why-missexplains a miss across checkouts (#1103). Until now the first build in a new clone had no baseline and said so for every crate. It now compares against a build of the same unit in another tree, names the crate that started the cascade, and says when the key is identical so you can stop looking at the key. Both builds need[cache] explain_miss.- The monitor shows one row per build (#1092), including builds that finished before you opened it.
Deploying kache-service
- The chart can create an Ingress (#1099). It is off by default and adds no authentication of its own; set
auth.existingSecretbefore exposing the service beyond a trusted network.