-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5929 from hvr/pr/bkpcabal01-regression
Add bkpcabal01 regression test-case and fix the bug
- Loading branch information
Showing
13 changed files
with
132 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Q | ||
main = print out |
36 changes: 36 additions & 0 deletions
36
cabal-testsuite/PackageTests/Backpack/bkpcabal01/bkpcabal01.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,36 @@ | ||
cabal-version: 2.0 | ||
name: bkpcabal01 | ||
version: 0.1.0.0 | ||
description: This test also exists in GHC's test-suite under the same name | ||
and was ported over to cabal's testsuite as it exposed a | ||
regression (see #5929) | ||
license: BSD3 | ||
author: Edward Z. Yang | ||
maintainer: ezyang@cs.stanford.edu | ||
build-type: Simple | ||
|
||
library impl | ||
exposed-modules: H, I | ||
build-depends: base | ||
hs-source-dirs: impl | ||
default-language: Haskell2010 | ||
|
||
library p | ||
exposed-modules: P | ||
signatures: H | ||
hs-source-dirs: p | ||
build-depends: base | ||
default-language: Haskell2010 | ||
|
||
library q | ||
exposed-modules: Q | ||
signatures: I | ||
hs-source-dirs: q | ||
build-depends: p, impl, base | ||
mixins: impl (H) | ||
default-language: Haskell2010 | ||
|
||
executable exe | ||
main-is: Main.hs | ||
build-depends: base, q, impl | ||
default-language: Haskell2010 |
34 changes: 34 additions & 0 deletions
34
cabal-testsuite/PackageTests/Backpack/bkpcabal01/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,34 @@ | ||
# cabal v2-build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- bkpcabal01-0.1.0.0 (lib:impl) (first run) | ||
- bkpcabal01-0.1.0.0 (lib:p) (first run) | ||
- bkpcabal01-0.1.0.0 (lib:p with H=bkpcabal01-0.1.0.0-inplace-impl:H) (first run) | ||
- bkpcabal01-0.1.0.0 (lib:q) (first run) | ||
- bkpcabal01-0.1.0.0 (lib:q with I=bkpcabal01-0.1.0.0-inplace-impl:I) (first run) | ||
- bkpcabal01-0.1.0.0 (exe:exe) (first run) | ||
Configuring library 'impl' for bkpcabal01-0.1.0.0.. | ||
Preprocessing library 'impl' for bkpcabal01-0.1.0.0.. | ||
Building library 'impl' for bkpcabal01-0.1.0.0.. | ||
Configuring library 'p' for bkpcabal01-0.1.0.0.. | ||
Preprocessing library 'p' for bkpcabal01-0.1.0.0.. | ||
Building library 'p' instantiated with H = <H> | ||
for bkpcabal01-0.1.0.0.. | ||
Configuring library 'p' instantiated with H = bkpcabal01-0.1.0.0-inplace-impl:H | ||
for bkpcabal01-0.1.0.0.. | ||
Preprocessing library 'p' for bkpcabal01-0.1.0.0.. | ||
Building library 'p' instantiated with H = bkpcabal01-0.1.0.0-inplace-impl:H | ||
for bkpcabal01-0.1.0.0.. | ||
Configuring library 'q' for bkpcabal01-0.1.0.0.. | ||
Preprocessing library 'q' for bkpcabal01-0.1.0.0.. | ||
Building library 'q' instantiated with I = <I> | ||
for bkpcabal01-0.1.0.0.. | ||
Configuring library 'q' instantiated with I = bkpcabal01-0.1.0.0-inplace-impl:I | ||
for bkpcabal01-0.1.0.0.. | ||
Preprocessing library 'q' for bkpcabal01-0.1.0.0.. | ||
Building library 'q' instantiated with I = bkpcabal01-0.1.0.0-inplace-impl:I | ||
for bkpcabal01-0.1.0.0.. | ||
Configuring executable 'exe' for bkpcabal01-0.1.0.0.. | ||
Preprocessing executable 'exe' for bkpcabal01-0.1.0.0.. | ||
Building executable 'exe' for bkpcabal01-0.1.0.0.. |
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: . |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/Backpack/bkpcabal01/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 | ||
main = cabalTest $ do | ||
-- GHC 8.2.2 had a regression ("unknown package: hole"), see also #4908 | ||
skipUnless =<< ghcVersionIs (\v -> v >= mkVersion [8,2] && v /= mkVersion [8,2,2]) | ||
cabal "v2-build" ["all"] |
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,2 @@ | ||
module H where | ||
x = True |
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 @@ | ||
module I where |
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,2 @@ | ||
signature H where | ||
x :: Bool |
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 @@ | ||
{-# LANGUAGE CPP #-} | ||
module P where | ||
import H | ||
y = x |
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 @@ | ||
signature I where |
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,3 @@ | ||
module Q where | ||
import P | ||
out = y |