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 “Add default-language” suggestion
As a warning (“Hackage would reject this package”), to prepare users to GHC language editions.
- Loading branch information
Showing
12 changed files
with
59 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[add-language] Without `default-language`, cabal will default to Haskell98, which is probably not what you want. Please add `default-language` to all targets. |
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 |
---|---|---|
|
@@ -24,3 +24,4 @@ library | |
GHC.Hs.Type | ||
hs-source-dirs: | ||
compat-8.10 | ||
default-language: Haskell2010 |
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 |
---|---|---|
|
@@ -17,3 +17,4 @@ library | |
compat | ||
other-modules: | ||
GHC.Hs.Type | ||
default-language: Haskell2010 |
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
...testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/DefaultLanguageSoft/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 | ||
The following errors will cause portability problems on other environments: | ||
Error: [add-language] Without `default-language`, cabal will default to Haskell98, which is probably not what you want. Please add `default-language` to all targets. | ||
Error: Hackage would reject this package. |
5 changes: 5 additions & 0 deletions
5
...suite/PackageTests/Check/ConfiguredPackage/CabalVersion/DefaultLanguageSoft/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,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- Please specify `default-language`. | ||
main = cabalTest $ | ||
fails $ cabal "check" [] |
11 changes: 11 additions & 0 deletions
11
...testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/DefaultLanguageSoft/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,11 @@ | ||
cabal-version: 3.4 | ||
name: pkg | ||
synopsis: synopsis | ||
description: description | ||
version: 0 | ||
category: example | ||
maintainer: [email protected] | ||
license: GPL-3.0-or-later | ||
|
||
library | ||
exposed-modules: Module |
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,11 @@ | ||
synopsis: Warn on missing `default-language` | ||
packages: Cabalcabal-install | ||
prs: #9766 | ||
issues: #9620 | ||
|
||
description: { | ||
|
||
- To help the adoption of GHC language editions, `cabal check` will now | ||
warn about missing `default-language`. | ||
|
||
} |
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