1 import Test
.Cabal
.Prelude
2 -- See #4332, dep solving output is not deterministic
3 main
= cabalTest
. recordMode DoNotRecord
$ withRepo
"repo" $ do
4 -- other-lib is a dependency of b, but it's not listed in cabal.project
5 res
<- fails
$ cabal
' "v2-build" ["all", "--dry-run", "--reject-unconstrained-dependencies", "all", "--constraint", "some-exe -any"]
6 assertOutputContains
"not a user-provided goal" res
8 -- and some-exe is a build-tool dependency of b, again not listed
9 res
<- fails
$ cabal
' "v2-build" ["all", "--dry-run", "--reject-unconstrained-dependencies", "all", "--constraint", "other-lib -any"]
10 assertOutputContains
"not a user-provided goal" res
12 -- everything's listed, good to go
13 cabal
"v2-build" ["all", "--dry-run", "--reject-unconstrained-dependencies", "all", "--constraint", "other-lib -any", "--constraint", "some-exe -any"]
15 -- a depends on b, but b is a local dependency, so it gets a pass
16 cabal
"v2-build" ["a", "--dry-run", "--reject-unconstrained-dependencies", "all", "--constraint", "other-lib -any", "--constraint", "some-exe -any"]