Guard PackageInfo behind cabal-version ≥ 3.12#9481
Guard PackageInfo behind cabal-version ≥ 3.12#9481mergify[bot] merged 4 commits intohaskell:masterfrom
cabal-version ≥ 3.12#9481Conversation
6fab0be to
2101563
Compare
|
Yes, the backport if crucial, but I appreciate how it can prove laborious. |
2101563 to
0928302
Compare
0928302 to
ed3b269
Compare
|
To kickstart the discussion:
|
Yes, this seems correct to me.
Yes, we shouldn't suddenly suddenly introduce a new cabal format version in a point release.
Right.
Sounds like a useful extra diagnostics for a particularly persistent user. Perhaps, in the general error message about the need to wait for cabal 3.12, also allude to the feature that we remove in 3.10.3 and that setting
Perfect. I see your PR handles both step 2 and 3 of the plan and the modified backport will cover step 5. I wasn't aware the checks in So, it seems, you solve all our problems :) except patching Hackage, which may benefit from your code as well. |
Mikolaj
left a comment
There was a problem hiding this comment.
In an implementation of point 3 of the plan, I'd also expect cabal build to fail if cabal-version is too low and the new features are present in the .cabal file (the parser should complain, I guess, just as it does for many other features?). However, I don't see any test that checks that. E.g., with cabal-version: 2.2 and sublibraries, cabal complains
~/r/horde-ad$ cabal build -j1
Errors encountered when parsing cabal file ./horde-ad.cabal:
horde-ad.cabal:206:18: error:
unexpected Sublibrary dependency syntax used. To use this syntax the package needs to specify at least 'cabal-version: 3.0'. Alternatively, if you are depending on an internal library, you can write directly the library name as it were a package.
205 | build-depends:
206 | , horde-ad:horde-ad-simplified
| ^
ed3b269 to
b7acbf4
Compare
|
I am not sure I like this solution (using |
|
Oh, great, thank you for the |
|
Yes, should definitely be just a warning in 3.10. |
d166d30 to
3372d0e
Compare
|
@ffaf1: I probably missed this: is the PR ready for re-review? |
|
Nope, CI is redder than a bowl of borscht. I will take a stab in the weekend! |
a332fcd to
ca3fc39
Compare
cabal check: guard PackageInfo behind cabal-version ≥ 3.12cabal-version ≥ 3.12
ca3fc39 to
4950204
Compare
4950204 to
04ad93e
Compare
- `cabal check`: Guard Paths_* behind `cabal-version: 3.12` or higher, “fail” and “succeed” tests. - `cabal build`: Guard Paths_* behind `cabal-version: 3.12` or higher, “fail” test.
04ad93e to
68f2599
Compare
* Add `cabal-version` 3.12 * Add test for haskell#9331 - `cabal check`: Guard Paths_* behind `cabal-version: 3.12` or higher, “fail” and “succeed” tests. - `cabal build`: Guard Paths_* behind `cabal-version: 3.12` or higher, “fail” test. * Guard PackageInfo behind cabal-version ≥ 3.12 --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Towards #9331.
I took the liberty to to run with @andreabedini #9374 as the Rubenesque #8427 got merged meanwhile, meaning the former PR needed to be updated.
Once we are fine with this patch, there is the question of whether — and how — to backport it to 3.10.
Include the following checklist in your PR:
QA notes
create a new folder, cd into it (e.g.
mkdir prova && cd prova)cabal init -nmand then modify the file to havePackageInfo_pkgmodules. Example follows:cabalv3.10.*: runcabal check, no error/warnings about PackageInfo modules is reportedcabalmaster: runcabal check, you will be warned about having to usecabal-version3.12 or higher