<div dir="ltr">Let me pose a slightly loaded question on this:<div><br></div><div>if we had -Werror=severe by default, and severe being empty, as well as adding notes to warnings we intent to promote to</div><div>severe (This warning will be part of severe in GHC X.Y.Z and therefore become an error. See https://...), isn't that effectively</div><div>canvasing a wider opinion among people using Haskell in production?</div><div><br></div><div>Cheers,</div><div> Moritz</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 4 Oct 2023 at 16:28, Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com">simon.peytonjones@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">I must say that I am strongly influenced by the fact that <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><ul><li>Matt Parsons</li><li>Andrew Lelechenko (bodigrim)</li></ul><div>are both not just in favour, but <b>strongly </b>in favour. They must think of the case as compelling, because they are both usually very careful about unnecessary breakage.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div>
if we make -Werror=severe the default, then any new warning added to
-Wsevere is a new breaking change, and we would have to judge it to be
compelling enough by GR2 <br></div></blockquote><div><br></div><div>Yes indeed. But that's not a bug -- it's a feature.</div><div><br></div><div>To be clear I have no strongly held opinion myself. Perhaps we should canvas opinion among people using Haskell in production? We did so with CLC but we could do so publicly.<br></div><div><br></div><div>Simon<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 4 Oct 2023 at 09:18, Simon Marlow <<a href="mailto:marlowsd@gmail.com" target="_blank">marlowsd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I don't think this breaking change (namely making -Werror=severe the default) meets the bar for "compelling reason" according to GR2 of our proposed policy, so I'm voting against. It's certainly not a bug or a security hole. Maybe you could argue that it's a design flaw in the language, but I'm not all that convinced. It's an unforced breaking change in my opinion. If we add "makes it more difficult to shoot yourself in the foot" a compelling enough reason to break GR1 then I think we've weakened it significantly.<br></div><div><br></div><div>Here's another problem: if we make -Werror=severe the default, then any new warning added to -Wsevere is a new breaking change, and we would have to judge it to be compelling enough by GR2. If we don't make -Werror=severe the default, then we're not restricted in what we can add to -Wsevere. Probably -Wsevere would end up being more useful as a result.</div><div><br></div><div>Cheers</div><div>Simon<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 3 Oct 2023 at 11:00, Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com" target="_blank">simon.peytonjones@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Here's my summary:</div><div class="gmail_default" style="font-family:tahoma,sans-serif"></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><ul><li>There is strong (universal, even) support for the `severe` category.</li><li>There is pretty strong support for making severe warnings into errors at some point. As Matt puts it "this is not a question of GHC breaking things, but rather <em>revealing</em> and providing early-diagnosis for <em>already broken</em> things".</li><li>But I think we are moving towards a policy of giving users time to adapt via a deprecation cycle, whenever that is feasible. And it is feasible here.</li></ul><div>So my suggestion would be:</div><div><ul><li>When implemented, make `-Wwarn=severe` the default, but add to each severe warning a deprecation-style message saying that it'll become an error in the next iteration.</li><li>In the next released, make `-Werror=severe` the default.</li><li>Don't complicate matters by involving GHC2024. That is another conversation, and even if we wanted to include `-Werorr=severe` in GHC2024, we would *still* want a deprecation cycle!</li></ul><div>Would that be acceptable?</div><div><br></div><div>Simon<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 29 Sept 2023 at 19:41, Adam Gundry <<a href="mailto:adam@well-typed.com" target="_blank">adam@well-typed.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Dear Committee,<br>
<br>
It seems we are somewhat split on the -Wsevere proposal, even assuming <br>
it is introduced with a deprecation period (changing the warning text <br>
and adding the group in advance). There is consensus that adding the <br>
group by itself is fine, and potentially enabling -Werror=severe under <br>
GHC2024, but enabling it by default for existing code is more controversial.<br>
<br>
Ultimately this is a judgement call about the value of the proposal <br>
versus the breakage it causes. I remain of the view that it is <br>
worthwhile. This is not merely about more aggressively enforcing best <br>
practice. Rather, it eliminates the risk of the following:<br>
<br>
* Suppose package A defines a type class, package B depends on package <br>
A, and package C depends on package B.<br>
<br>
* Now package A extends the type class definition with a new method and <br>
default methods. Everything still compiles; package B now issues a <br>
-Wmissing-methods warning (but is not actively maintained, and the <br>
author of package C is unlikely to look at warnings in all their <br>
dependencies).<br>
<br>
* Users of package C have to try to debug an infinite loop.<br>
<br>
Given that this change avoids a significant issue, affected code has <br>
been issuing warnings for many years, and impacted users can very easily <br>
set -Wwarn=severe either at the package level or the project level, I <br>
think is worth accepting the backwards compatibility cost and the fact <br>
that some Haskell2010 code will no longer be accepted by default.<br>
<br>
Matt Parsons puts it well in the CLC thread, which is pretty clearly in <br>
favour of this proposal overall <br>
(<a href="https://github.com/haskell/core-libraries-committee/issues/207#issuecomment-1726091889" rel="noreferrer" target="_blank">https://github.com/haskell/core-libraries-committee/issues/207#issuecomment-1726091889</a>):<br>
<br>
> I think GHC should strive to make fewer breaking changes, and make <br>
those changes as easy-to-adopt as possible. But this is not a question <br>
of GHC breaking things, but rather revealing and providing <br>
early-diagnosis for already broken things.<br>
<br>
Further opinions are welcome, of course.<br>
<br>
Adam<br>
<br>
<br>
On 14/09/2023 09:32, Adam Gundry wrote:<br>
> Dear Committee,<br>
> <br>
> Joachim, along with Oleg Grenrus, proposes to change -Wmissing-methods <br>
> and -Wmissing-fields warnings into errors by default (retaining the <br>
> option to downgrade them). I recommend we accept the proposal.<br>
> <br>
> Proposal: <a href="https://github.com/ghc-proposals/ghc-proposals/pull/571" rel="noreferrer" target="_blank">https://github.com/ghc-proposals/ghc-proposals/pull/571</a><br>
> Rendered: <br>
> <a href="https://github.com/ghc-proposals/ghc-proposals/blob/wsevere/proposals/0000-severe-warnings.rst" rel="noreferrer" target="_blank">https://github.com/ghc-proposals/ghc-proposals/blob/wsevere/proposals/0000-severe-warnings.rst</a><br>
> <br>
> This is primarily motivated by the fact that when classes have default <br>
> methods, missing methods can lead to runtime loops, which are generally <br>
> difficult to debug. Since in practice not all users pay attention to <br>
> warnings that do not inhibit compilation, it makes sense to identify a <br>
> class of warnings that are sufficiently serious to require explicit <br>
> action from the user to silence them.<br>
> <br>
> Since these warnings are currently not errors by default, library <br>
> authors experimentally assessing the impact of changes may be lead to <br>
> assume that introducing new methods/fields does not lead to breakage <br>
> (because downstream code will still compile). The proposal thus makes it <br>
> more obvious that adding a new method or field is a breaking change.<br>
> <br>
> The proposal deliberately causes builds to fail by default for some <br>
> libraries that currently emit warnings. Oleg has kindly performed impact <br>
> assessments to identify such libraries, and the breakage of a few <br>
> packages seems worth the cost.<br>
> <br>
> It is easy to restore the warnings to their previous classification by <br>
> passing an option at build time, e.g. using -Wno-error=missing-methods. <br>
> Users can set such an option in cabal.project or stack.yaml to work <br>
> around breakage that is not promptly fixed by the library author.<br>
> <br>
> This change does mean that GHC with -XHaskell98/2010 will by default <br>
> reject some programs that are explicitly permitted by the Haskell98/2010 <br>
> specification. I recommend we document this infelicity, but accept it, <br>
> as much of the benefit of the proposal is that it applies by default.<br>
> <br>
> The proposal establishes the precedent that some warnings may be treated <br>
> as errors by default, and introduces a warning group -Wsevere to <br>
> classify them. This seems conceptually useful and gives us the option to <br>
> extend the -Wsevere set in the future (e.g. as a final stage of <br>
> deprecation before a feature is removed).<br>
> <br>
> Thoughts?<br>
> <br>
> Adam<br>
> <br>
> <br>
> On 11/09/2023 20:25, Joachim Breitner wrote:<br>
>> Dear Committee,<br>
>><br>
>> based on suggestions by Oleg Grenrus, I wrote a proposal to introduce a<br>
>> warning group -Wsevere for on-by-defaults, error-by-default warnings,<br>
>> and initially fill it with missing-methods and missing-fields.<br>
>><br>
>><br>
>> <a href="https://github.com/ghc-proposals/ghc-proposals/pull/571" rel="noreferrer" target="_blank">https://github.com/ghc-proposals/ghc-proposals/pull/571</a><br>
>><br>
>> <a href="https://github.com/ghc-proposals/ghc-proposals/blob/wsevere/proposals/0000-severe-warnings.rst" rel="noreferrer" target="_blank">https://github.com/ghc-proposals/ghc-proposals/blob/wsevere/proposals/0000-severe-warnings.rst</a><br>
>><br>
>> I’d like to nominate Adam as the shepherd, who already reviewed it a<br>
>> bit on Github.<br>
>><br>
>> Please guide us to a conclusion as outlined in<br>
>> <a href="https://github.com/ghc-proposals/ghc-proposals#committee-process" rel="noreferrer" target="_blank">https://github.com/ghc-proposals/ghc-proposals#committee-process</a><br>
>><br>
>><br>
>> Cheers,<br>
>> Joachim<br>
<br>
<br>
-- <br>
Adam Gundry, Haskell Consultant<br>
Well-Typed LLP, <a href="https://www.well-typed.com/" rel="noreferrer" target="_blank">https://www.well-typed.com/</a><br>
<br>
Registered in England & Wales, OC335890<br>
27 Old Gloucester Street, London WC1N 3AX, England<br>
<br>
_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
</blockquote></div>
_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
</blockquote></div>