-
Notifications
You must be signed in to change notification settings - Fork 37
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
Replace Stack with cabal-install on CI #199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really be only on CI, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's merge as is, then.
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
stack
builds 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
stack
issue is likely relevant.So, as a workaround, we can just replace
stack
withcabal-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.project
andstack.yaml
).cabal.project.freeze
file to freeze the dependencies.