Skip to content

fix(dylint): key dylint-output-cache on the resolved soldr identity (#678) - #679

Merged
zackees merged 1 commit into
mainfrom
fix/678-dylint-output-key-soldr-version
Nov 19, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/678-dylint-output-key-soldr-version

Conversation

@zackees

@zackees zackees commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Fixes #678.

Problem

The dylint-output-cache key (setup-soldr-dylint-output-v2-<os>-<arch>-<nonLockHash>-<lockHash>) did not include the soldr version. Soldr owns the lint-library store layout under target/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.ts now adds soldr: soldrDigest to dylintOutputNonLockInputs. soldrDigest is 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 the restore-keys prefix, 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

  • New 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 on main (same key for 0.9.51 and 0.9.53) and passes with the fix. It also checks that 0.9.53 and v0.9.53 give the same key.
  • Local gate passed: lint, typecheck and tests (1145 pass, 1 skipped). dist/ was rebuilt with npm run build.

…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"}
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.

dylint-output-cache: key omits the soldr version, so an exact hit pins a stale layout forever

1 participant