-
Notifications
You must be signed in to change notification settings - Fork 18k
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 does not rescan when using go generate #40661
Comments
Can you please share your |
|
I discovered gopls will update its database if you open the affected files in the editor. The affected files that are not opened do not get updated. |
@henryas: It looks like you didn't add the flags to increase the verbosity of your logs (https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#vs-code). Do you mind adding those flags and then providing new logs? Sorry about that! |
Sorry about that. It is my bad. Here we go. It is rather long, so I put it as an attachment. |
Thank you for sharing that! I think we may be registering for
Thank you for this report! I will try to reproduce this myself now. |
Change https://golang.org/cl/247684 mentions this issue: |
Just to keep track of these things -- I've filed microsoft/vscode#104387 as a result of this issue. |
This is a work-around for microsoft/vscode#104387. We now always lowercase the drive letter on Windows. This CL also fixes a bug introduced by CL 245327, which caused URIs to be used instead of paths in the GlobPattern. We really need VS Code integration tests for this (golang/vscode-go#404). Updates golang/go#40661 Change-Id: I21be6d929288cfe41168cea34001fc2f41ac6c8b Reviewed-on: https://go-review.googlesource.com/c/tools/+/247684 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
I think this should be fixed in |
What did you do?
I opened the project in vscode. I tested the intellisense to make sure that gopls properly recognize the packages in the project and it did. I call go generate to regenerate some new files using the "run go generate ./..." link at the top of the go generate instruction.
What did you expect to see?
The intellisense should recognize the new files and update its information.
What did you see instead?
The intellisense fails to recognize the new files. I have to close and restart the vscode in order to get gopls to rescan the project.
Build info
Go info
Gopls version
The text was updated successfully, but these errors were encountered: