forked from commercialhaskell/stack
-
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.
Tell the user that a boot package was pruned
Fixes commercialhaskell#4897.
- Loading branch information
1 parent
da6c1a4
commit b5ca47c
Showing
5 changed files
with
52 additions
and
8 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,16 @@ | ||
import Control.Monad (unless) | ||
import Data.List (isInfixOf) | ||
import StackTest | ||
|
||
planFailure :: String | ||
planFailure = | ||
"but this GHC boot package has been pruned (issue #4510);" | ||
|
||
main :: IO () | ||
main = do | ||
stackErrStderr ["build"] (expectMessage planFailure) | ||
|
||
expectMessage :: String -> String -> IO () | ||
expectMessage msg stderr = do | ||
unless (words msg `isInfixOf` words stderr) | ||
(error $ "Expected an error: \n" ++ show msg) |
8 changes: 8 additions & 0 deletions
8
test/integration/tests/4897-boot-package-pruned/files/directory/directory.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,8 @@ | ||
name: directory | ||
version: 1.3.3.0 | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
build-depends: base | ||
default-language: Haskell2010 |
8 changes: 8 additions & 0 deletions
8
test/integration/tests/4897-boot-package-pruned/files/files.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,8 @@ | ||
name: files | ||
version: 0.1.0.0 | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
build-depends: base, directory, process | ||
default-language: Haskell2010 |
3 changes: 3 additions & 0 deletions
3
test/integration/tests/4897-boot-package-pruned/files/stack.yaml
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 @@ | ||
resolver: lts-13.26 | ||
packages: [.] | ||
extra-deps: [./directory] |