-
Notifications
You must be signed in to change notification settings - Fork 704
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Check for LEQ upper bounds - Check for GT lower bounds - Check for trailing zero upper bounds - Add missing gtLowerBound to checks - Handle ^>= versions with its IntersectVersionRangesF - Set baseline for cabal init generated bounds - Use recursive functions for checking bounds - Handle union version ranges
- Loading branch information
1 parent
c3a9dd7
commit 1121f5e
Showing
8 changed files
with
207 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
cabal-testsuite/PackageTests/Check/PackageFiles/VersionBounds/cabal.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# cabal check | ||
These warnings may cause trouble when distributing the package: | ||
Warning: [missing-upper-bounds] On library, these packages miss upper bounds: | ||
- missing-upper | ||
- exclusive-minimums-missing-upper | ||
- or-exclusive-minimums-missing-upper | ||
- or-inclusive-maximums-missing-upper | ||
Please add them. There is more information at https://pvp.haskell.org/ | ||
Warning: [less-than-equals-upper-bounds] On library, these packages have less than or equals (<=) upper bounds: | ||
- inclusive-maximums | ||
- and-inclusive-maximums | ||
- or-inclusive-maximums-missing-upper | ||
Please use less than (<) for upper bounds. There is more information at https://pvp.haskell.org/ | ||
Warning: [greater-than-lower-bounds] On library, these packages have greater than (>) lower bounds: | ||
- exclusive-minimums-missing-upper | ||
- and-exclusive-minimums | ||
- or-exclusive-minimums-missing-upper | ||
Please use greater than or equals (>=) for lower bounds. There is more information at https://pvp.haskell.org/ |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/Check/PackageFiles/VersionBounds/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ | ||
cabal "check" [] |
25 changes: 25 additions & 0 deletions
25
cabal-testsuite/PackageTests/Check/PackageFiles/VersionBounds/pkg.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cabal-version: 3.0 | ||
name: pkg | ||
synopsis: synopsis | ||
description: description | ||
version: 0 | ||
category: example | ||
maintainer: [email protected] | ||
license: GPL-3.0-or-later | ||
|
||
library | ||
exposed-modules: Foo | ||
default-language: Haskell2010 | ||
build-depends: | ||
, base ^>= 4.20.0.0 | ||
|
||
, missing-upper >= 0 | ||
, missing-lower < 1 | ||
|
||
, exclusive-minimums-missing-upper > 0 | ||
, and-exclusive-minimums > 0 && < 1 | ||
, or-exclusive-minimums-missing-upper > 0 || < 1 | ||
|
||
, inclusive-maximums <= 1 | ||
, and-inclusive-maximums >= 0 && <= 1 | ||
, or-inclusive-maximums-missing-upper >= 0 || <= 1 |