Skip to content

Commit e9feef8

Browse files
committed
Add VersionEqualitiesInPackages test
1 parent 1c9f4e9 commit e9feef8

8 files changed

Lines changed: 92 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cabal-version: 2.2
2+
name: a
3+
version: 0
4+
5+
library
6+
build-depends:
7+
some-lib ==1.0,
8+
b ==0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
cabal-version: 2.2
2+
name: b
3+
version: 0
4+
5+
library
6+
build-tool-depends:
7+
some-exe:some-exe ==1.0
8+
build-depends:
9+
some-lib ==1.0,
10+
other-lib ==1.0
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# cabal v2-update
2+
Downloading the latest package list from test-local-repo
3+
# cabal build
4+
Resolving dependencies...
5+
Build profile: -w ghc-<GHCVER> -O1
6+
In order, the following would be built:
7+
- other-lib-1.0 (lib) (requires build)
8+
- some-exe-1.0 (exe:some-exe) (requires build)
9+
- some-lib-1.0 (lib) (requires build)
10+
- b-0 (lib) (first run)
11+
- a-0 (lib) (first run)
12+
# cabal build
13+
Resolving dependencies...
14+
Build profile: -w ghc-<GHCVER> -O1
15+
In order, the following would be built:
16+
- other-lib-1.0 (lib) (requires build)
17+
- some-exe-1.0 (exe:some-exe) (requires build)
18+
- some-lib-1.0 (lib) (requires build)
19+
- b-0 (lib) (first run)
20+
- a-0 (lib) (first run)
21+
# cabal build
22+
Resolving dependencies...
23+
Build profile: -w ghc-<GHCVER> -O1
24+
In order, the following would be built:
25+
- other-lib-1.0 (lib) (requires build)
26+
- some-exe-1.0 (exe:some-exe) (requires build)
27+
- some-lib-1.0 (lib) (requires build)
28+
- b-0 (lib) (first run)
29+
- a-0 (lib) (first run)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
packages:
2+
./a
3+
./b
4+
5+
constraints:
6+
some-lib ==1.0
7+
, other-lib ==1.0
8+
, some-exe ==1.0
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Test.Cabal.Prelude
2+
3+
4+
main = do
5+
skipIfOSX "macOS has a different solver output format"
6+
-- - - other-lib-1.0 (lib) (requires build)
7+
-- - - some-exe-1.0 (exe:some-exe) (requires build)
8+
-- - some-lib-1.0 (lib) (requires build)
9+
-- + - some-exe-1.0 (exe:some-exe) (requires build)
10+
-- + - other-lib-1.0 (lib) (requires build)
11+
-- - b-0 (lib) (first run)
12+
-- - a-0 (lib) (first run)
13+
cabalTest . withRepo "repo" $ do
14+
let opts = [ "all", "--dry-run" ]
15+
cabal "build" $ opts
16+
cabal "build" $ "--reject-unconstrained-dependencies=all" : opts
17+
cabal "build" $ "--reject-unconstrained-dependencies=eq" : opts
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cabal-version: 2.2
2+
name: other-lib
3+
version: 1.0
4+
5+
library
6+
exposed-modules:
7+
Foo
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cabal-version: 2.2
2+
name: some-exe
3+
version: 1.0
4+
5+
executable some-exe
6+
main-is: Foo.hs
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cabal-version: 2.2
2+
name: some-lib
3+
version: 1.0
4+
5+
library
6+
exposed-modules:
7+
Foo

0 commit comments

Comments
 (0)