File tree Expand file tree Collapse file tree 6 files changed +55
-2
lines changed
Cabal/src/Distribution/Simple
cabal-testsuite/PackageTests/HaddockEmptyLib Expand file tree Collapse file tree 6 files changed +55
-2
lines changed Original file line number Diff line number Diff line change @@ -549,8 +549,8 @@ generalInstalledPackageInfo adjustRelIncDirs pkg abi_hash lib lbi clbi installDi
549
549
, IPI. ldOptions = ldOptions bi
550
550
, IPI. frameworks = map getSymbolicPath $ frameworks bi
551
551
, IPI. frameworkDirs = map getSymbolicPath $ extraFrameworkDirs bi
552
- , IPI. haddockInterfaces = [haddockdir installDirs </> haddockLibraryPath pkg lib]
553
- , IPI. haddockHTMLs = [htmldir installDirs]
552
+ , IPI. haddockInterfaces = [haddockdir installDirs </> haddockLibraryPath pkg lib | hasModules ]
553
+ , IPI. haddockHTMLs = [htmldir installDirs | hasModules ]
554
554
, IPI. pkgRoot = Nothing
555
555
, IPI. libVisibility = libVisibility lib
556
556
}
Original file line number Diff line number Diff line change
1
+ name : emptyLib
2
+ Cabal-version : >= 1.2
3
+ version : 1.0
4
+ build-type : Simple
5
+
6
+ Library
Original file line number Diff line number Diff line change
1
+ # Setup configure
2
+ Configuring emptyLib-1.0...
3
+ # Setup build
4
+ Preprocessing library for emptyLib-1.0...
5
+ Building library for emptyLib-1.0...
6
+ # Setup haddock
7
+ Preprocessing library for emptyLib-1.0...
8
+ Running Haddock on library for emptyLib-1.0...
9
+ Warning: Haddocks are being requested, but there aren't any modules given to create documentation for.
10
+ # Setup copy
11
+ Installing library in <PATH>
12
+ # Setup register
13
+ Registering library for emptyLib-1.0...
Original file line number Diff line number Diff line change
1
+ # Setup configure
2
+ Configuring emptyLib-1.0...
3
+ # Setup build
4
+ Preprocessing library for emptyLib-1.0...
5
+ Building library for emptyLib-1.0...
6
+ # Setup haddock
7
+ Preprocessing library for emptyLib-1.0...
8
+ Running Haddock on library for emptyLib-1.0...
9
+ Warning: Haddocks are being requested, but there aren't any modules given to create documentation for.
10
+ # Setup copy
11
+ Installing library in <PATH>
12
+ # Setup register
13
+ Registering library for emptyLib-1.0...
Original file line number Diff line number Diff line change
1
+ import Test.Cabal.Prelude
2
+ -- Test install when the library is empty, for #9997
3
+ main = setupAndCabalTest $
4
+ withPackageDb $
5
+ withDirectory " empty" $
6
+ setup_install_with_docs []
Original file line number Diff line number Diff line change
1
+ synopsis: Suppress ghc-pkg warnings emitted when an empty packages is being registered
2
+ packages: Cabal
3
+ prs: #9997
4
+
5
+ description: {
6
+
7
+ When a package contains a library that has no modules, `./Setup register`
8
+ tries to register the library with fields `haddock-interfaces:` and
9
+ `haddock-html:` pointing at non-existent files or directories, and `ghc-pkg
10
+ register` warns about them.
11
+
12
+ To suppress the warnings prevent these fields from being generated when
13
+ there are no modules.
14
+
15
+ }
You can’t perform that action at this time.
0 commit comments