Skip to content

Commit

Permalink
Fix spec-ver lower-bound for some 3.0 fields in cabal check
Browse files Browse the repository at this point in the history
These are only supported properly starting with
cabal-version:3.0 (which has been enforced by
Hackage as well -- via this very patch).

See haskell#6033 for details
  • Loading branch information
hvr authored and phadej committed Dec 12, 2019
1 parent 75fdb32 commit d49e0c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cabal/Distribution/PackageDescription/Check.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ checkCabalVersion pkg =
[ prettyShow (Dependency name (eliminateMajorBoundSyntax versionRange) Set.empty)
| Dependency name versionRange _ <- depsUsingMajorBoundSyntax ]

, checkVersion [2,1] (any (not . null)
, checkVersion [3,0] (any (not . null)
(concatMap buildInfoField
[ asmSources
, cmmSources
Expand All @@ -1296,7 +1296,7 @@ checkCabalVersion pkg =
PackageDistInexcusable $
"The use of 'asm-sources', 'cmm-sources', 'extra-bundled-libraries' "
++ " and 'extra-library-flavours' requires the package "
++ " to specify at least 'cabal-version: >= 2.1'."
++ " to specify at least 'cabal-version: 3.0'."

, checkVersion [2,5] (any (not . null) $ buildInfoField extraDynLibFlavours) $
PackageDistInexcusable $
Expand Down

0 comments on commit d49e0c0

Please sign in to comment.