From 03cecc6a36562fdaf8b5370386baa99513c47fcd Mon Sep 17 00:00:00 2001 From: webdevred <148627186+webdevred@users.noreply.github.com> Date: Wed, 19 Aug 2026 20:17:33 +0200 Subject: [PATCH 1/2] Stop caching dist-newstyle in the release build 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. --- .github/workflows/build-and-release.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-release.yaml b/.github/workflows/build-and-release.yaml index a42235da..b936fa1e 100644 --- a/.github/workflows/build-and-release.yaml +++ b/.github/workflows/build-and-release.yaml @@ -68,12 +68,10 @@ jobs: CABAL_PROJECT: cabal.project.release shell: bash run: bash ./.github/scripts/freeze_dependencies.sh - - name: Cache GHC, Cabal store, and build artifacts + - name: Cache Cabal store uses: actions/cache@v6.1.0 with: - path: | - dist-newstyle - ${{ steps.setup-ghc.outputs.cabal-store }} + path: ${{ steps.setup-ghc.outputs.cabal-store }} key: >- ${{ runner.os }}-cabal-${{ matrix.ghc From 9138488034c3fb472fee970024672a07f2a754d5 Mon Sep 17 00:00:00 2001 From: webdevred <148627186+webdevred@users.noreply.github.com> Date: Wed, 19 Aug 2026 20:18:13 +0200 Subject: [PATCH 2/2] Stop caching dist-newstyle in CI and future-proofing builds too 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. --- .github/workflows/build-and-test.yaml | 6 ++---- .github/workflows/future-proofing.yaml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index fba9e79a..1cc8c942 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -174,12 +174,10 @@ jobs: CABAL_PROJECT: cabal.project.ci shell: bash run: bash ./.github/scripts/freeze_dependencies.sh - - name: Cache Cabal store and build artifacts + - name: Cache Cabal store uses: actions/cache@v6.1.0 with: - path: | - ${{ steps.setup-ghc.outputs.cabal-store }} - dist-newstyle + path: ${{ steps.setup-ghc.outputs.cabal-store }} key: >- ${{ runner.os diff --git a/.github/workflows/future-proofing.yaml b/.github/workflows/future-proofing.yaml index c32c0237..56629502 100644 --- a/.github/workflows/future-proofing.yaml +++ b/.github/workflows/future-proofing.yaml @@ -54,12 +54,10 @@ jobs: CABAL_PROJECT: cabal.project.ci shell: bash run: bash ./.github/scripts/freeze_dependencies.sh - - name: Cache GHC, Cabal store, and build artifacts + - name: Cache Cabal store uses: actions/cache@v6.1.0 with: - path: | - dist-newstyle - ${{ steps.setup-ghc.outputs.cabal-store }} + path: ${{ steps.setup-ghc.outputs.cabal-store }} key: >- ${{ runner.os }}-cabal-${{ steps.get-ghc.outputs.ghc-version