-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress ghc-pkg warnings emitted when an empty packages is being reg…
…istered When a package contains a library that has no modules, "./Setup register" tries to register the library with fields "haddock-interfaces:" and "haddock-html:" pointing at non-existent files or directories, and "ghc-pkg register" warns about them. To suppress the warnings prevent these fields from being generated when there are no modules.
- Loading branch information
1 parent
04db7d0
commit eff7bf8
Showing
6 changed files
with
55 additions
and
2 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
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/HaddockEmptyLib/empty/empty.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,6 @@ | ||
name: emptyLib | ||
Cabal-version: >= 1.2 | ||
version: 1.0 | ||
build-type: Simple | ||
|
||
Library |
13 changes: 13 additions & 0 deletions
13
cabal-testsuite/PackageTests/HaddockEmptyLib/setup.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,13 @@ | ||
# Setup configure | ||
Configuring emptyLib-1.0... | ||
# Setup build | ||
Preprocessing library for emptyLib-1.0... | ||
Building library for emptyLib-1.0... | ||
# Setup haddock | ||
Preprocessing library for emptyLib-1.0... | ||
Running Haddock on library for emptyLib-1.0... | ||
Warning: Haddocks are being requested, but there aren't any modules given to create documentation for. | ||
# Setup copy | ||
Installing library in <PATH> | ||
# Setup register | ||
Registering library for emptyLib-1.0... |
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,13 @@ | ||
# Setup configure | ||
Configuring emptyLib-1.0... | ||
# Setup build | ||
Preprocessing library for emptyLib-1.0... | ||
Building library for emptyLib-1.0... | ||
# Setup haddock | ||
Preprocessing library for emptyLib-1.0... | ||
Running Haddock on library for emptyLib-1.0... | ||
Warning: Haddocks are being requested, but there aren't any modules given to create documentation for. | ||
# Setup copy | ||
Installing library in <PATH> | ||
# Setup register | ||
Registering library for emptyLib-1.0... |
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 | ||
-- Test install when the library is empty, for #9997 | ||
main = setupAndCabalTest $ | ||
withPackageDb $ | ||
withDirectory "empty" $ | ||
setup_install_with_docs [] |
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,15 @@ | ||
synopsis: Suppress ghc-pkg warnings emitted when an empty packages is being registered | ||
packages: Cabal | ||
prs: #9997 | ||
|
||
description: { | ||
|
||
When a package contains a library that has no modules, `./Setup register` | ||
tries to register the library with fields `haddock-interfaces:` and | ||
`haddock-html:` pointing at non-existent files or directories, and `ghc-pkg | ||
register` warns about them. | ||
|
||
To suppress the warnings prevent these fields from being generated when | ||
there are no modules. | ||
|
||
} |