Skip to content
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: gopls fails to find a type definition #42585

Closed
pjweinb opened this issue Nov 13, 2020 · 3 comments
Closed

x/tools/gopls: gopls fails to find a type definition #42585

pjweinb opened this issue Nov 13, 2020 · 3 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@pjweinb
Copy link

pjweinb commented Nov 13, 2020

at gopls tip (eeaa07d), using vscode-insiders, open the x/tools repository
open internal/lsp/debug/serve.go
go to line 259: 'return i.State.View(path.Base(r.URL.Path))'
hover over 'View' (it says that View() returns a *cache.View)
Ask for the type definition. (It says "No type definition found for 'View'")

The type definition is found in internal/lsp/cache/view.go

Both these files are in the same module (tools/go.mod)

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 13, 2020
@gopherbot gopherbot added this to the Unreleased milestone Nov 13, 2020
@stamblerre
Copy link
Contributor

We don't offer type definitions for functions--"Go to definition" should still work though. I think #38589 might be relevant here?

@pjweinb
Copy link
Author

pjweinb commented Nov 13, 2020 via email

@stamblerre
Copy link
Contributor

Ok, I'll add your comment to #38589, since this issue I think is a duplicate of that one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants