haskell / haskell/cabal

cabal v2-haddock --haddock-for-hackage does not generate hyperlinks to subprojects in the same source tree

Open
#7,068 2 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/haddock type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
I am invoking `v2-haddock` in a haskell repository with multiple subprojects and a `cabal.project` file. In this project are haskell packages `A` and `B` and `B` depends on `A`. Then the types in `A` are not correctly hyperlinked from `B`.

**To Reproduce**
```
git clone https://github.com/cohomology/gi-cairo-render
cd gi-cairo-render
cabal v2-haddock all --builddir=docs --haddock-for-hackage --enable-doc
```
I get the following warning:
```
Warning: GI.Cairo.Render.Connector: could not find link destinations for:
Render
```
Render is defined in `GI.Cairo.Render` included in the same git repository.

When I copy the subdirectory `gi-cairo-connector` out of the repository to somewhere else and invoke the command only for `gi-cairo-connector`, the link is generated correctly.

I have:
```
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure in the gi-cairo-render repository with cabal v2-haddock all --builddir=docs --haddock-for-hackage --enable-doc, then compare it with running the command only in gi-cairo-connector. Read the cabal.project setup and the v2-haddock handling for packages in one source tree; done means B's generated documentation links Render from A without the warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.