Skip to content

Commit 5d4b662

Browse files
Hack around haskell#5119 by disabling the warning.
Issue haskell#5119 is tracking spurious generation of these warnings. There are a lot of them! We can't release with so many false positives, so just squelch the warning outright. This is a hack and this commit should be reverted if we get a proper fix that can be backported to the 2.4 branch.
1 parent 618efe6 commit 5d4b662

File tree

9 files changed

+11
-37
lines changed

9 files changed

+11
-37
lines changed

Cabal/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# 2.4.0.0 (current development version)
2+
* Due to [#5119](https://github.com/haskell/cabal/issues/5119), the
3+
`cabal check` warning for bounds on internal libraries has been
4+
disabled.
25
* `Distribution.Simple.Haddock` now checks to ensure that it
36
does not erroneously call Haddock with no target modules.
47
([#5232](https://github.com/haskell/cabal/issues/5232),

Cabal/Distribution/PackageDescription/Check.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,10 @@ checkFields pkg =
531531
++ "for example 'tested-with: GHC==6.10.4, GHC==6.12.3' and not "
532532
++ "'tested-with: GHC==6.10.4 && ==6.12.3'."
533533

534-
, check (not (null depInternalLibraryWithExtraVersion)) $
534+
-- Disabled due to #5119: we generate loads of spurious instances of
535+
-- this warning. Re-enabling this check should be part of the fix to
536+
-- #5119.
537+
, check (False && not (null depInternalLibraryWithExtraVersion)) $
535538
PackageBuildWarning $
536539
"The package has an extraneous version range for a dependency on an "
537540
++ "internal library: "

cabal-testsuite/PackageTests/Backpack/Includes2/cabal-internal.out

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ Building library 'mylib' instantiated with
3434
Database = Includes2-0.1.0.0-inplace-postgresql:Database.PostgreSQL
3535
for Includes2-0.1.0.0..
3636
Configuring library for Includes2-0.1.0.0..
37-
Warning: The package has an extraneous version range for a dependency on an internal library: Includes2 -any && ==0.1.0.0 && ==0.1.0.0 && ==0.1.0.0. This version range includes the current package but isn't needed as the current package's library will always be used.
3837
Preprocessing library for Includes2-0.1.0.0..
3938
Building library for Includes2-0.1.0.0..
4039
Configuring executable 'exe' for Includes2-0.1.0.0..
41-
Warning: The package has an extraneous version range for a dependency on an internal library: Includes2 -any && ==0.1.0.0. This version range includes the current package but isn't needed as the current package's library will always be used.
4240
Preprocessing executable 'exe' for Includes2-0.1.0.0..
4341
Building executable 'exe' for Includes2-0.1.0.0..
4442
# Includes2 exe

cabal-testsuite/PackageTests/BuildTools/Internal/cabal.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ Configuring library for foo-0.1.0.0..
1212
Preprocessing library for foo-0.1.0.0..
1313
Building library for foo-0.1.0.0..
1414
Configuring executable 'hello-world' for foo-0.1.0.0..
15-
Warning: The package has an extraneous version range for a dependency on an internal library: foo -any && ==0.1.0.0. This version range includes the current package but isn't needed as the current package's library will always be used.
1615
Preprocessing executable 'hello-world' for foo-0.1.0.0..
1716
Building executable 'hello-world' for foo-0.1.0.0..
Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
11
# Setup configure
22
Resolving dependencies...
33
Configuring build-depends-extra-version-0.1.0.0...
4-
Warning: The package has an extraneous version range for a dependency on an internal library: build-depends-extra-version >=0.0.0.1. This version range includes the current package but isn't needed as the current package's library will always be used.
5-
# Setup sdist
6-
Distribution quality errors:
7-
The package has an extraneous version range for a dependency on an internal library: build-depends-extra-version >=0.0.0.1. This version range includes the current package but isn't needed as the current package's library will always be used.
8-
Distribution quality warnings:
9-
No 'maintainer' field.
10-
No 'description' field.
11-
A 'license-file' is not specified.
12-
Note: the public hackage server would reject this package.
13-
Building source dist for build-depends-extra-version-0.1.0.0...
14-
Preprocessing library for build-depends-extra-version-0.1.0.0..
15-
Preprocessing executable 'bar' for build-depends-extra-version-0.1.0.0..
16-
Source tarball created: setup.cabal.dist/work/dist/build-depends-extra-version-0.1.0.0.tar.gz
Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,2 @@
11
# Setup configure
22
Configuring build-depends-extra-version-0.1.0.0...
3-
Warning: The package has an extraneous version range for a dependency on an internal library: build-depends-extra-version >=0.0.0.1. This version range includes the current package but isn't needed as the current package's library will always be used.
4-
# Setup sdist
5-
Distribution quality errors:
6-
The package has an extraneous version range for a dependency on an internal library: build-depends-extra-version >=0.0.0.1. This version range includes the current package but isn't needed as the current package's library will always be used.
7-
Distribution quality warnings:
8-
No 'maintainer' field.
9-
No 'description' field.
10-
A 'license-file' is not specified.
11-
Note: the public hackage server would reject this package.
12-
Building source dist for build-depends-extra-version-0.1.0.0...
13-
Preprocessing library for build-depends-extra-version-0.1.0.0..
14-
Preprocessing executable 'bar' for build-depends-extra-version-0.1.0.0..
15-
Source tarball created: setup.dist/work/dist/build-depends-extra-version-0.1.0.0.tar.gz

cabal-testsuite/PackageTests/InternalVersions/BuildDependsExtra/setup.test.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ import Test.Cabal.Prelude
22
-- Test unneed version bound on internal build-tools deps
33
main = setupAndCabalTest $ do
44
setup' "configure" []
5-
assertOutputContains "extraneous version range"
6-
=<< setup' "sdist" []
5+
-- Hack alert: had to squelch this warning because of #5119.
6+
-- assertOutputContains "extraneous version range"
7+
-- =<< setup' "sdist" []
8+
return ()

cabal-testsuite/PackageTests/Regression/T5309/cabal.out

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Configuring executable 'exe-no-lib' for T5309-1.0.0.0..
1212
Preprocessing executable 'exe-no-lib' for T5309-1.0.0.0..
1313
Building executable 'exe-no-lib' for T5309-1.0.0.0..
1414
Configuring executable 'exe-with-lib' for T5309-1.0.0.0..
15-
Warning: The package has an extraneous version range for a dependency on an internal library: T5309 -any && ==1.0.0.0, T5309 -any && ==1.0.0.0, T5309 -any && ==1.0.0.0. This version range includes the current package but isn't needed as the current package's library will always be used.
1615
Preprocessing executable 'exe-with-lib' for T5309-1.0.0.0..
1716
Building executable 'exe-with-lib' for T5309-1.0.0.0..
1817
# cabal new-test
@@ -29,7 +28,6 @@ Test suite test-no-lib: PASS
2928
Test suite logged to: <ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/T5309-1.0.0.0/t/test-no-lib/test/T5309-1.0.0.0-test-no-lib.log
3029
1 of 1 test suites (1 of 1 test cases) passed.
3130
Configuring test suite 'test-with-lib' for T5309-1.0.0.0..
32-
Warning: The package has an extraneous version range for a dependency on an internal library: T5309 -any && ==1.0.0.0, T5309 -any && ==1.0.0.0, T5309 -any && ==1.0.0.0. This version range includes the current package but isn't needed as the current package's library will always be used.
3331
Preprocessing test suite 'test-with-lib' for T5309-1.0.0.0..
3432
Building test suite 'test-with-lib' for T5309-1.0.0.0..
3533
Running 1 test suites...
@@ -49,7 +47,6 @@ Running 1 benchmarks...
4947
Benchmark bench-no-lib: RUNNING...
5048
Benchmark bench-no-lib: FINISH
5149
Configuring benchmark 'bench-with-lib' for T5309-1.0.0.0..
52-
Warning: The package has an extraneous version range for a dependency on an internal library: T5309 -any && ==1.0.0.0, T5309 -any && ==1.0.0.0, T5309 -any && ==1.0.0.0. This version range includes the current package but isn't needed as the current package's library will always be used.
5350
Preprocessing benchmark 'bench-with-lib' for T5309-1.0.0.0..
5451
Building benchmark 'bench-with-lib' for T5309-1.0.0.0..
5552
Running 1 benchmarks...

cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/cabal.out

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Configuring library for my-0.1..
99
Preprocessing library for my-0.1..
1010
Building library for my-0.1..
1111
Configuring test suite 'test-Short' for my-0.1..
12-
Warning: The package has an extraneous version range for a dependency on an internal library: my -any && ==0.1, my -any && ==0.1. This version range includes the current package but isn't needed as the current package's library will always be used.
1312
Preprocessing test suite 'test-Short' for my-0.1..
1413
Building test suite 'test-Short' for my-0.1..
1514
Running 1 test suites...
@@ -18,7 +17,6 @@ Test suite test-Short: PASS
1817
Test suite logged to: <ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/my-0.1/t/test-Short/test/my-0.1-test-Short.log
1918
1 of 1 test suites (1 of 1 test cases) passed.
2019
Configuring test suite 'test-Foo' for my-0.1..
21-
Warning: The package has an extraneous version range for a dependency on an internal library: my -any && ==0.1, my -any && ==0.1. This version range includes the current package but isn't needed as the current package's library will always be used.
2220
Preprocessing test suite 'test-Foo' for my-0.1..
2321
Building test suite 'test-Foo' for my-0.1..
2422
Running 1 test suites...

0 commit comments

Comments
 (0)