File tree Expand file tree Collapse file tree 12 files changed +37
-30
lines changed
cabal-testsuite/PackageTests/Regression/T3436 Expand file tree Collapse file tree 12 files changed +37
-30
lines changed Original file line number Diff line number Diff line change 1
1
name : Cabal
2
- version : 99998
2
+ version : 1.2
3
3
build-type : Simple
4
4
cabal-version : >= 1.2
5
5
Original file line number Diff line number Diff line change
1
+ module CabalMessage where
2
+
3
+ message = " This is Cabal-1.2"
Original file line number Diff line number Diff line change 1
1
name : Cabal
2
- version : 99999
2
+ version : 2.0
3
3
build-type : Simple
4
4
cabal-version : >= 1.2
5
5
Original file line number Diff line number Diff line change
1
+ module CabalMessage where
2
+
3
+ message = " This is Cabal-2.0"
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
Resolving dependencies...
3
3
Build profile: -w ghc-<GHCVER> -O1
4
4
In order, the following will be built:
5
- - Cabal-99999 (lib:Cabal) (first run)
5
+ - Cabal-2.0 (lib:Cabal) (first run)
6
6
- custom-setup-1.0 (lib:custom-setup) (first run)
7
- Configuring Cabal-99999 ...
8
- Preprocessing library for Cabal-99999 ..
9
- Building library for Cabal-99999 ..
7
+ Configuring Cabal-2.0 ...
8
+ Preprocessing library for Cabal-2.0 ..
9
+ Building library for Cabal-2.0 ..
Original file line number Diff line number Diff line change 1
- packages : custom-setup Cabal-99999
1
+ packages : custom-setup Cabal-2.0
Original file line number Diff line number Diff line change 1
1
import Test.Cabal.Prelude
2
2
main = cabalTest $ do
3
- -- NB: This test doesn't really test #3436, because Cabal-99998
3
+ -- NB: This test doesn't really test #3436, because Cabal-1.2
4
4
-- isn't in the system database and thus we can't see if the
5
5
-- depsolver incorrectly chooses it. Worth fixing if we figure
6
6
-- out how to simulate the "global" database without root.
7
7
r <- fails $ cabal' " new-build" [" custom-setup" ]
8
- assertOutputContains " This is Cabal-99999 " r
8
+ assertOutputContains " This is Cabal-2.0 " r
Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ version: 1.0
4
4
build-type : Custom
5
5
6
6
custom-setup
7
- setup-depends : base, Cabal >= 99999
7
+ setup-depends : base, Cabal >= 2.0
8
8
9
9
library
Original file line number Diff line number Diff line change @@ -3,19 +3,19 @@ Writing a default package environment file to <ROOT>/sandbox.dist/cabal.sandbox.
3
3
Creating a new sandbox at <ROOT>/sandbox.dist/sandbox
4
4
# cabal install
5
5
Resolving dependencies...
6
- Configuring Cabal-99998 ...
7
- Preprocessing library for Cabal-99998 ..
8
- Building library for Cabal-99998 ..
6
+ Configuring Cabal-1.2 ...
7
+ Preprocessing library for Cabal-1.2 ..
8
+ Building library for Cabal-1.2 ..
9
9
Installing library in <PATH>
10
- Installed Cabal-99998
10
+ Installed Cabal-1.2
11
11
# cabal sandbox add-source
12
12
# cabal install
13
13
Resolving dependencies...
14
- Configuring Cabal-99999 ...
15
- Preprocessing library for Cabal-99999 ..
16
- Building library for Cabal-99999 ..
14
+ Configuring Cabal-2.0 ...
15
+ Preprocessing library for Cabal-2.0 ..
16
+ Building library for Cabal-2.0 ..
17
17
Installing library in <PATH>
18
- Installed Cabal-99999
18
+ Installed Cabal-2.0
19
19
Failed to install custom-setup-1.0
20
20
cabal: Error: some packages failed to install:
21
21
custom-setup-1.0-92JpsxIMpiQHysxYdDtEVq failed during the configure step. The exception was:
Original file line number Diff line number Diff line change 1
1
import Test.Cabal.Prelude
2
2
3
3
-- Regression test for issue #3436
4
+ --
5
+ -- #3436 occurred when a package with a custom setup specified a 'cabal-version'
6
+ -- that was newer than the version of the installed Cabal library, even though
7
+ -- the solver didn't choose the installed Cabal for the package's setup script.
8
+ --
9
+ -- This test installs a fake Cabal-1.2 and then tries to build the package
10
+ -- custom-setup, which depends on a fake Cabal-2.0 (through cabal-version and
11
+ -- setup-depends).
4
12
main = cabalTest $ do
5
13
withSandbox $ do
6
- cabal " install" [" ./Cabal-99998 " ]
7
- cabal_sandbox " add-source" [" Cabal-99999 " ]
14
+ cabal " install" [" ./Cabal-1.2 " ]
15
+ cabal_sandbox " add-source" [" Cabal-2.0 " ]
8
16
9
- -- Install custom-setup, which has a setup dependency on Cabal-99999.
10
- -- cabal should build the setup script with Cabal-99999, but then
11
- -- configure should fail because Setup just prints an error message
17
+ -- cabal should build custom-setup's setup script with Cabal-2.0, but
18
+ -- then configure should fail because Setup just prints an error message
12
19
-- imported from Cabal and exits.
13
20
r <- fails $ cabal' " install" [" custom-setup/" ]
14
- assertOutputContains " This is Cabal-99999 " r
21
+ assertOutputContains " This is Cabal-2.0 " r
You can’t perform that action at this time.
0 commit comments