<div dir="ltr"><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Boespflug, Mathieu</b> <span dir="ltr"><<a href="mailto:m@tweag.io">m@tweag.io</a>></span><br>Date: 13 December 2017 at 23:03<br>Subject: Re: Release policies<br>To: Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>><br>Cc: <a href="mailto:ghc-devops-group@haskell.org">ghc-devops-group@haskell.org</a><br><br><br><div dir="ltr">[replying to ghc-devops-group@, which I assume based on your email's content is the mailing list you intended.]<div><br></div><div>Hi Simon,</div><div><br></div><div>feedback from downstream consumers of Cabal metadata (e.g. build tool authors) will be particularly useful for the discussion here. Here are my thoughts as a bystander.</div><div><br></div><div>It's worth trying to identify what problems came up during the integer-gmp incident in Trac #14558:</div><div><br></div><div>* GHC 8.2.1 shipped with integer-gmp-1.0.1.0 but the release notes said otherwise.</div><div>* GHC 8.2.1 shipped with Cabal-2.0.0.2, but specifically claimed in the release notes that cabal-install-1.24 (and by implication any other build tool based on Cabal-the-library version 1.24) was supported: "GHC 8.2 only works with cabal-install version 1.24 or later. Please upgrade if you have an older version of cabal-install."</div><div>* GHC 8.2.2 also claimed Cabal-1.24 support.</div><div>* GHC 8.2.1 was released in July 2017 with Cabal-2.0.0.2, a brand new major release with breaking changes to the metadata format, without much lead time for downstream tooling authors (like Stack) to adapt.</div><div>* But actually if we look at their respective release notes, GHC 8.2.1 was relased in July 2017, even though the Cabal website claims that Cabal-2.0.0.2 was released in August 2017 (see <a href="https://www.haskell.org/cabal/download.html" target="_blank">https://www.haskell.org/cabal/<wbr>download.html</a>). So it looks like GHC didn't just not give enough lead time about an upstream dependency it shipped with, it shipped with an unreleased version of Cabal!</div><div>* Libraries that ship with GHC are usually also uploaded to Hackage, to make the documentation easily accessible, but integer-gmp-1.0.1.0 was not uploaded to Hackage until 4 months after the release.</div><div>* The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage differed from the metadata that was actually in the source tarball of GHC-8.2.1 and GHC-8.2.2.</div><div>* The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage included Cabal-2.0 specific syntactic sugar, making the metadata unreadable using any tooling that did not link against the Cabal-2.0.0.2 library (or any later version).</div><div>* It so happened that one particular version of one particular downstream build tool, Stack, had a bug, compounding the bad effects of the previous point. But a new release has now been made, and in any case that's not a problem for GHC to solve. So let's keep that out of the discussion here.</div><div><br></div><div>So I suggest we discuss ways to eliminate or reduce the likelihood of any of the above problems from occurring again. Here are some ideas:</div><div><br></div><div>* GHC should never under any circumstance ship with an unreleased version of any independently maintained dependency. Cabal is one such dependency. This should hold true for anything else. We could just add that policy to the Release Policy.</div><div>* Stronger still, GHC should not switch to a new major release of a dependency at any time during feature freeze ahead of a release. E.g. if Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe it's fair game to include in GHC. But not if Cabal-3.0.0 hasn't shipped yet.</div><div>* The 3-release backwards compat rule should apply in all circumstances. That means major version bumps of any library GHC ships with, including base, should not imply any breaking change in the API's of any such library.</div><div>* GHC does have control over reinstallable packages (like text and bytestring): GHC need not ship with the latest versions of these, if indeed they introduce breaking changes that would contravene the 3-release policy.</div><div>* Note: today, users are effectively tied to whatever version of the packages ships with GHC (i.e. the "reinstallable" bit is problematic today for various technical reasons). That's why a breaking change in bytestring is technically a breaking change in GHC.<br></div><div>* The current release policy covers API stability, but what about metadata? In the extreme, we could say a 3-release policy applies to metadata too. Meaning, all metadata shipping with GHC now and in the next 2 releases should be parseable by today's version of Cabal and downstream tooling. Is such a long lead time necessary? That's for build tool authors to say, and a point to negotiate with GHC devs.<br></div><div><div>* Because there are far fewer consumers of metadata than consumers of say base, I think shorter lead time is reasonable. At the other extreme, it could even be just the few months during feature freeze.</div></div><div>* The release notes bugs mentioned above and the lack of consistent upload to Hackage are a symptom of lack of release automation, I suspect. That's how to fix it, but we could also spell out in the Release Policy that GHC libraries should all be on Hackage from the day of release.</div><div><br></div><div>Finally, a question for discussion:</div><div><br></div><div>* Hackage allows revising the metadata of an uploaded package even without changing the version number. This happens routinely on Hackage today by the Hackage trustees. Should this be permitted for packages whose release is completely tied to that of GHC itself (like integer-gmp)?</div><div class="m_-572148752105055325gmail-box" style="color:rgb(0,0,0);font-family:sans-serif;font-size:medium"></div><div class="gmail_extra"><br></div><div class="gmail_extra">Best,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Mathieu</div><div class="gmail_extra"><br clear="all"><div><div class="m_-572148752105055325gmail_signature"><br></div></div><div class="gmail_quote"><div><div class="h5">On 13 December 2017 at 17:43, Simon Peyton Jones via ghc-devs <span dir="ltr"><<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5">
<div lang="EN-GB">
<div class="m_-572148752105055325gmail-m_3474846902711520805WordSection1">
<p class="m_-572148752105055325gmail-MsoNormal"><span style="font-family:Calibri,sans-serif">Dear GHC devops group<u></u><u></u></span></p>
<p class="m_-572148752105055325gmail-MsoNormal"><span style="font-family:Calibri,sans-serif">The conversation on
<a href="https://ghc.haskell.org/trac/ghc/ticket/14558" target="_blank">Trac #14558</a> suggests that we might want to consider reviewing
<a href="https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Releases" target="_blank">GHC’s release policies</a>. This email is to invite your input.<u></u><u></u></span></p>
<p class="m_-572148752105055325gmail-MsoNormal"><span style="font-family:Calibri,sans-serif">The broad questions is this. We want GHC to serve the needs of all its users, including downstream tooling that uses GHC. What release policies will best support that goal? For example, we
already ensure that GHC 8.4 can be compiled with 8.2 and 8.0. This imposes a slight tax on GHC development, but it means that users don't need to upgrade quite as often. (If the tempo of releases increases, we might want to increase the window.)<u></u><u></u></span></p>
<p class="m_-572148752105055325gmail-MsoNormal"><span style="font-family:Calibri,sans-serif">Trac #14558 suggests that we might want to ensure the metadata on GHC’s built-in libraries is parsable with older Cabals. One possibility would be this:<u></u><u></u></span></p>
<ul style="margin-top:0cm" type="disc">
<li class="m_-572148752105055325gmail-m_3474846902711520805MsoListParagraph" style="margin-left:0cm"><span style="font-family:Calibri,sans-serif">Ensure that the Cabal metadata of non-reinstallable packages (e.g. integer-gmp) shipped with GHC be parsable by the Cabal versions shipped
with the last two major GHC releases [i.e. have a sufficiently old cabal-version field]. That is, in general a new Cabal specification will need to be shipped with two GHC releases before GHC will use start using its features in non-reinstallable packages.<u></u><u></u></span></li><li class="m_-572148752105055325gmail-m_3474846902711520805MsoListParagraph" style="margin-left:0cm"><span style="font-family:Calibri,sans-serif">Upholding this policy won't always be possible. There may be cases (as is the case Hadrian for GHC 8.4) where the benefit of quickly
introducing incompatible syntax outweighs the need for compatibility. In this (hopefully rare) case we would explicitly advertise the incompatibility in the release documentation, and give as much notice as possible to users to allow downstream tools to adapt.<u></u><u></u></span></li><li class="m_-572148752105055325gmail-m_3474846902711520805MsoListParagraph" style="margin-left:0cm"><span style="font-family:Calibri,sans-serif">For reinstallable packages, of which GHC is simply a client (like text or bytestring), we can’t reasonably enforce such a policy, because
GHC devs have no control over what the maintainers of external core libraries put in their Cabal files.<u></u><u></u></span></li></ul>
<p class="m_-572148752105055325gmail-MsoNormal"><span style="font-family:Calibri,sans-serif">This is just a proposal. The narrow questions are these:<u></u><u></u></span></p>
<ul style="margin-top:0cm" type="disc">
<li class="m_-572148752105055325gmail-m_3474846902711520805MsoListParagraph" style="margin-left:0cm"><span style="font-family:Calibri,sans-serif">Would this be sufficient to deal with the concerns raised in #14558?<u></u><u></u></span></li><li class="m_-572148752105055325gmail-m_3474846902711520805MsoListParagraph" style="margin-left:0cm"><span style="font-family:Calibri,sans-serif">Is it necessary, ow would anything simpler be sufficient?<u></u><u></u></span></li><li class="m_-572148752105055325gmail-m_3474846902711520805MsoListParagraph" style="margin-left:0cm"><span style="font-family:Calibri,sans-serif">What costs would the policy impose on GHC development?<u></u><u></u></span></li><li class="m_-572148752105055325gmail-m_3474846902711520805MsoListParagraph" style="margin-left:0cm"><span style="font-family:Calibri,sans-serif">There may be matters of detail: e.g. is two releases the right grace period. Would one do?<u></u><u></u></span></li></ul>
<p class="m_-572148752105055325gmail-MsoNormal"><span style="font-family:Calibri,sans-serif">Both the broad question and the narrow ones are appropriate for the Devops group.<u></u><u></u></span></p>
<p class="m_-572148752105055325gmail-MsoNormal"><span style="font-family:Calibri,sans-serif">Thanks!<span class="m_-572148752105055325gmail-HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p><span class="m_-572148752105055325gmail-HOEnZb"><font color="#888888">
<p class="m_-572148752105055325gmail-MsoNormal"><span style="font-family:Calibri,sans-serif">Simon<u></u><u></u></span></p>
</font></span></div>
</div>
<br></div></div>______________________________<wbr>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div></div>
</div><br></div>