Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal-install haddock-project includes sub-libraries with visibility: hidden #10157

Open
recursion-ninja opened this issue Jun 27, 2024 · 0 comments

Comments

@recursion-ninja
Copy link
Contributor

Describe the bug
The cabal haddock-project produces, as part of it's indexed output, sub-libraries which ought to be omitted due to being annotated as visibility: hidden in the package description $pkg.cabal file.

To Reproduce
Steps to reproduce the behavior:

$ git clone https://github.com/recursion-ninja/includes-hidden-sublibraries
$ cd includes-hidden-sublibraries
$ cabal haddock-project
$ grep Lib2 haddocks/index.html

Expected behavior
The contents of haddocks/index.html should not include Lib2 because includes-hidden-sublibraries.cabal specifies that lib2 is not a public facing library via the visibility: private build field.

The grep command in the example above should produce no output because Lib2 was not included in the generated Haddock documentation.

System information

  • MacOS

  • Cabal

$ cabal --version
cabal-install version 3.10.3.0
  • GHC
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.10.1
  • Haddock
$ haddock --version
Haddock version 2.28.0, (c) Simon Marlow 2006
Ported to use the GHC API by David Waern 2006-2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant