From e7faac237c3eb2ea037fa62d5cde83423676ab8c Mon Sep 17 00:00:00 2001 From: Francesco Ariis Date: Mon, 27 Nov 2023 18:45:20 +0100 Subject: [PATCH] Fix testsuite --- Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs | 4 ++-- .../PackageTests/AutogenModules/Package/setup.cabal.out | 1 + cabal-testsuite/PackageTests/AutogenModules/Package/setup.out | 1 + .../PackageTests/AutogenModules/SrcDist/AutogenModules.cabal | 4 ++-- .../ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out | 1 + .../PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out | 2 ++ 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs index caf3e16d038..5d15e2db137 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs @@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured" -- The difference is in encoding of newtypes #if MIN_VERSION_base(4,7,0) , testCase "GenericPackageDescription" $ - md5Check (Proxy :: Proxy GenericPackageDescription) 0xb287a6f04e34ef990cdd15bc6cb01c76 + md5Check (Proxy :: Proxy GenericPackageDescription) 0x6dd3f04bcaf36c8a5f617c7d0aff5962 , testCase "LocalBuildInfo" $ - md5Check (Proxy :: Proxy LocalBuildInfo) 0x26e91a71ebd19d4d6ce37f798ede249a + md5Check (Proxy :: Proxy LocalBuildInfo) 0x2f1c329dcbdf9e49a64d44a139fcd622 #endif ] diff --git a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out index dd76b493185..c8bf9bbee9b 100644 --- a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out +++ b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out @@ -16,6 +16,7 @@ On test suite 'Test' an 'autogen-module' is not on 'other-modules' On benchmark 'Bench' an 'autogen-module' is not on 'other-modules' Packages using 'cabal-version: 2.0' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that 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. Packages using 'cabal-version: 2.0' and the autogenerated module PackageInfo_* must include it in 'autogen-modules' as well as 'exposed-modules' and 'other-modules'. This specifies that 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. +To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. The filename './my.cabal' does not match package name (expected: 'AutogenModules.cabal') Note: the public hackage server would reject this package. Building source dist for AutogenModules-0.1... diff --git a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.out b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.out index dd76b493185..c8bf9bbee9b 100644 --- a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.out +++ b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.out @@ -16,6 +16,7 @@ On test suite 'Test' an 'autogen-module' is not on 'other-modules' On benchmark 'Bench' an 'autogen-module' is not on 'other-modules' Packages using 'cabal-version: 2.0' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that 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. Packages using 'cabal-version: 2.0' and the autogenerated module PackageInfo_* must include it in 'autogen-modules' as well as 'exposed-modules' and 'other-modules'. This specifies that 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. +To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. The filename './my.cabal' does not match package name (expected: 'AutogenModules.cabal') Note: the public hackage server would reject this package. Building source dist for AutogenModules-0.1... 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/Check/ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out index 8d0799bafc4..ab6e4aa85c1 100644 --- a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out +++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out @@ -2,4 +2,5 @@ The following errors will cause portability problems on other environments: Error: Packages using 'cabal-version: 2.0' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that 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. Error: Packages using 'cabal-version: 2.0' and the autogenerated module PackageInfo_* must include it in 'autogen-modules' as well as 'exposed-modules' and 'other-modules'. This specifies that 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. +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/NonConfCheck/PathsExtensions/cabal.out b/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out index eb486dcb3af..e9acace1c9c 100644 --- a/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out +++ b/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out @@ -2,4 +2,6 @@ The package will not build sanely due to these errors: 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'. +The following errors will cause portability problems on other environments: +Error: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. Error: Hackage would reject this package.