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/internal/lsp/source: different hover for same type #47098
Comments
Thank you for the repro. I believe this is the same as #46158, but I am investigating. |
Duplicate of #46158 |
Hi @findleyr, thank you for the fix, it seems there is still an edge case not covered. Another reproduce: version:
steps:
|
Thanks very much for the repro. |
Just looked into this. The debug struct is a real edge case: it is a var with a large struct literal type. For vars we use So I think the original issue is fixed, and we are unlikely to spend engineering time addressing this particular edge case. Closing so that this issue doesn't stagnate. |
Thank you Robert for the investigation, the edge case doesn't miss type information and gopls needs improvement in other more important aspects, so it doesn't deserve if needs too much time. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Version of gopls:
Editor: VSCode
Reproducing steps:
/usr/local/go/src/runtime/panic.go
in VSCode._panic
in following code.go/src/runtime/panic.go
Line 871 in 7677616
_panic
in another line.go/src/runtime/panic.go
Line 916 in 7677616
What did you expect to see?
step 3 give the same output as step 2.
What did you see instead?
step 2 gives:
step 3 gives:
Appendix
// step 2
// step 3
HoverIdentifier
returned differentHoverInformation
.But the source hasn't been changed for a long time. Is it feature or I need some extra options for gopls?
https://github.com/golang/tools/blob/55cd4804dfa0984a27cd61589b7f56f937e05545/internal/lsp/source/hover.go#L66-L71
// step 2
// step3
The text was updated successfully, but these errors were encountered: