-
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
64 additions
and
4 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
31 changes: 31 additions & 0 deletions
31
cabal-testsuite/PackageTests/DefaultPackageBounds/cabal.out
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,31 @@ | ||
# 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: time (dependency of foo) | ||
[__2] rejecting: time-<VERSION>/installed-<HASH> (conflict: foo *test => time<0) | ||
[__2] fail (backjumping, conflict set: foo, time, 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), time (2) | ||
# cabal check | ||
These warnings will likely cause trouble when distributing the package: | ||
Warning: No 'category' field. | ||
Warning: No 'maintainer' field. | ||
These warnings may cause trouble when distributing the package: | ||
Warning: library does not expose any modules | ||
Warning: On package-constraints, these packages miss upper bounds: | ||
- process | ||
Please add them. There is more information at https://pvp.haskell.org/ | ||
The following errors will cause portability problems on other environments: | ||
Error: No 'synopsis' or 'description' field. | ||
Error: The 'license' field is missing or is NONE. | ||
Error: Hackage would reject this package. |
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/DefaultPackageBounds/cabal.project
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: . |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/DefaultPackageBounds/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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ withProjectFile "cabal.project" $ do | ||
cabal "build" ["foo"] | ||
fails $ cabal "build" ["foo", "--enable-tests"] | ||
fails $ cabal "check" [] |
22 changes: 22 additions & 0 deletions
22
cabal-testsuite/PackageTests/DefaultPackageBounds/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,22 @@ | ||
cabal-version: 3.12 | ||
name: foo | ||
version: 0.1.0.0 | ||
|
||
default-package-bounds: | ||
-- time bound should not apply on lib, there is a specific bound defined, | ||
-- however it should prevent the @tests@ from building | ||
, time <0 | ||
-- deepseq bound should never apply, we don't depend on it | ||
, deepseq <0 | ||
-- check will report this missing upper bound | ||
, process | ||
|
||
library | ||
build-depends: | ||
time >1 | ||
default-language: Haskell2010 | ||
|
||
test-suite tests | ||
build-depends: time | ||
default-language: Haskell2010 | ||
main-is: Main.hs |