No description provided.
Haskell: Fail on warnings
Can you explain a little more why this change is good.
@joshk Personally, I don not want warnings in my code and hence want CI to fail on warnings. But we should wait a little bit before merging this, to give others the chance to voice there opinion.
I used to just have -Werror in my cabal file, but with cabal repl this becomes impractical, as during development you do not want to fail on warnings.
@dmalikov Also I agree, and I want it like that for my own code. Some people consider certain warnings as useless. So I think which warnings to enable is best left to the package author.
If warnings were meant to break compile they would be errors. -1
@chrisdone I agree with you (except for the -1), I still think this change is the right thing to do.
I make a difference between a CI job and e.g. installing a package from Hackage. If I install a package from Hackage, I always want it to succeed, regardless of warnings. On the other hand, if I as a package author enable a certain set of warnings I did that for a reason and I want CI to fail in that cases so that I'm notified about it and can fix it (that can either mean ignoring the warnings or changing the code).
Indeed, the motivation of this change is to keep -Werror out of cabal files, so that warnings do not break compile.
-1 since this violates the principle of least surprise. If the user didn't specify -Werror in either foo.cabal or .travis.yml, s/he wouldn't expect it to be turned on.
the principle is that developer must be rigorous to his work and gentle to its users :-)
1. -Wall -Werror in development environment (including travis)
2. No -Wall -Werror in cabal script
.travis.yml could be the solution suitable for all ;-)
I think it's a bad idea to make this the default. While I agree that -Werror is a good idea in general I don't think travis should make this call for all projects. Also agree with @feuerbach that it violates the principle of least surprise.
I disagree as well, for reasons already given by others.
"the principle is that developer must be rigorous to his work and gentle to its users :-)"
The developer, but not the CI system. CI system should be compatible with all developers' behavior and if it's means developer does not want -Werror then CI should silently agree it.
It's not hard to use -Werror in travis-ci without having that as the default and also without modifying the cabal file. Do something like this:
cabal install --only-dependencies --enable-tests
cabal install --ghc-options=-Werror --enable-tests
Looks like the majority opinion is that this is a bad idea. I'm closing this.
Thank you for the input!