-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This test makes a long chain of packages violate the private closure property. In particular, it ensures all of the packages that are missing from the private scope are listed in the error message.
- Loading branch information
Showing
14 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/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 @@ | ||
packages: libA, libB, libC, libD, libE, libH |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/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 | ||
|
||
main = do | ||
cabalTest $ recordMode DoNotRecord $ do | ||
|
||
-- Will violate closure property | ||
fails (cabal' "v2-build" ["libA"]) | ||
>>= assertOutputContains "a private scope must contain its closure, but packages libC, libD, libE are not included in the private scope libA:P0" |
12 changes: 12 additions & 0 deletions
12
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libA/libA.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,12 @@ | ||
cabal-version: 3.0 | ||
name: libA | ||
version: 0.1.0.0 | ||
license: NONE | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: MyLib | ||
build-depends: base | ||
private-build-depends: P0 with (libB, libH) | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libA/src/MyLib.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 @@ | ||
module MyLib (someFunc) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |
11 changes: 11 additions & 0 deletions
11
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libB/libB.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.0 | ||
name: libB | ||
version: 0.1.0.0 | ||
license: NONE | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: MyLib | ||
build-depends: base, libC | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libB/src/MyLib.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 @@ | ||
module MyLib (someFunc) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |
11 changes: 11 additions & 0 deletions
11
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libC/libC.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.0 | ||
name: libC | ||
version: 0.1.0.0 | ||
license: NONE | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: MyLib | ||
build-depends: base, libD | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libC/src/MyLib.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 @@ | ||
module MyLib (someFunc) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |
11 changes: 11 additions & 0 deletions
11
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libD/libD.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.0 | ||
name: libD | ||
version: 0.1.0.0 | ||
license: NONE | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: MyLib | ||
build-depends: base, libE | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libD/src/MyLib.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 @@ | ||
module MyLib (someFunc) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |
11 changes: 11 additions & 0 deletions
11
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libE/libE.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.0 | ||
name: libE | ||
version: 0.1.0.0 | ||
license: NONE | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: MyLib | ||
build-depends: base, libH | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libE/src/MyLib.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 @@ | ||
module MyLib (someFunc) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |
11 changes: 11 additions & 0 deletions
11
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libH/libH.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.0 | ||
name: libH | ||
version: 0.1.0.0 | ||
license: NONE | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: MyLib | ||
build-depends: base | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/PrivateDeps/closure-property-long-chain/libH/src/MyLib.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 @@ | ||
module MyLib (someFunc) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |