-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i.e. fail on build. This means the error is no more “just” a PackageDistInexcusable (Hackage will refuse it), *but* a PackageBuildImpossible.
- Loading branch information
Showing
8 changed files
with
51 additions
and
5 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
10 changes: 10 additions & 0 deletions
10
cabal-testsuite/PackageTests/BuildAutogenPackageGuard/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,10 @@ | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- pkg-0 (lib) (first run) | ||
Configuring library for pkg-0... | ||
Error: [Cabal-5559] | ||
To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. | ||
Error: [Cabal-7125] | ||
Failed to build pkg-0-inplace. The failure occurred during the configure step. |
9 changes: 9 additions & 0 deletions
9
cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.project
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,9 @@ | ||
packages: . | ||
|
||
source-repository-package | ||
type: git | ||
-- A Sample repo to test post-checkout-command | ||
location: https://github.com/haskell/bytestring | ||
post-checkout-command: true | ||
tag: 0.10.9.0 | ||
-- https://en.wikipedia.org/wiki/True_and_false_(commands) |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/BuildAutogenPackageGuard/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,8 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- #9331, guard PackageInfo functionality behind 3.12: make it a | ||
-- build failure. | ||
main = cabalTest $ do | ||
withProjectFile "cabal.project" $ do | ||
fails $ cabal "v2-build" ["pkg"] | ||
|
17 changes: 17 additions & 0 deletions
17
cabal-testsuite/PackageTests/BuildAutogenPackageGuard/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,17 @@ | ||
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 == 4.* | ||
-- ☞ N.B.: PackageInfo packages must contain the same name of | ||
-- of the package! (In this example: `prova`). | ||
autogen-modules: PackageInfo_pkg | ||
exposed-modules: PackageInfo_pkg |
3 changes: 2 additions & 1 deletion
3
cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# cabal check | ||
The package will not build sanely due to these errors: | ||
Error: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. | ||
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. |
2 changes: 1 addition & 1 deletion
2
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# cabal check | ||
The following errors will cause portability problems on other environments: | ||
The package will not build sanely due to these errors: | ||
Error: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. | ||
Error: Hackage would reject this package. |
3 changes: 1 addition & 2 deletions
3
cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# cabal check | ||
The package will not build sanely due to these errors: | ||
Error: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. | ||
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. |