File tree Expand file tree Collapse file tree 10 files changed +37
-37
lines changed
test/integration/tests/cabal-sublibrary-dependency Expand file tree Collapse file tree 10 files changed +37
-37
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,16 @@ import Control.Monad (unless)
2
2
import Data.List (isInfixOf )
3
3
import StackTest
4
4
5
- main :: IO ()
6
- main = do
7
- putStrLn " Disabled: CI doesn't have GHC 8.8.1"
8
- {-
9
- stackErrStderr ["build"] $ \str ->
10
- let msg = "SubLibrary dependency is not supported, this will almost certainly fail" in
5
+ -- This tests building two local packages, one of which depends on the other
6
+ -- (subproject). The dependency has a library and a visible sub-library named
7
+ -- sub, each of which exposes a module that exports a function.
11
8
12
- unless (msg `isInfixOf` str) $
13
- error $ "Expected a warning: \n" ++ show msg
14
- -}
9
+ main :: IO ()
10
+ -- The '--install-ghc' flag is passed here, because etc/scripts/release.hs
11
+ -- passes `--no-install-ghc` when `--alpine` is passed to its 'check' command.
12
+ -- (See stack.yaml; using GHC 9.4.4.)
13
+ main = stackErrStderr [" build" , " --install-ghc" ] $ \ str ->
14
+ let msg = " SubLibrary dependency is not supported, this will almost \
15
+ \certainly fail."
16
+ in unless (msg `isInfixOf` str) $
17
+ error $ " Expected a warning: \n " ++ show msg
Original file line number Diff line number Diff line change 1
- cabal-version : 3.0
1
+ cabal-version : 3.8
2
2
name : files
3
3
version : 0.1.0.0
4
4
build-type : Simple
Original file line number Diff line number Diff line change 1
- module Lib
1
+ module Lib
2
2
( someFunc
3
3
) where
4
4
5
+ import Subproject.Lib ( libFunc )
6
+ import Subproject.SubLib ( subLibFunc )
7
+
5
8
someFunc :: IO ()
6
- someFunc = putStrLn " someFunc"
9
+ someFunc = do
10
+ libFunc
11
+ subLibFunc
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- resolver : nightly-2020-01-17
1
+ resolver : nightly-2023-03-04 # GHC 9.4.4
2
2
packages :
3
3
- .
4
4
- subproject
5
- extra-deps :
6
- - github : snoyberg/filelock
7
- commit : 4f080496d8bf153fbe26e64d1f52cf73c7db25f6
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ module Subproject.Lib
2
+ ( libFunc
3
+ ) where
4
+
5
+ libFunc :: IO ()
6
+ libFunc = putStrLn " libFunc"
Original file line number Diff line number Diff line change
1
+ module Subproject.SubLib
2
+ ( subLibFunc
3
+ ) where
4
+
5
+ subLibFunc :: IO ()
6
+ subLibFunc = putStrLn " subLibFunc"
Original file line number Diff line number Diff line change
1
+ cabal-version : 3.8
1
2
name : subproject
2
3
version : 0.1.0.0
3
4
build-type : Simple
4
- cabal-version : >= 1.10
5
5
6
6
library
7
7
hs-source-dirs : src
8
- exposed-modules : Lib
8
+ exposed-modules : Subproject. Lib
9
9
build-depends : base >= 4.7 && < 5
10
10
default-language : Haskell2010
11
11
12
12
library sub
13
+ visibility : public
13
14
hs-source-dirs : src
14
- exposed-modules : SubLib
15
+ exposed-modules : Subproject. SubLib
15
16
build-depends : base >= 4.7 && < 5
16
17
default-language : Haskell2010
You can’t perform that action at this time.
0 commit comments