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

Comments

@pjweinb
Copy link

@pjweinb pjweinb commented Nov 13, 2020

at gopls tip (eeaa07dd), 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 this to the Unreleased milestone Nov 13, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Nov 13, 2020

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 pjweinb commented Nov 13, 2020

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Nov 13, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.