Add cabal-version advice to corresponding .cabal files#11972
Conversation
(from the pre-flight checklist)
|
Please use the PR template (if you are doing PRs with |
I just checked the template again, I couldn't figure out what would apply to this PR specifically. The only thing that I'm relatively confident is, that it needs to be backported. I added the corresponding label. Is there anything else specifically that you want me to do? |
Every time you open a PR, please select one of the two templates (Template B applies here). Check whichever box is relevant (in your case: the patch conforms to coding conventions), and strike parts that are not applicable to your PR (in this case, the PR does not involve CI).
Very good. I see you have modified the “Making a release” wiki too. I would advise doing that after the PR lands on I appreciate the care and work you are putting in streamlining releases. |
|
In a PR that just landed our GHC support window is narrowed to 3 years, not 5, so we need to support GHC 9.6 upwards (only the first major release counts, though you are right, point releases of LTS GHCs may be worth consideration, too). GHC 9.6.1 contains Cabal 3.10.1.0, so 3.10 is the relevant file format version. Did I get this right? If so, would it make sense to make the format 3.8 is both .cabal files? |
|
Regarding the intent of the pre-flight checks point in question, I think you deciphered it right regarding backward compat and the main motivation was to avoid keeping very old format versions, but not overdo it. There are many reasons to avoid ancient format versions; a few off the top of my head:
I think your changes document the constraints on format well and in the right place, but how do we ensure the format gets bumped often enough? BTW, that also applies to the .cabal file of cabal-install, etc. |
This was part of the pre-flight checklist, which I would like to get rid of.
The original version of this was:
I interpreted this as:
cabal-versionsshould not be too recentcabal-versioncabal-versions(for any definition of ancient)From what I understand, for a release, the only thing that is critical is that it is not too recent. If we make sure that we don't bump it too aggressively on
master, then this will always be true.So what does not too recent mean?
Naïvely, I assume we want the
.cabalfile to be parsable with anyCaballibrary that was bundled with any GHC version released within the last 5 years.2021-12-25) ->cabal-version: 3.42021-09-29) ->cabal-version: 3.6https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history
If my understanding is correct, by which ever definition we go, I suggest that we stick with
3.6(and don't go back to3.4). But I also think that generally it makes sense to keep "LTS" GHCs in the support window.So basically I suggest:
cabal-version: 3.6for nowObservations:
cabal-versioncabal-version: 1.12is completely adequate for many packagesNote, that the most recent version of this was less clear to me. With some mental gymnastics I could interpret it the complete opposite way around: https://github.com/haskell/cabal/wiki/Making-a-release/_compare/1848c319688beed33254efcf612d01c737c8a78e...72a2fa0f64643565e32994f7bdcdafb04bb4bee3
That's why I dug up the original version.
Template B: This PR does not modify behaviour or interface
E.g. the PR only touches documentation or tests, does refactorings, etc.
Include the following checklist in your PR: