-
Notifications
You must be signed in to change notification settings - Fork 90
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
Clicking "Source" to open haddock source on hackage opens invalid URL #520
Comments
This seems to be problem in vscode-haskell, which is replacing vscode-haskell/src/docsBrowser.ts Lines 160 to 163 in 7eb6a48
The logic replacing -s with .s was introduced in this PR: #452 |
Yeah, thanks for the report and the further investigation, moving to the extension repo |
For reference here's a related upstream issue in haddock : haskell/haddock#1447 In more recent versions of haddock, the hyperlinked source code files contain I'm not sure what's the best way to fix this - someone COULD go and fix the haddock logic upstream so it always uses '.' as separator. But then you'd still have tons of haddocks generated on hackage which still use '-' as separator, for which the link would still be broken. Another option would be to fix the typescript logic in vscode-haskell - but since it doesn't know what version of haddock was used to generate the docs, it doesn't know whether it should use '-' or '.'. Not sure how this could be improved :( |
Thanks for the investigation here @jhrcek. My recommendation would be the extension should either:
|
Might be worthwhile instead grabbing the URLs that HLS already produces: haskell/haskell-language-server#3475 (comment) |
Your environment
Which OS do you use:
Linux, fedora 34
Which lsp-client do you use:
Vscode
Describe your project (alternative: link to the project):
stack based project
Steps to reproduce
See steps gif:
Expected behaviour
Correct page is opened on hackage
https://hackage.haskell.org/package/base-4.14.3.0/docs/src/Data-Foldable.html#concatMap
Actual behaviour
Invalid URL is opened on hackage
https://hackage.haskell.org/package/base-4.14.3.0/docs/src/Data.Foldable.html#concatMap
` ^ It should be Data-Foldable, not Data.Foldable
Include debug information
Execute in the root of your project the command
haskell-language-server-wrapper --debug .
and paste the logs here:(if you are using the vscode extension check the executable location here)
Debug output:
Paste the logs from the lsp-client, you can check instructions about for VS Code here
LSP logs:
The text was updated successfully, but these errors were encountered: