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: find references from the module cache does not return an implementation in the workspace #47660
Comments
Thanks for filing this issue, but unfortunately, I am not able to reproduce it using your sample repo, as it only contains one file. I'm also not totally sure I understand the issue here. Can you please explain it a bit further? |
But tkestack/tke realy has references, look this: |
Thanks for the clarification. In this instance, "Find all implementations" does have the reference, but find references doesn't. This is not a high priority issue, but we'll investigate it when possible. Transferring to |
For gopls, should be higher priority. Because it reduces development efficiency. @stamblerre |
The core problem is open tkestack,"Find all implementations" is work. But open tkestack from the dependent module, "Find all implementations" is not work. Maybe you understand to "Find all implementations" and "Find implementations" results are different? |
When I tried to reproduce it, "Find all implementations" seemed to work correctly in both directions. From your video, it seems like the issue was "Find references", which does work slightly differently and was only recently adjusted to include implementations. |
@stamblerre I always use "Find all implementations", not "Find references". my plugin settings is
|
In your video above, it seems like you use "Find references" to illustrate the problem. I agree that the issue is with Find references (as you demonstrate by using the |
@stamblerre |
@pavlelee: Can you please give concrete steps for how to reproduce this in your sample repo? It's not clear to me exactly what the issue is, and it seems like you edited your sample repo recently. |
@stamblerre This is just a representative example. My real project cannot be made public |
@stamblerre any response? |
It sounds like you are expecting find references to return results within the module cache, since |
I believe this is working as intended, so I don't think that there is an issue here. |
I agree with you that this is not a problem, it should be an enhancement. Goland has supported it for a long time. Another solution is to use Extension Authoring adds the module cache to the workspace. |
I would recommend adding the module cache to your workspace, if you need it to be in there. We don't have any plans to support this in I'm going to close this issue, as it is working as intended. |
This PR is also closed, golang/tools#338 |
Yes, as I mentioned above, we will not support adding the module cache to the workspace in |
For asking questions, see:
#vscode
channel in Gophers SlackBefore filing an issue, please review our troubleshooting guides
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Go from the VS Code integrated terminal.go version go1.16.7 linux/amd64
Run
gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.3.11.1 c680aae973d83583e4a73dc0c422f44021f0140e
v0.27.0
Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) >
Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
vscode-go can't find all references in dependent modules, in my project to find all references of dependent module function, not found references.
But open dependent module in vscode, find one references
Steps to reproduce the behavior:
Screenshots or recordings
The text was updated successfully, but these errors were encountered: