Skip to content

Stop caching local build artifacts in Actions workflows - #233

Merged
webdevred merged 2 commits into
masterfrom
fix-stale-release-cabal-cache
Aug 19, 2026
Merged

Stop caching local build artifacts in Actions workflows#233
webdevred merged 2 commits into
masterfrom
fix-stale-release-cabal-cache

Conversation

@webdevred

Copy link
Copy Markdown
Owner

Summary

  • The release build's Actions cache restored the whole dist-newstyle directory keyed only on the dependency freeze file. Since dependencies rarely change, the same cache entry was reused for weeks, and a stale local package build (including its registered inplace package) could survive a source or version change. This actually happened: a tagged release build shipped a binary that still reported version 0.0.5.0 and the pre-change transformation behaviour, despite the tag's .cabal file saying 0.0.6.0.
  • build-and-test.yaml and future-proofing.yaml cache their cabal builds the same way and carry the same risk, even though it hasn't been observed there yet.
  • Fix: cache only the external Cabal store in all three workflows. Local packages (jbeam-edit and its internal libraries) now build fresh every run, so there's nothing stale to reuse.

The release cache restored the whole dist-newstyle directory keyed
only on the dependency freeze file, so a stale local package build
(including its inplace package registration) could be reused even
after the source or the package version changed. Cache only the
external Cabal store; local packages build fresh every run.
Same stale-cache risk as the release build: keying the cache only on
the freeze file lets a stale local package build, including its
inplace package registration, survive a source or version change.
@webdevred
webdevred merged commit 27862b5 into master Aug 19, 2026
12 checks passed
@webdevred
webdevred deleted the fix-stale-release-cabal-cache branch August 19, 2026 19:47
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.

1 participant