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

CI failures with GHC 8.8 #1299

Closed
ndmitchell opened this issue Sep 28, 2021 · 7 comments · Fixed by #1300 or #1301
Closed

CI failures with GHC 8.8 #1299

ndmitchell opened this issue Sep 28, 2021 · 7 comments · Fixed by #1300 or #1301

Comments

@ndmitchell
Copy link
Owner

E.g. https://github.com/ndmitchell/hlint/runs/3707891836?check_suite_focus=true says:

TEST FAILURE (BAD REFACTORING)
SRC: /home/runner/.cabal/store/ghc-8.8.4/hlint-3.3.4-ff2d1f010e79360de5348a757d7f6c211a5c35a3d44832c024922102288aa22b/share/hlint.yaml:1301:0
INPUT: test1196 = map ((,) (+ 1)) "123"
Refactoring failed: exit code 1

/opt/ghc/8.8.4/lib/ghc-8.8.4/settings: openFile: does not exist (No such file or directory)

@zliu41 - any changes that would have caused that?

@zliu41
Copy link
Collaborator

zliu41 commented Sep 28, 2021

/opt/ghc/8.8.4/lib/ghc-8.8.4/settings: openFile: does not exist (No such file or directory)

This indicates refactor is probably built on a different machine than the one running it (haskell/haskell-language-server#591).

I'm not sure where the refactor binary used in CI comes from; it is not mentioned in ci.yml. My guess is if we cabal install it from ci.yml, the problem would go away.

@zliu41
Copy link
Collaborator

zliu41 commented Sep 29, 2021

#1300 is the fix.

@ndmitchell
Copy link
Owner Author

We are now cabal installing it and it still doesn't work - any ideas? The first fix didn't work as it corrupted the cache on subsequent builds, so I moved the install line, and now 8.8 fails once more

@zliu41
Copy link
Collaborator

zliu41 commented Oct 5, 2021

I'm not very familiar with actions/cache, but looks like if you put the install after the cache then it was still using the cached, outdated refactor binary. Perhaps we can add the output of ghc --print-libdir to the cache key, so that whenever libdir changes (which would cause the "openFile: does not exist" error) then the cache is invalidated.

@zliu41
Copy link
Collaborator

zliu41 commented Oct 5, 2021

Hmm I see that in the subsequent builds, only 8.8 succeeded and all others failed. I don't understand how that could happen, since the cache key includes matrix.ghc and so caches for different GHC versions should be independent.

@zliu41
Copy link
Collaborator

zliu41 commented Oct 5, 2021

#1301 seems to work; I tried the build multiple times. Although I still don't know what caused the cache corruption.

@ndmitchell
Copy link
Owner Author

Thanks for all your work on this @zliu41! Much appreciated :)

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 a pull request may close this issue.

2 participants