darcs

Patch 972 Add -Werror to ghc-options

Title Add -Werror to ghc-options
Superseder Nosy List owst
Related Issues
Status rejected Assigned To
Milestone

Created on 2012-11-08.13:53:31 by owst, last changed 2014-11-14.00:44:37 by bfrk.

Files
File name Status Uploaded Type Edit Remove
add-_werror-to-ghc_options.dpatch owst, 2012-11-08.13:53:31 application/x-darcs-patch
patch-preview.txt owst, 2012-11-08.13:53:31 text/x-darcs-patch
unnamed owst, 2012-11-08.13:53:31
See mailing list archives for discussion on individual patches.
Messages
msg16321 (view) Author: owst Date: 2012-11-08.13:53:31
We're currently warnings clean, let's keep it that way!

1 patch for repository http://www.darcs.net:

Thu Nov  8 13:52:57 GMT 2012  Owen Stephens <darcs@owenstephens.co.uk>
  * Add -Werror to ghc-options
Attachments
msg16322 (view) Author: ganesh Date: 2012-11-08.18:47:29
don't we already have -fwarn-as-error to enable this?

Making it default to on at least for hackage is discouraged because e.g.
deprecations in other code can cause warnings, so the package becomes
more fragile. Perhaps we could turn it on by default for development and
off for releases somehow, though?

On 08/11/2012 13:53, Owen Stephens wrote:
> 
> New submission from Owen Stephens <darcs@owenstephens.co.uk>:
> 
> We're currently warnings clean, let's keep it that way!
> 
> 1 patch for repository http://www.darcs.net:
> 
> Thu Nov  8 13:52:57 GMT 2012  Owen Stephens <darcs@owenstephens.co.uk>
>   * Add -Werror to ghc-options
> 
> ----------
> files: add-_werror-to-ghc_options.dpatch, patch-preview.txt, unnamed
> messages: 16321
> nosy: owst
> status: needs-screening
> title: Add -Werror to ghc-options
> 
> __________________________________
> Darcs bug tracker <bugs@darcs.net>
> <http://bugs.darcs.net/patch972>
> __________________________________
> 
> 
> 
> _______________________________________________
> darcs-devel mailing list
> darcs-devel@darcs.net
> http://lists.osuosl.org/mailman/listinfo/darcs-devel
>
msg16327 (view) Author: owst Date: 2012-11-10.23:26:12
Ah, yes I hadn't seen that flag. This patch is bad, then.

re: dev enabled, release disabled - Sounds good, but I don't know how we
upload releases to hackage? Can we hook into that process somehow?
msg16329 (view) Author: ganesh Date: 2012-11-10.23:30:55
On 10/11/2012 23:26, Owen Stephens wrote:
> 
> Owen Stephens <darcs@owenstephens.co.uk> added the comment:
> 
> Ah, yes I hadn't seen that flag. This patch is bad, then.
> 
> re: dev enabled, release disabled - Sounds good, but I don't know how we
> upload releases to hackage? Can we hook into that process somehow?

Have a look at release/release.sh - it already does some munging e.g.
for the darcs-beta case.

It's safe to run for testing, the actual upload to hackage is a manual step.

Ganesh
msg17788 (view) Author: bfrk Date: 2014-11-14.00:44:37
I have closed this one since even the author says it's probably a bad
idea. And I agree:

 * Yes, -Werror would make the build too fragile.

 * There is no way to selectively disable warnings in case the warning
is bogus.

 * Warnings can be positively used as a reminder that there is something
that should eventually be fixed. If I am forced to make the code
warning-free then there is a certain incentive to employ cheap tricks to
get rid of the warning (e.g. add a default pattern). This can sometimes
be worse than leaving the code as is, since it merely covers up the problem.

That said, we should strive to make Darcs code warning free, especially
for releases; but not at all costs.
History
Date User Action Args
2012-11-08 13:53:31owstcreate
2012-11-08 18:47:30ganeshsetmessages: + msg16322
2012-11-10 23:26:12owstsetmessages: + msg16327
2012-11-10 23:26:18owstsetstatus: needs-screening -> in-discussion
2012-11-10 23:30:55ganeshsetmessages: + msg16329
2014-11-14 00:44:37bfrksetstatus: in-discussion -> rejected
messages: + msg17788