Skip to content

Commit 0bac9de

Browse files
committed
(cabal check) Add “Internal library” test
On impossible version ranges for internal libraries.
1 parent 67d54b9 commit 0bac9de

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# cabal check
2+
Warning: The package will not build sanely due to these errors:
3+
Warning: The package has an impossible version range for a dependency on an internal library: pkg:internal >1.0. This version range does not include the current package, and must be removed as the current package's library will always be used.
4+
Warning: Hackage would reject this package.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Test.Cabal.Prelude
2+
3+
-- Impossible version range for internal library.
4+
main = cabalTest $
5+
fails $ cabal "check" []
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cabal-version: 3.0
2+
name: pkg
3+
synopsis: synopsis
4+
description: description
5+
version: 0
6+
category: example
7+
maintainer: [email protected]
8+
license: GPL-3.0-or-later
9+
10+
library
11+
exposed-modules: Module
12+
build-depends: base == 4.*,
13+
internal > 1.0
14+
default-language: Haskell2010
15+
16+
library internal
17+
exposed-modules: Module
18+
default-language: Haskell2010

0 commit comments

Comments
 (0)