[ghc-steering-committee] #571: -Wsevere, Shepherd: Adam (rec: accept)

Simon Peyton Jones simon.peytonjones at gmail.com
Thu Sep 14 09:10:09 UTC 2023


>
> Joachim, along with Oleg Grenrus, proposes to change -Wmissing-methods
> and -Wmissing-fields warnings into errors by default (retaining the
> option to downgrade them)
>

I'm fine with making these errors, provided the impact on library authors
is not too severe.  But this is a breaking change and people will shout at
us.

*Moritz*, on the face of it this is just the kind of thing you dislike --
and yet it makes it much harder to inadvertently create truly nasty bugs.

This doesn't affect the API of base, and so is no in CLC purview, but I'd
quite like to ask their opinion.  What I don't want is for us to accept it,
and then have a firestorm of complaints.  I think the case is strong:
debugging infinite loops is very painful.

The proposal establishes the precedent that some warnings may be treated
> as errors by default
>

This is a funny thing.  A warning that is an error by default is perhaps..
an error?  Or to put it another way, perhaps all errors are just warnings
that are treated as errors by default?

Perhaps this new beast is an error that can be turned into a warning?
(Most errors cannot.)

I'm not arguing against the proposal, just wondering if there is a simpler
way to say this.

Simon



On Thu, 14 Sept 2023 at 09:33, Adam Gundry <adam at well-typed.com> wrote:

> Dear Committee,
>
> Joachim, along with Oleg Grenrus, proposes to change -Wmissing-methods
> and -Wmissing-fields warnings into errors by default (retaining the
> option to downgrade them). I recommend we accept the proposal.
>
> Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/571
> Rendered:
>
> https://github.com/ghc-proposals/ghc-proposals/blob/wsevere/proposals/0000-severe-warnings.rst
>
> This is primarily motivated by the fact that when classes have default
> methods, missing methods can lead to runtime loops, which are generally
> difficult to debug. Since in practice not all users pay attention to
> warnings that do not inhibit compilation, it makes sense to identify a
> class of warnings that are sufficiently serious to require explicit
> action from the user to silence them.
>
> Since these warnings are currently not errors by default, library
> authors experimentally assessing the impact of changes may be lead to
> assume that introducing new methods/fields does not lead to breakage
> (because downstream code will still compile). The proposal thus makes it
> more obvious that adding a new method or field is a breaking change.
>
> The proposal deliberately causes builds to fail by default for some
> libraries that currently emit warnings. Oleg has kindly performed impact
> assessments to identify such libraries, and the breakage of a few
> packages seems worth the cost.
>
> It is easy to restore the warnings to their previous classification by
> passing an option at build time, e.g. using -Wno-error=missing-methods.
> Users can set such an option in cabal.project or stack.yaml to work
> around breakage that is not promptly fixed by the library author.
>
> This change does mean that GHC with -XHaskell98/2010 will by default
> reject some programs that are explicitly permitted by the Haskell98/2010
> specification. I recommend we document this infelicity, but accept it,
> as much of the benefit of the proposal is that it applies by default.
>
> The proposal establishes the precedent that some warnings may be treated
> as errors by default, and introduces a warning group -Wsevere to
> classify them. This seems conceptually useful and gives us the option to
> extend the -Wsevere set in the future (e.g. as a final stage of
> deprecation before a feature is removed).
>
> Thoughts?
>
> Adam
>
>
> On 11/09/2023 20:25, Joachim Breitner wrote:
> > Dear Committee,
> >
> > based on suggestions by Oleg Grenrus, I wrote a proposal to introduce a
> > warning group -Wsevere for on-by-defaults, error-by-default warnings,
> > and initially fill it with missing-methods and missing-fields.
> >
> >
> > https://github.com/ghc-proposals/ghc-proposals/pull/571
> >
> >
> https://github.com/ghc-proposals/ghc-proposals/blob/wsevere/proposals/0000-severe-warnings.rst
> >
> > I’d like to nominate Adam as the shepherd, who already reviewed it a
> > bit on Github.
> >
> > Please guide us to a conclusion as outlined in
> > https://github.com/ghc-proposals/ghc-proposals#committee-process
> >
> >
> > Cheers,
> > Joachim
>
>
> --
> Adam Gundry, Haskell Consultant
> Well-Typed LLP, https://www.well-typed.com/
>
> Registered in England & Wales, OC335890
> 27 Old Gloucester Street, London WC1N 3AX, England
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20230914/dafe614e/attachment.html>


More information about the ghc-steering-committee mailing list