diff --git a/Cabal-syntax/src/Distribution/CabalSpecVersion.hs b/Cabal-syntax/src/Distribution/CabalSpecVersion.hs index 6290fa9166e..eb029b5ffc9 100644 --- a/Cabal-syntax/src/Distribution/CabalSpecVersion.hs +++ b/Cabal-syntax/src/Distribution/CabalSpecVersion.hs @@ -32,7 +32,8 @@ data CabalSpecVersion CabalSpecV3_4 | CabalSpecV3_6 | CabalSpecV3_8 - -- 3.10: no changes + | -- 3.10: no changes + CabalSpecV3_12 deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data, Generic) instance Binary CabalSpecVersion @@ -43,6 +44,7 @@ instance NFData CabalSpecVersion where rnf = genericRnf -- -- @since 3.0.0.0 showCabalSpecVersion :: CabalSpecVersion -> String +showCabalSpecVersion CabalSpecV3_12 = "3.12" showCabalSpecVersion CabalSpecV3_8 = "3.8" showCabalSpecVersion CabalSpecV3_6 = "3.6" showCabalSpecVersion CabalSpecV3_4 = "3.4" @@ -63,13 +65,14 @@ showCabalSpecVersion CabalSpecV1_2 = "1.2" showCabalSpecVersion CabalSpecV1_0 = "1.0" cabalSpecLatest :: CabalSpecVersion -cabalSpecLatest = CabalSpecV3_8 +cabalSpecLatest = CabalSpecV3_12 -- | Parse 'CabalSpecVersion' from version digits. -- -- It may fail if for recent versions the version is not exact. cabalSpecFromVersionDigits :: [Int] -> Maybe CabalSpecVersion cabalSpecFromVersionDigits v + | v == [3, 12] = Just CabalSpecV3_12 | v == [3, 8] = Just CabalSpecV3_8 | v == [3, 6] = Just CabalSpecV3_6 | v == [3, 4] = Just CabalSpecV3_4 @@ -92,6 +95,7 @@ cabalSpecFromVersionDigits v -- | @since 3.4.0.0 cabalSpecToVersionDigits :: CabalSpecVersion -> [Int] +cabalSpecToVersionDigits CabalSpecV3_12 = [3, 12] cabalSpecToVersionDigits CabalSpecV3_8 = [3, 8] cabalSpecToVersionDigits CabalSpecV3_6 = [3, 6] cabalSpecToVersionDigits CabalSpecV3_4 = [3, 4] diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs index 799c7f58d9b..7e5f54f64fc 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs @@ -33,15 +33,15 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion md5CheckGenericPackageDescription proxy = md5Check proxy #if MIN_VERSION_base(4,19,0) - 0x87037bc65fba873f53c03ce572a42229 + 0xc638caeb7531f107f64d12773f9430d0 #else - 0x5817c798e23df281d794ad27754ad43f + 0x7a231bff7bb37049ec7f2ebfd98d3243 #endif md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion md5CheckLocalBuildInfo proxy = md5Check proxy #if MIN_VERSION_base(4,19,0) - 0x83cb87bceb4c1634e7dda192c3ad6579 + 0x23942cff98237dc167ef90d64d7ef893 #else - 0x4beeb42e94807be904bc5d15355c98cd + 0xa4e9f8a7e1583906880d6ec2d1bbb14b #endif diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index 99ae5a8d379..e6cfba74928 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -652,7 +652,18 @@ checkAutogenModules ams bi = do -- Paths_* module + some default extension build failure. autogenCheck autoInfoModuleName CVAutogenPackageInfo rebindableClashCheck autoInfoModuleName RebindableClashPackageInfo + + -- PackageInfo_* module + cabal-version < 3.12 + -- See Mikolaj’s comments on #9481 on why this has to be + -- PackageBuildImpossible and not merely PackageDistInexcusable. + checkSpecVer + CabalSpecV3_12 + (elem autoInfoModuleName allModsForAuto) + (PackageBuildImpossible CVAutogenPackageInfoGuard) where + allModsForAuto :: [ModuleName] + allModsForAuto = ams ++ otherModules bi + autogenCheck :: Monad m => ModuleName @@ -660,7 +671,6 @@ checkAutogenModules ams bi = do -> CheckM m () autogenCheck name warning = do sv <- asksCM ccSpecVersion - let allModsForAuto = ams ++ otherModules bi checkP ( sv >= CabalSpecV2_0 && elem name allModsForAuto diff --git a/Cabal/src/Distribution/PackageDescription/Check/Warning.hs b/Cabal/src/Distribution/PackageDescription/Check/Warning.hs index a8d9ac78195..52cb5e289f5 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Warning.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Warning.hs @@ -211,6 +211,7 @@ data CheckExplanation | CVExpliticDepsCustomSetup | CVAutogenPaths | CVAutogenPackageInfo + | CVAutogenPackageInfoGuard | GlobNoMatch String String | GlobExactMatch String String FilePath | GlobNoDir String String FilePath @@ -778,6 +779,9 @@ ppExplanation CVAutogenPackageInfo = ++ "the module does not come with the package and is generated on " ++ "setup. Modules built with a custom Setup.hs script also go here " ++ "to ensure that commands like sdist don't fail." +ppExplanation CVAutogenPackageInfoGuard = + "To use the autogenerated module PackageInfo_* you need to specify " + ++ "`cabal-version: 3.12` or higher." ppExplanation (GlobNoMatch field glob) = "In '" ++ field diff --git a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs index a98794334d0..676bf61a169 100644 --- a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs +++ b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs @@ -312,6 +312,7 @@ cabalVersionPrompt flags = getCabalVersion flags $ do parseCabalVersion "2.4" = CabalSpecV2_4 parseCabalVersion "3.0" = CabalSpecV3_0 parseCabalVersion "3.4" = CabalSpecV3_4 + parseCabalVersion "3.12" = CabalSpecV3_12 parseCabalVersion _ = defaultCabalVersion -- 2.4 displayCabalVersion :: CabalSpecVersion -> String displayCabalVersion v = case v of diff --git a/cabal-testsuite/PackageTests/AutogenModules/Package/my.cabal b/cabal-testsuite/PackageTests/AutogenModules/Package/my.cabal index 2ddd13ed619..103b8d7b7a1 100644 --- a/cabal-testsuite/PackageTests/AutogenModules/Package/my.cabal +++ b/cabal-testsuite/PackageTests/AutogenModules/Package/my.cabal @@ -1,13 +1,13 @@ +cabal-version: 3.12 name: AutogenModules version: 0.1 -license: BSD3 +license: BSD-3-Clause license-file: LICENSE author: Federico Mastellone maintainer: Federico Mastellone synopsis: AutogenModules category: PackageTests build-type: Simple -cabal-version: 2.0 description: Check that Cabal recognizes the autogen-modules fields below. diff --git a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/AutogenModules.cabal b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/AutogenModules.cabal index 0976dbf493a..9a12877cd6b 100644 --- a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/AutogenModules.cabal +++ b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/AutogenModules.cabal @@ -1,13 +1,13 @@ +cabal-version: 3.12 name: AutogenModules version: 0.1 -license: BSD3 +license: BSD-3-Clause license-file: LICENSE author: Federico Mastellone maintainer: Federico Mastellone synopsis: AutogenModules category: PackageTests build-type: Simple -cabal-version: 2.0 description: Check that Cabal recognizes the autogen-modules fields below. diff --git a/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.out b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.out new file mode 100644 index 00000000000..50d79011da3 --- /dev/null +++ b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.out @@ -0,0 +1,10 @@ +# cabal v2-build +Resolving dependencies... +Build profile: -w ghc- -O1 +In order, the following will be built: + - pkg-0 (lib) (first run) +Configuring library for pkg-0... +Error: [Cabal-5559] +To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. +Error: [Cabal-7125] +Failed to build pkg-0-inplace. The failure occurred during the configure step. diff --git a/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.project b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.project new file mode 100644 index 00000000000..b764c340a62 --- /dev/null +++ b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.project @@ -0,0 +1,2 @@ +packages: . + diff --git a/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.test.hs b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.test.hs new file mode 100644 index 00000000000..0711dcccfe1 --- /dev/null +++ b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.test.hs @@ -0,0 +1,8 @@ +import Test.Cabal.Prelude + +-- #9331, guard PackageInfo functionality behind 3.12: make it a +-- build failure. +main = cabalTest $ do + withProjectFile "cabal.project" $ do + fails $ cabal "v2-build" ["pkg"] + diff --git a/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/pkg.cabal b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/pkg.cabal new file mode 100644 index 00000000000..5babc9759cb --- /dev/null +++ b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/pkg.cabal @@ -0,0 +1,17 @@ +cabal-version: 2.4 +name: pkg +version: 0 +license: GPL-3.0-or-later +maintainer: Someone +category: Example +synopsis: Foo +description: FooBar +build-type: Simple + +library + default-language: Haskell2010 + build-depends: base == 4.* + -- ☞ N.B.: PackageInfo packages must contain the same name of + -- of the package! (In this example: `pkg`). + autogen-modules: PackageInfo_pkg + exposed-modules: PackageInfo_pkg diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/pkg.cabal b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/pkg.cabal index 8486891a3e3..027133f9223 100644 --- a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/pkg.cabal +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/pkg.cabal @@ -1,4 +1,4 @@ -cabal-version: 2.0 +cabal-version: 3.12 build-type: Simple name: pkg synopsis: synopsis @@ -6,7 +6,7 @@ description: description version: 0 category: example maintainer: none@example.com -license: GPL-3 +license: GPL-3.0-or-later license-file: LICENSE library diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.out new file mode 100644 index 00000000000..d0443c1b55c --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.out @@ -0,0 +1,4 @@ +# cabal check +The package will not build sanely due to these errors: +Error: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. +Error: Hackage would reject this package. diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.test.hs b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.test.hs new file mode 100644 index 00000000000..c9c2e56de21 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.test.hs @@ -0,0 +1,6 @@ +import Test.Cabal.Prelude + +-- #9331: PackageInfo functionality should be guarded by cabal-version. +main = cabalTest $ + fails $ cabal "check" [] + diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/pkg.cabal b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/pkg.cabal new file mode 100644 index 00000000000..aeef460f7f0 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/pkg.cabal @@ -0,0 +1,16 @@ +cabal-version: 2.4 +name: pkg +version: 0 +license: GPL-3.0-or-later +maintainer: Someone +category: Example +synopsis: Foo +description: FooBar +build-type: Simple + +library + default-language: Haskell2010 + build-depends: base <5 + autogen-modules: PackageInfo_pkg + exposed-modules: PackageInfo_pkg + diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/cabal.out new file mode 100644 index 00000000000..37aa169b416 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/cabal.out @@ -0,0 +1,2 @@ +# cabal check +No errors or warnings could be found in the package. diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/cabal.test.hs b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/cabal.test.hs new file mode 100644 index 00000000000..baa6f988ea0 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/cabal.test.hs @@ -0,0 +1,7 @@ +import Test.Cabal.Prelude + +-- #9331: PackageInfo functionality should be guarded by cabal-version, +-- does not error when cabal-version is 3.12 or higher. +main = cabalTest $ + cabal "check" [] + diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/pkg.cabal b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/pkg.cabal new file mode 100644 index 00000000000..f2183649526 --- /dev/null +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersionOk/pkg.cabal @@ -0,0 +1,16 @@ +cabal-version: 3.12 +name: pkg +version: 0 +license: GPL-3.0-or-later +maintainer: Someone +category: Example +synopsis: Foo +description: FooBar +build-type: Simple + +library + default-language: Haskell2010 + build-depends: base <5 + autogen-modules: PackageInfo_pkg + exposed-modules: PackageInfo_pkg + diff --git a/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out b/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out index eb486dcb3af..34239636f6e 100644 --- a/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out +++ b/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out @@ -1,5 +1,6 @@ # cabal check The package will not build sanely due to these errors: +Error: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. Error: Packages using RebindableSyntax with OverloadedStrings or OverloadedLists in default-extensions, in conjunction with the autogenerated module Paths_*, are known to cause compile failures with Cabal < 2.2. To use these default-extensions with a Paths_* autogen module, specify at least 'cabal-version: 2.2'. Error: Packages using RebindableSyntax with OverloadedStrings or OverloadedLists in default-extensions, in conjunction with the autogenerated module PackageInfo_*, are known to cause compile failures with Cabal < 2.2. To use these default-extensions with a PackageInfo_* autogen module, specify at least 'cabal-version: 2.2'. Error: Hackage would reject this package. diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Datafiles/foo/foo.cabal b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Datafiles/foo/foo.cabal index b69379dd383..505f5078aa4 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Datafiles/foo/foo.cabal +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Datafiles/foo/foo.cabal @@ -1,7 +1,7 @@ +cabal-version: 3.12 name: foo version: 1.0 build-type: Simple -cabal-version: >= 1.10 data-dir: data data-files: hello.txt diff --git a/cabal-testsuite/PackageTests/NewBuild/T5164/setup-lib/setup-lib.cabal b/cabal-testsuite/PackageTests/NewBuild/T5164/setup-lib/setup-lib.cabal index 8f0faefa08c..7c6b32cb8ee 100644 --- a/cabal-testsuite/PackageTests/NewBuild/T5164/setup-lib/setup-lib.cabal +++ b/cabal-testsuite/PackageTests/NewBuild/T5164/setup-lib/setup-lib.cabal @@ -1,7 +1,7 @@ +cabal-version: 3.12 name: setup-lib version: 1.0 build-type: Simple -cabal-version: >= 1.10 data-files: example.txt library diff --git a/cabal-testsuite/PackageTests/PackageInfoModule/Executable/my.cabal b/cabal-testsuite/PackageTests/PackageInfoModule/Executable/my.cabal index f04d2696c6c..a2aa9da5270 100644 --- a/cabal-testsuite/PackageTests/PackageInfoModule/Executable/my.cabal +++ b/cabal-testsuite/PackageTests/PackageInfoModule/Executable/my.cabal @@ -1,11 +1,11 @@ +Cabal-version: 3.12 name: PackageInfoModule version: 0.1 -license: BSD3 +license: BSD-3-Clause author: Gautier DI FOLCO stability: stable category: PackageTests build-type: Simple -Cabal-version: >= 1.2 description: Check that the generated package info module compiles. diff --git a/cabal-testsuite/PackageTests/PackageInfoModule/ImportQualifiedPost/my.cabal b/cabal-testsuite/PackageTests/PackageInfoModule/ImportQualifiedPost/my.cabal index 7704aaa15b8..c0020ed46ac 100644 --- a/cabal-testsuite/PackageTests/PackageInfoModule/ImportQualifiedPost/my.cabal +++ b/cabal-testsuite/PackageTests/PackageInfoModule/ImportQualifiedPost/my.cabal @@ -1,10 +1,10 @@ +Cabal-version: 3.12 name: PackageInfoModule version: 0.1 -license: BSD3 +license: BSD-3-Clause author: Gautier DI FOLCO category: PackageTests build-type: Simple -Cabal-version: >= 1.2 description: Check that the generated package info module compiles. diff --git a/cabal-testsuite/PackageTests/PackageInfoModule/Library/my.cabal b/cabal-testsuite/PackageTests/PackageInfoModule/Library/my.cabal index b356e8929ea..bee4b863949 100644 --- a/cabal-testsuite/PackageTests/PackageInfoModule/Library/my.cabal +++ b/cabal-testsuite/PackageTests/PackageInfoModule/Library/my.cabal @@ -1,4 +1,4 @@ -Cabal-version: 2.2 +Cabal-version: 3.12 name: PackageInfoModule version: 0.1 license: BSD-3-Clause diff --git a/cabal-testsuite/PackageTests/PathsModule/Executable-Relocatable/my.cabal b/cabal-testsuite/PackageTests/PathsModule/Executable-Relocatable/my.cabal index 04337c3f3f7..e1bcba8ba4f 100644 --- a/cabal-testsuite/PackageTests/PathsModule/Executable-Relocatable/my.cabal +++ b/cabal-testsuite/PackageTests/PathsModule/Executable-Relocatable/my.cabal @@ -1,11 +1,11 @@ +Cabal-version: 3.12 name: PathsModule version: 0.1 -license: BSD3 +license: BSD-3-Clause author: Johan Tibell stability: stable category: PackageTests build-type: Simple -Cabal-version: >= 1.2 description: Check that the generated paths module compiles. diff --git a/cabal-testsuite/PackageTests/PathsModule/Executable/my.cabal b/cabal-testsuite/PackageTests/PathsModule/Executable/my.cabal index 04337c3f3f7..e1bcba8ba4f 100644 --- a/cabal-testsuite/PackageTests/PathsModule/Executable/my.cabal +++ b/cabal-testsuite/PackageTests/PathsModule/Executable/my.cabal @@ -1,11 +1,11 @@ +Cabal-version: 3.12 name: PathsModule version: 0.1 -license: BSD3 +license: BSD-3-Clause author: Johan Tibell stability: stable category: PackageTests build-type: Simple -Cabal-version: >= 1.2 description: Check that the generated paths module compiles. diff --git a/cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/my.cabal b/cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/my.cabal index faacd4f1ff0..a5573b4c6e6 100644 --- a/cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/my.cabal +++ b/cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/my.cabal @@ -1,10 +1,10 @@ +Cabal-version: 3.12 name: PathsModule version: 0.1 -license: BSD3 +license: BSD-3-Clause author: Martijn Bastiaan category: PackageTests build-type: Simple -Cabal-version: >= 1.2 description: Check that the generated paths module compiles. diff --git a/cabal-testsuite/PackageTests/PathsModule/Library/my.cabal b/cabal-testsuite/PackageTests/PathsModule/Library/my.cabal index 47ee1f942d1..8e1d789d101 100644 --- a/cabal-testsuite/PackageTests/PathsModule/Library/my.cabal +++ b/cabal-testsuite/PackageTests/PathsModule/Library/my.cabal @@ -1,4 +1,4 @@ -Cabal-version: 2.2 +Cabal-version: 3.12 name: PathsModule version: 0.1 license: BSD-3-Clause diff --git a/cabal-testsuite/PackageTests/PathsModule/MissingSafeHaskellMode/my.cabal b/cabal-testsuite/PackageTests/PathsModule/MissingSafeHaskellMode/my.cabal index 44140ee9019..3851d160491 100644 --- a/cabal-testsuite/PackageTests/PathsModule/MissingSafeHaskellMode/my.cabal +++ b/cabal-testsuite/PackageTests/PathsModule/MissingSafeHaskellMode/my.cabal @@ -1,4 +1,4 @@ -cabal-version: 2.2 +cabal-version: 3.12 name: PathsModule version: 0.1 license: BSD-3-Clause diff --git a/changelog.d/pr-9481 b/changelog.d/pr-9481 new file mode 100644 index 00000000000..5572ad56eab --- /dev/null +++ b/changelog.d/pr-9481 @@ -0,0 +1,13 @@ +synopsis: Guard PackageInfo_* modules behind `cabal-version` ≥ 3.12 +packages: Cabal cabal-install +prs: #9481 +issues: #9331 + +description: { + +`cabal check` now warns whenever PackageInfo_* autogen modules are +used with `cabal-version` ≥ 3.12. +Additionally, `cabal configure` will fail if you try to use PackageInfo_* +with `cabal-version` < 3.12. + +}