haskell / haskell/cabal

Suppressing the "could not find link destinations" warning in cabal haddock

Open
#9,267 1 comment 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

On Windows, `cabal haddock` has trouble linking the result to other packages. Including base. (Side note - I'm really bummed that being a Haskell hobbyist on Windows is becoming more and more inconvenient.)

I have described my issue in this [reddit post](https://www.reddit.com/r/haskell/comments/15sn45s/how_to_make_haddock_documentation_link_to/). I've tried tweaking the global and user-specific and project-specific cabal configuration files to help cabal find the other packages but nothing has worked yet.

I'm aware that it's a purely cosmetic issue and the package is actually fine to upload. But for a larger project, the warning gets quite lengthy.

Someone who understands Haskell better than I do explained that it doesn't seem to be a cabal issue but a Windows-specific ghcup issue. But it would be much easier to solve it on cabal's side by giving the user an option of sweeping this specific warning under the rug. Something like `cabal haddock --no-warning-for-failed-links`. It would actually have to suppress two warnings at the same time ("The documentation for the following packages are not installed. No links will be generated" and "could not find link destinations").

This issue seems simple enough that I could probably take it on. I'd like some feedback.

- Are there any alternative, better solutions that I haven't considered?
- In your opinion, would this feature be ok to implement and does it have a chance of getting merged?
- Is it OK to suppress two "different" warnings (which actually have the same root cause) with a single flag?
- What would be a good name for the new flag?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.