Replace Stack with cabal-install on CI#199
Conversation
aspiwack
left a comment
There was a problem hiding this comment.
The problem is probably with stack. But given how unstable the bug that we've been observing is, let's not celebrate quite just yet, until we are sure that this fixes it rather than just works by chance.
In the meantime, let's endeavour spend zero more time on this issue. No lockfile, no upperbound. When 9.0 is released, we will revisit all this.
| package linear-base | ||
| ghc-options: -Wall -Werror | ||
|
|
There was a problem hiding this comment.
This should really be only on CI, I think.
There was a problem hiding this comment.
I agree. However setting --ghc-options on command line for some reason applies those options to dependencies too, and they don't play nice with -Werror. I think the cabal issue is here: haskell/cabal#3883 (And coincidently today is its 4th year anniversary 🎉 ).
The workaround is to create a cabal.project.ci file, but I don't want to duplicate that file since it also contains some overrides.
|
Note: I had the problem appear on my home computer, and I (may have) solved it by upgrading stack from 2.1 to 2.3. In case it's relevant when we explore this again. |
|
Or not… It showed up again. I have no idea what's happening here. |
|
I got a similar error on cabal-install too: https://buildkite.com/tweag-1/linear-base/builds/398#08cf4d79-5c5c-4a66-b00b-116be492f1f8 However, I think it is slightly different than Edit: It seems like cabal issue only happens when |
Currently, our
stackbuilds are failing, throwing errors like:More importantly, this affects CI (including
master): https://buildkite.com/tweag-1/linear-base/builds/350#2971c76e-2967-45dc-9e8f-4c9f5434afd2I couldn't pinpoint the exact reason since seemingly minor changes (eg. renaming a function parameter) can make the issue disappear. I suspect they are because an interface format change coming with new GHC. If this is the case, this
stackissue is likely relevant.So, as a workaround, we can just replace
stackwithcabal-install. I tried modifying our CI configuration in this PR and it seems to be happy.We lose some determinisim there since now a Hackage update can break our build. But maybe that's good since then we can make sure that we keep up with the ecosystem (or add an upper bound).
The alternatives are:
cabal.projectandstack.yaml).cabal.project.freezefile to freeze the dependencies.