-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add test for #9331 Guard Paths_* behind `cabal-version: 3.12` or higher, “fail” and “succeed” tests. * check: guard PackageInfo behind cabal-version ≥ 3.12 Note we do not actually check for ≥ 3.12, since it is not possible to introduce constructors in point release. Instead the check always fires with PackageInfo_* is present, and suggests an upgrade path. * Fix testsuite * Add changelog Co-authored-by: Mikolaj <281893+Mikolaj@users.noreply.github.com>
- Loading branch information
Showing
12 changed files
with
56 additions
and
1 deletion.
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
3 changes: 3 additions & 0 deletions
3
cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.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
3 changes: 3 additions & 0 deletions
3
cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.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
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
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/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,4 @@ | ||
# cabal check | ||
Warning: The following errors will cause portability problems on other environments: | ||
Warning: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. This is not possible in `cabal 3.10`. To use this feature and be able to upload your package to Hackage, download `cabal 3.12`! | ||
Warning: Hackage would reject this package. |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- #9331: PackageInfo functionality should be guarded by cabal-version. | ||
main = cabalTest $ | ||
fails $ cabal "check" [] | ||
|
16 changes: 16 additions & 0 deletions
16
cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/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,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 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
synopsis: `check`: add PackageInfo warning | ||
packages: cabal-install | ||
prs: #9525 | ||
issues: #9331 | ||
|
||
description: { | ||
|
||
`cabal check` will warn about PackageInfo_* modules and provide an upgrade path to 3.12. | ||
|
||
} |