-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cabal-syntax-3.10.2.0 is going to violate PVP #9258
Comments
Looks like #9028 targeted the wrong branch cc @Kleidukos edit: and this is the extensions backport 9faa4db |
#9028 is my fault --- I decided to add new licences in a point release to lessen the load on 3.10.1.0. I forgot it doesn't just add data, but creates new constructors. Let's just revert and it's going to be published in 3.12.1.0. No harm done. Re 9faa4db, this is a serious issue, because it's needed to fully handle GHC 9.8, so I think we may even consider breaking PVP and saying so explicitly in release notes. Another option is to revert the commit and include a snapshot of master branch in GHC 9.8 instead, to be published (with some more commits) as cabal 3.12. Are there really any other options? @Kleidukos, @bgamari, everybody what do we do? Edit: here's a backport with the |
Are you sure about this? What would be the consequences of not including |
I'm not sure at all. :) We'd need to consider the POV of tool creators, users that read GHC release notes and want to enable the extension in their cabal file, GHC devs writing tests that perhaps do the same, etc. Actually, is the new constructor used anywhere except in .cabal files in the two fields about extensions? |
FWIW
so everything will still parse. Also from a first cursory look, it looks like the solver does not make a distinction between a cabal/cabal-install-solver/src/Distribution/Solver/Modular/Validate.hs Lines 578 to 580 in fa54e31
Where
@grayjay might be able to correct me. To be clear, I don't mind if we end up doing a major bump. PS: Now I am wondering whether it is even worth having that list of known extensions. |
[Edit: @phadej explains that's a ghc-related error, so my example is bogus, see below. I just re-checked by adding [Edit2: @phadej kindly offers a new bit of info: "Also e.g. uhcLanguageExtensions uses the list, as there isn't uhc --supported-extensions."] I've added extension
|
The cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
-cabalSpecVersionToSPDXListVersion CabalSpecV3_8 = LicenseListVersion_3_16
+cabalSpecVersionToSPDXListVersion CabalSpecV3_8 = LicenseListVersion_3_20 change in particular changes the .cabal file format. That cannot be done at all, as old Please, pay attention to the changes. The extension changes affects what files may be uploaded on Hackage, i.e.
that's probably the only noticeable issue of not including new extensions as The haiku change can be better properly right: just add a constructor and make a major release.
which can be better done by adding a proper constructor (i.e. breaking change). Make what you now have as |
That's because your compiler doens't support |
I think, as we had discussed in calls in the past, there's no reason the versions of That said, given that the knownextensions thing is not that big a deal (hackage typically won't update to allow the latest extensions right away anyway), I would be happy with one of three solutions.
|
We have discussed a few mitigations of this in the Stability Working Group. There are a few options here that we might decide to pursue in the future:
|
Please verify that this is not a regression (memory usage nor performance) for applications like This is probably not as impactful as optimizing |
I think the non_exhaustive attribute would be a useful extension to ghc in general, even if the process means that it can't help with cabal for some time, and I really hope the SWG pursues it regardless of what other mitigations we may take. |
I still am not convinced that promptly adding new extensions to Cabal-syntax is necessary. I admit I only had a cursory look but I think everything would work as expected even an extension is unknown. I will dare further; the whole thing is unnecessary: cabal does not need to keep a list of known extensions at all. It does not do anything with it. @phadej points out that hackage-server uses that list; in that case the list can be moved directly into hackage-server (perhaps not hardcoded but kept on a configuration file that can be easily changed). |
|
It adds constructors to
LicenseId
andLicenseListVersion
,Language.Haskell.Extension.Extension
. These are breaking changes.The text was updated successfully, but these errors were encountered: