--- a/stack.cabal +++ b/stack.cabal @@ -150,7 +150,7 @@ source-repository head custom-setup setup-depends: - Cabal >=3.10.3.0 && <3.12, + Cabal >=3.12 && <3.13, base >=4.14.3.0 && <5, filepath >=1.4.301.0 @@ -423,7 +423,7 @@ library -optP-Wno-nonportable-include-path -Widentities build-depends: - Cabal >=3.8.1.0 && <3.12, + Cabal >=3.12 && <3.13, aeson >=2.0.3.0, aeson-warning-parser >=0.1.1, ansi-terminal >=1.0.2, @@ -551,7 +551,7 @@ executable stack -optP-Wno-nonportable-include-path -threaded -rtsopts build-depends: - Cabal >=3.8.1.0 && <3.12, + Cabal >=3.12 && <3.13, aeson >=2.0.3.0, aeson-warning-parser >=0.1.1, ansi-terminal >=1.0.2, @@ -660,7 +660,7 @@ executable stack-integration-test -with-rtsopts=-N build-depends: - Cabal >=3.8.1.0 && <3.12, + Cabal >=3.12 && <3.13, aeson >=2.0.3.0, aeson-warning-parser >=0.1.1, ansi-terminal >=1.0.2, @@ -785,7 +785,7 @@ test-suite stack-unit-test -optP-Wno-nonportable-include-path -threaded build-depends: - Cabal >=3.8.1.0 && <3.12, + Cabal >=3.12 && <3.13, QuickCheck >=2.14.3, aeson >=2.0.3.0, aeson-warning-parser >=0.1.1, --- a/src/Stack/Types/CompilerBuild.hs +++ b/src/Stack/Types/CompilerBuild.hs @@ -13,7 +13,7 @@ module Stack.Types.CompilerBuild ) where import Data.Aeson.Types ( FromJSON, parseJSON, withText ) -import Data.Text as T +import Data.Text as T hiding ( show ) import Stack.Prelude -- | Build of the compiler distribution (e.g. standard, gmp4, tinfo6) --- a/src/Stack/SDist.hs +++ b/src/Stack/SDist.hs @@ -573,18 +573,7 @@ checkPackageInExtractedTarball pkgDir = , flow "for common mistakes using Cabal version" , fromString $ versionString cabalVersion <> "." ] - let pkgChecks = - -- MSS 2017-12-12: Try out a few different variants of pkgDesc to try - -- and provoke an error or warning. I don't know why, but when using - -- `Just pkgDesc`, it appears that Cabal does not detect that `^>=` is - -- used with `cabal-version: 1.24` or earlier. It seems like pkgDesc - -- (the one we create) does not populate the `buildDepends` field, - -- whereas flattenPackageDescription from Cabal does. In any event, - -- using `Nothing` seems more logical for this check anyway, and the - -- fallback to `Just pkgDesc` is just a crazy sanity check. - case Check.checkPackage gpd Nothing of - [] -> Check.checkPackage gpd (Just pkgDesc) - x -> x + let pkgChecks = Check.checkPackage gpd fileChecks <- liftIO $ Check.checkPackageFiles minBound pkgDesc (toFilePath pkgDir) let checks = pkgChecks ++ fileChecks