-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/tools/gopls: empty hover response should be null, not a zero struct #37570
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
Aha, so this only happens when I've set cc @findleyr |
Thanks for the report! Just so I understand: is the problem just the hover serialization, or are you also not getting hover results when you'd expect them? |
I believe it's only under cases where gopls would have been sending a nil hover. Other hovers are fine. It just seems like nil hovers are being converted to empty on forward. |
Thanks, that seems like a perfectly plausible bug -- I'll look into it. |
Change https://golang.org/cl/222058 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What did you do?
Hovered over a keyword, like
package
orfunc
.What did you expect to see?
No hover, as it's not really helpful.
What did you see instead?
No hover, but my client (VS Code) reports that the markup content kind is unsupported.
The logs for the hover above say:
So
gopls
is sending a zero'd hover response rather than nil/null. There might be other conditions where a zero hover is returned, but hovering over a keyword is the easiest method to reproduce this.Build info
Go info
The text was updated successfully, but these errors were encountered: