-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
ghc8107-ghc923: patch haddock to generate correct source links #177948
ghc8107-ghc923: patch haddock to generate correct source links #177948
Conversation
Previously links to external modules were jacked because haddock was doing them wrong. I fixed this upstream in early May 2022 but it's not out yet.
@lf- We talked a little about this in the Nix-Haskell matrix room, and there was some reluctance to apply a patch that hasn't been released upstream yet for an issue that is non-critical. Could you explain exactly what this is fixing (along with screenshots and examples if possible)? It is hard to argue to merge this in without a simple explanation to judge the usefulness. |
Thanks for the feedback. Here is an example of the issue it fixes (package picked because it has few deps):
Then click on "Eq" in one of the constraints. The link will not resolve correctly without the patch, because haddock was generating urls like I fixed the URL generation bug above with this patch. There are still other remaining hyperlinking bugs in Haddock, for instance haskell/haddock#1498, but I think the bug this patch fixes is one of the bugs most hampering the usefulness of the hyperlinked sources feature (besides base not having hyperlinked sources, which is now fixed). It's totally fine if it's not worth patching nixpkgs to fix this, but it significantly hampers the usefulness of the source hyperlinking feature that very many of the links are broken. |
I've taken a look at the current source docs, and I've confirmed that it is quite annoying to work with the hyperlinked sources, since the links don't work. This PR does appear to fix things and make the hyperlinked sources quite useful. @lf- We're somewhat reluctant to merge this PR, since we don't want to get into the habit of carrying around a large number of patches on top of GHC here in Nixpkgs, especially for non-critical functionality like this that hasn't been released yet upstream. However, this does seem like it would be a nice fix, and it is arguably fixing a current bug. We'd like to merge this PR, but on the condition that you watch the
|
Sure, I'll check it in the morning when I get into work for the next week or so. For what it's worth, we applied this in a large Yesod codebase with lots of deps at my employer about a week ago and there was no build breakage. |
Thanks. Here's the evaluation with the change from this PR: https://hydra.nixos.org/eval/1769156 Here's the parent evaluation that doesn't contain the change from this PR: https://hydra.nixos.org/eval/1769150 You should hopefully be able to compare these for any differences. These have both been taken from https://hydra.nixos.org/jobset/nixpkgs/haskell-updates. |
Previously links to external modules were jacked because haddock was
doing them wrong. I fixed this upstream in early May 2022 but it's not
out yet.
PR link haskell/haddock#1482
This would go very nicely with #177938, as the hyperlinked sources are much more useful when the hyperlinks work.
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
) I tested ghc923 and it works great but didn't have time to test the othersnixos/doc/manual/md-to-db.sh
to update generated release notes