-
Notifications
You must be signed in to change notification settings - Fork 841
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 #6049 from commercialhaskell/fix6046
Fix #6046 Unregister local packages for sub libraries
- Loading branch information
Showing
9 changed files
with
148 additions
and
23 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
12 changes: 12 additions & 0 deletions
12
test/integration/tests/6046-missing-sublib-unregister/Main.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,12 @@ | ||
import StackTest | ||
|
||
-- This tests building a package with a library and an internal sub library, | ||
-- where the library depends on the sub library, first version 0.1.0.0 (the | ||
-- Cabal file is @foo.cabal1@) and then version 0.2.0.0 (the Cabal file is | ||
-- @foo.cabal2@). | ||
main :: IO () | ||
main = do | ||
copy "foo.cabal1" "foo.cabal" | ||
stack ["build"] | ||
copy "foo.cabal2" "foo.cabal" | ||
stack ["build"] |
27 changes: 27 additions & 0 deletions
27
test/integration/tests/6046-missing-sublib-unregister/files/foo.cabal1
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,27 @@ | ||
cabal-version: 2.0 | ||
name: foo | ||
version: 0.1.0.0 | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: | ||
Lib | ||
other-modules: | ||
Sub | ||
hs-source-dirs: | ||
src | ||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints | ||
build-depends: | ||
base >=4.7 && <5 | ||
, sub | ||
default-language: Haskell2010 | ||
|
||
library sub | ||
exposed-modules: | ||
Sub | ||
hs-source-dirs: | ||
src | ||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints | ||
build-depends: | ||
base >=4.7 && <5 | ||
default-language: Haskell2010 |
27 changes: 27 additions & 0 deletions
27
test/integration/tests/6046-missing-sublib-unregister/files/foo.cabal2
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,27 @@ | ||
cabal-version: 2.0 | ||
name: foo | ||
version: 0.2.0.0 | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: | ||
Lib | ||
other-modules: | ||
Sub | ||
hs-source-dirs: | ||
src | ||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints | ||
build-depends: | ||
base >=4.7 && <5 | ||
, sub | ||
default-language: Haskell2010 | ||
|
||
library sub | ||
exposed-modules: | ||
Sub | ||
hs-source-dirs: | ||
src | ||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints | ||
build-depends: | ||
base >=4.7 && <5 | ||
default-language: Haskell2010 |
5 changes: 5 additions & 0 deletions
5
test/integration/tests/6046-missing-sublib-unregister/files/src/Lib.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 @@ | ||
module Lib | ||
( someFunc | ||
) where | ||
|
||
import Sub ( someFunc ) |
6 changes: 6 additions & 0 deletions
6
test/integration/tests/6046-missing-sublib-unregister/files/src/Sub.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,6 @@ | ||
module Sub | ||
( someFunc | ||
) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |
1 change: 1 addition & 0 deletions
1
test/integration/tests/6046-missing-sublib-unregister/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 @@ | ||
resolver: lts-20.8 |