Skip to content

haddock-project --local does not copy non-boot dependencies to output dir #8958

Closed
@amesgen

Description

@amesgen

Describe the bug
At least the blog post indicates that all dependencies (not just boot deps) should be supported:

This command will build ./haddocks directory which you can serve with a http server. It will contain documentation of all the local packages and its dependencies. You can even control which dependencies should be included via documentation option.

The code has a similar comment:

-- Build a self contained directory which contains haddocks of all
-- transitive dependencies; or depend on `--haddocks-html-location` to
-- provide location of the documentation of dependencies.

To Reproduce
https://github.com/amesgen/stuff/tree/cabal-haddock-project-deps

 $ git clone https://github.com/amesgen/stuff --single-branch --branch cabal-haddock-project-deps
 $ cd stuff
 $ cabal haddock-project --local
 $ ls haddocks/
array  containers  doc-index.html  exceptions  ghc-boot-th  haddock-bundle.min.js  linuwial.css  pretty          quick-jump.min.js  stuff         template-haskell
base   deepseq     doc-index.json  ghc-bignum  ghc-prim     index.html             mtl           quick-jump.css  stm                synopsis.png  transformers

Note that resourcet (a dependency of the test project) is not present.

Expected behavior
I would expect all dependencies to be copied to the output, or alternatively an indication in the documentation that it only works for boot deps.

System information

  • NixOS, x86_64-linux
  • cabal 3.10.1.0, ghc 9.4.5

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions