Commit 7310d32
committed
ci(dylint): invalidate stale
The `Dylint` workflow's cache `restore-keys` list ends with a key that
matches any prior cache for the same `rust-toolchain`, ignoring the
`dylint.toml` hash. When `dylint.toml` changes the cached
`target/dylint/libraries/libperfectionist.so` is the lib built from
the previous `dylint.toml`. `cargo dylint` does not always detect a
changed `git`/`rev` and reuses the cached `.so` instead of rebuilding.
With `RUSTFLAGS="-D warnings"` enforced, the stale lib re-flags sites
that the current `dylint.toml` revision is supposed to skip, failing
the job.
Add a step between the cache restore and the dylint run that deletes
`target/dylint`. The `~/.cargo` registry cache stays intact, so
dependency downloads remain fast, while the perfectionist library is
always rebuilt from the `dylint.toml` currently in tree.
Reproducible locally by switching `dylint.toml` between the
`0.0.0-rc.6` tag and the `KSXGitHub/perfectionist#25` rev without
clearing `target/dylint` between runs.target/dylint after cache restore1 parent eb17f9d commit 7310d32
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
| |||
0 commit comments