forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests Paths_ autogen module + default.extensions
Fixes haskell#5086 The haskell#5054 links to commercialhaskell/stack#3789 which says - `Ensure you have OverloadedStrings and RebindableSyntax extensions enabled.` So we warn only in that case. Only `OverloadeStrings` (or `OverloadedLists`) or `RebindableSyntax` seems to be ok. Also make `allBuildInfos` return all (not only buildable) build infos, removing FIXME. `allBuildInfos` is used only in D.PD.Check.
- Loading branch information
Showing
8 changed files
with
91 additions
and
21 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
39 changes: 39 additions & 0 deletions
39
Cabal/tests/ParserTests/regressions/extensions-paths-5054.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,39 @@ | ||
name: extensions-paths | ||
version: 5054 | ||
category: Test | ||
maintainer: Oleg Grenrus | ||
license: BSD3 | ||
license-file: LICENSe | ||
synopsis: Paths_pkg module + "bad" extensions + old cabal | ||
description: | ||
Only cabal-version: 2.2 or later will build Paths_pkg ok with | ||
|
||
* RebindableSyntax and | ||
|
||
* OverloadedLists or OverloadedStrings | ||
|
||
`fromList` or `fromString` will be out-of-scope when compiling Paths_ module. | ||
|
||
Other extensions (like NoImplicitPrelude) were handled before | ||
build-type: Simple | ||
cabal-version: 1.12 | ||
|
||
library | ||
default-language: Haskell2010 | ||
exposed-modules: Issue Paths_extensions_paths | ||
default-extensions: | ||
RebindableSyntax | ||
OverloadedStrings | ||
|
||
test-suite tests | ||
default-language: Haskell2010 | ||
main-is: Test.hs | ||
type: exitcode-stdio-1.0 | ||
if os(linux) | ||
other-modules: Paths_extensions_paths | ||
else: | ||
buildable: False | ||
|
||
default-extensions: | ||
OverloadedLists | ||
RebindableSyntax |
1 change: 1 addition & 0 deletions
1
Cabal/tests/ParserTests/regressions/extensions-paths-5054.check
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 @@ | ||
The package uses RebindableSyntax with OverloadedStrings or OverloadedLists in default-extensions, and also Paths_ autogen module. That configuration is known to cause compile failures with Cabal < 2.2. To use these default-extensions with Paths_ autogen module specify at least 'cabal-version: 2.2'. |
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