Skip to content

Replace Stack with cabal-install on CI #199

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

Merged
merged 3 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ steps:
nix-shell --command ''
timeout: 120
key: "install-linear-ghc"
- label: "Run tests (Stack)"
- label: "Run tests (cabal-install)"
command: |
nix-shell --pure --run 'stack --nix build --pedantic --test --bench --no-run-benchmarks'
nix-shell --pure --run 'cabal update; cabal test'
timeout: 30
depends_on: "install-linear-ghc"
3 changes: 3 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ packages: *.cabal

allow-newer: all

package linear-base
ghc-options: -Wall -Werror

Comment on lines +5 to +7
Copy link
Member

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.

Copy link
Contributor Author

@utdemir utdemir Sep 22, 2020

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.

Copy link
Member

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.

-- If you update below, make sure to also update stack.yaml too

source-repository-package
Expand Down