Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the cabal freeze file a good cache key? #18

Open
andreasabel opened this issue Jan 31, 2023 · 0 comments
Open

Is the cabal freeze file a good cache key? #18

andreasabel opened this issue Jan 31, 2023 · 0 comments

Comments

@andreasabel
Copy link

key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}

If I look at the content of a freeze file, e.g.,

active-repositories: hackage.haskell.org:merge
constraints: any.base ==4.17.0.0,
             any.ghc-bignum ==1.3,
             any.ghc-prim ==0.9.0,
             any.rts ==1.0.2
index-state: hackage.haskell.org 2023-01-30T21:21:45Z

the I see that it contains the date of the last cabal update (ok, it is the last update to hackage, but since it has hourly updates, basically this date will be different almost every time the CI is run).
Including the date in the cache key leads to permanent cache misses.

Seems like the last line should be dropped before calculating the cache key from this.

Or maybe I am getting something wrong? Do you have evidence that this works as expected in practice? (Meaning, with frequent cache hits?)

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

No branches or pull requests

1 participant