-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Main where | ||
|
||
main :: IO () | ||
main = pure () |
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,18 @@ | ||
# cabal build | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- foo-0.1.0.0 (lib) (first run) | ||
Configuring library for foo-0.1.0.0... | ||
Preprocessing library for foo-0.1.0.0... | ||
Building library for foo-0.1.0.0... | ||
# cabal build | ||
Resolving dependencies... | ||
Error: [Cabal-7107] | ||
Could not resolve dependencies: | ||
[__0] trying: foo-0.1.0.0 (user goal) | ||
[__1] trying: foo:*test | ||
[__2] next goal: base (dependency of foo) | ||
[__2] rejecting: base-<VERSION>/installed-<HASH> (conflict: foo *test => base<0) | ||
[__2] fail (backjumping, conflict set: base, foo, foo:test) | ||
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: foo (4), foo:test (3), base (2) |
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 @@ | ||
packages: foo |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/DefaultConstraints/cabal.test.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 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ withProjectFile "cabal.project" $ do | ||
cabal "build" ["foo"] | ||
fails $ cabal "build" ["foo", "--enable-tests"] |
18 changes: 18 additions & 0 deletions
18
cabal-testsuite/PackageTests/DefaultConstraints/foo/foo.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,18 @@ | ||
cabal-version: 3.11 | ||
name: foo | ||
version: 0.1.0.0 | ||
|
||
default-constraints: | ||
, base ^>=4.18.1.0 | ||
|
||
library | ||
build-depends: base | ||
default-language: Haskell2010 | ||
|
||
test-suite foo-test | ||
default-language: Haskell2010 | ||
type: exitcode-stdio-1.0 | ||
main-is: Main.hs | ||
build-depends: | ||
base <0, | ||
blah |