Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

-Werror is inconvenient for local builds #422

Closed
robrix opened this issue Jan 15, 2020 · 3 comments · Fixed by #428
Closed

-Werror is inconvenient for local builds #422

robrix opened this issue Jan 15, 2020 · 3 comments · Fixed by #428
Assignees
Labels
bug Something isn't working

Comments

@robrix
Copy link
Contributor

robrix commented Jan 15, 2020

My goal with enabling -Werror in cabal.project for local builds was to make it harder to run into cases where the build passes locally but fails in CI because e.g. you’ve got warnings in some file that you haven’t touched recently and so you don’t see them. In practice, it’s just become a pain for any workflow using cabal build instead of e.g. script/repl, often necessary to e.g. iterate on haskell-tree-sitter stuff.

Thus, I kinda think we should remove the setting in cabal.project and only enable it in CI builds.

@robrix robrix added the bug Something isn't working label Jan 15, 2020
@robrix
Copy link
Contributor Author

robrix commented Jan 15, 2020

(This was biting @tclem the other day.)

@patrickt
Copy link
Contributor

I use cabal build a lot and would love this. I think we can just do it by adding --ghc-options=“-Werror” to our invocation of cabal configure in haskell.yml.

@robrix robrix self-assigned this Jan 16, 2020
@robrix
Copy link
Contributor Author

robrix commented Jan 16, 2020

Well, this isn’t going to be as easy as I’d hoped—cabal uses --ghc-options flags passed on the CLI as options for the dependencies, and what do you know, some of them have warnings:

System/Random.hs:43:1: error: [-Wtabs, -Werror=tabs]
    Tab character found here, and in 74 further locations.
    Please use spaces instead.
   |
43 |         (
   | ^^^^^^^^

@robrix robrix assigned robrix and unassigned robrix Jan 16, 2020
@robrix robrix mentioned this issue Jan 16, 2020
1 task
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants