Repository navigation
·
18 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Kache 1.2.2 makes kache clean tell you what it is waiting for instead of skipping every target, and makes the CLI report what it actually did. Several commands now exit with a different code; read the upgrade notes if a script calls Kache.
cargo install kache --locked --version 1.2.2Cleanup
kache cleannames what blocks it. While any Cargo command run through Kache is open, such as acargo runleft running for hours, cleanup can't delete targets.--yesused to skip each target with "in use" and remove nothing. It now prints one line naming the command, its pid and how long it has run, and the dry run shows the same thing, so the preview matches the real run.kache cleanandkache gcshow a spinner while they work. #1563- Failed removals are reported. A removal that fails is listed, and the command exits 1. In JSON it appears under
failedwithsuccess: false. #1568 - Clearing the cache keeps the list of tracked targets.
kache clean --cache --yesused to forget every tracked target, so targets of deleted worktrees stayed on disk. #1568 - A target reached through
..stays tracked after its worktree is deleted, for exampleCARGO_TARGET_DIR=<worktree>/../shared. #1568 kache targetssays orphaned targets are automatic. The daemon removes targets of deleted worktrees a day after their last build.--orphansis now listed in help for removing them sooner. #1575
This release doesn't change which commands block cleanup: a long cargo run through Kache still blocks every target until it exits.
Setup and configuration
kache configno longer overwrites your file. It refuses a config that doesn't parse, names the error, and keeps comments and unknown keys when it saves. Other commands warn once that they are using the defaults. #1567kache doctor --fixedits only an sccacherustc-wrapper, and backs up the Cargo config first. It used to replace "sccache" everywhere in the file. #1567kache init --checkmatches the real run, including thebuild.rustdocedit, and--jsonreports what a run did.initaccepts--dry-run/-n. #1576build.rustdocsetup handles commented table headers in an existing Cargo config, and leaves the file alone when the edit isn't safe. Thanks to Viktor (@viktorius007). #1583kache doctorhas oneRUSTC_WRAPPERcheck, where two could disagree, and its hints name commands that exist, such askache init --shims. #1576
Reports
- Edit-rebuild sessions are counted.
kache statsreported "0 of 0 crates from cache" for a session of incremental rebuilds. It now counts every compile Kache ran without storing. #1574 kache explain <crate>reports the latest event, including an uncached compile after an old miss. "Costliest first" is sorted by compile time. #1574- Units and times agree across formats: GiB and MiB in Markdown reports, one decimal for durations under a minute, local times everywhere. #1574
kache stats --redactremoves every path, including build roots and store paths it used to leave in. #1565- Skipped builds show their own reason in reports. Thanks to Viktor (@viktorius007). #1578
- A torn write no longer hides the events around it. Thanks to Viktor (@viktorius007). #1579
Caching
- Build-script
rerun-if-changedlines with surrounding spaces are honored, as Cargo does. Predictions recorded by the old parser are not reused. Thanks to Viktor (@viktorius007). #1564
Security
- rustls 0.23.46 for RUSTSEC-2026-0346, -0347 and -0348. #1566
Upgrade notes
Exit codes and argument checks changed. Scripts that relied on the old behaviour:
- Argument errors exit 2 with
invalid_arguments.--format,list --sortandtelemetry write --phasereject unknown values; every documented spelling still works.kache sync --pull --pushis now an error. #1573 - Without a terminal, a command that would ask first exits 1 unless you pass
--yes,--dry-runor--json.kache clean --cache,--crateand--unitsused to print "Nothing removed." and exit 0. #1568, #1576 kache daemon stopwith no daemon running exits 0. Output piped into a closed reader, such askache … | head, ends with 0 unless the command was reporting a failure. #1573kache explain <crate> --jsonreports"command": "explain"instead ofwhy-miss. No other JSON field was renamed or removed. #1574
Contributors
Full changelog: v1.2.1...v1.2.2