Repository navigation
fix(dylint): key dylint-output-cache on the resolved soldr identity (#678) - #679
Merged
Merged
Conversation
…678) Soldr owns the lint-library store layout under target/dylint, and 0.9.51 -> 0.9.53 changed it. The dylint-output-cache key omitted the soldr version, so after an upgrade every run exact-hit the entry the old soldr wrote, rebuilt everything, and skipped the save because the hit was exact. The stale entry was never replaced until deleted by hand. Fold the resolved soldr identity (soldrDigest: repo, ref, source identity, resolved version) into the non-Cargo.lock hash so both the exact key and the restore-keys prefix change on a soldr bump. Fixes #678 Local-Gate: v1 tree=ae7b62c53a6bf97418df21ff93fd6bd2e6a10c54 secs=104 lanes=lint:run,typecheck:run,tests:run Ci-Attestation: {"at":1795062504,"gate":"general/all/lint","host":"linux-x86_64","key":"6651166a4ea8","lane":"lint","parents":["db9aa035e488f4dde7d31d5c8cb4ec20ec99c6c1"],"secs":1,"stamp":"4ecd48272ab74d56f6545cfb25d077f2","tree":"ae7b62c53a6bf97418df21ff93fd6bd2e6a10c54","v":1,"via":"run"} Ci-Attestation: {"at":1795062504,"gate":"general/all/typecheck","host":"linux-x86_64","key":"198926c05a51","lane":"typecheck","parents":["db9aa035e488f4dde7d31d5c8cb4ec20ec99c6c1"],"secs":6,"stamp":"efd3f86ab909aeaf7800e4268b2b979f","tree":"ae7b62c53a6bf97418df21ff93fd6bd2e6a10c54","v":1,"via":"run"} Ci-Attestation: {"at":1795062504,"gate":"general/linux-x86_64/test","host":"linux-x86_64","key":"e67c342c9b30","lane":"tests","parents":["db9aa035e488f4dde7d31d5c8cb4ec20ec99c6c1"],"secs":95,"stamp":"85c9ced9fdcbaa942e4e17932cb6f1a3","tree":"ae7b62c53a6bf97418df21ff93fd6bd2e6a10c54","v":1,"via":"run"}
This was referenced Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #678.
Problem
The
dylint-output-cachekey (setup-soldr-dylint-output-v2-<os>-<arch>-<nonLockHash>-<lockHash>) did not include the soldr version. Soldr owns the lint-library store layout undertarget/dylint, and 0.9.51 -> 0.9.53 changed it. After the upgrade, every run exact-hit the entry the old soldr wrote, rebuilt everything (FastLED/fbuild run 44342451011: 1,525 misses, Dylint 18 min vs 13), and then skipped the save because the hit was exact. The stale entry stayed until someone deleted it by hand.Fix
src/lib/resolve-setup.tsnow addssoldr: soldrDigesttodylintOutputNonLockInputs.soldrDigestis the soldr identity digest the build cache already uses: repo, ref, source identity and resolved version. Because it is in the non-Cargo.lock hash, a soldr bump changes both the exact key and therestore-keysprefix, so the restore cannot fall back to an entry with the old layout either. The key shape (...-v2-...) is unchanged. Expect one cold Dylint run per soldr bump.Not done: "save under a fresh key when a hit recompiled a lot"
I left out the issue's optional second suggestion. Actions cache keys are immutable, and restore always prefers the exact key. A "fresh key" save would only help if restore also learned to prefer it over the stale exact entry. That needs a recompile-count signal for Dylint (the existing compile-count gate only counts zccache) plus new restore ordering, which is not a small, well-tested change. With the soldr identity in the key, the known cause of a useless exact hit is gone.
Tests
dylint-output-cache key and restore-keys change when the resolved soldr version changes (setup-soldr#678)in__tests__/resolve-setup.test.ts. I confirmed it fails onmain(same key for 0.9.51 and 0.9.53) and passes with the fix. It also checks that0.9.53andv0.9.53give the same key.dist/was rebuilt withnpm run build.