tomjaguarpaw / haskell-opaleye

Other
599 stars 115 forks source link

Why does the GHC 9.0 Action keep failing? #555

Closed tomjaguarpaw closed 1 year ago

tomjaguarpaw commented 1 year ago

The Actions build keeps failing on GHC 9.0 (only) with this error:

<command line>: /home/runner/.cabal/store/ghc-9.0.2/base-orphans-0.8.6-6928e2cbc0865b26493d937a1da219d844cc78c58d3a8879b19e0c09f607cc85/lib/libHSbase-orphans-0.8.6-6928e2cbc0865b26493d937a1da219d844cc78c58d3a8879b19e0c09f607cc85-ghc9.0.2.so: undefined symbol: base_GHCziRead_list3_closure

https://github.com/tomjaguarpaw/haskell-opaleye/runs/7406931460?check_suite_focus=true

I have no idea why. It doesn't fail locally. Has something bad got in the cache?

tomjaguarpaw commented 1 year ago

This is becoming really quite annoying.

tomjaguarpaw commented 1 year ago

Seems to be this: https://gitlab.haskell.org/ghc/ghc/-/issues/21423

Also experienced at: https://github.com/sebastiaanvisser/clay/pull/243

But I do not know if it is even possible to clear the GitHub cache: https://stackoverflow.com/questions/63521430/clear-cache-in-github-actions/63590002#63590002

tomjaguarpaw commented 1 year ago

It is possible to clear the GitHub cache as follows:

Create a personal access token by following the GitHub documentation. Give it "workflow" permissions. It's also probably safest to give it a short expiration time. Then run the following shell commands.

$ TOKEN=...
$ OWNER=tomjaguarpaw
$ REPO=haskell-opaleye
$ curl \            
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/actions/caches
...
Look for the entry `Linux-9.0-...`, note the "id" field, and
assign it to CACHE_ID
...
$ CACHE_ID=...
$ curl \        
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/actions/caches/$CACHE_ID