-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: add regtests for adding/deleting files #38407
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
I'm not able to reproduce this - this is the error I see: What directory did you have open when you saw this? It's possible that if the file wasn't in the directory at the root of your workspace, then If you still have the full logs for this, those would be helpful to see. |
Hey @stamblerre, thanks for the quick response! I'm not quite up on the lingo for what a VSCode Workspace means, but here's my project's directory structure. I opened it with
The file with the syntax error is I'm sadly not able to reproduce this issue reliably and I don't have the logs anymore. If I open VSCode fresh, it does properly show the error: What I can say is that over time, as I'm adding and deleting files, it eventually stops reporting. It sounds like 0.5.0 might provide a solution for this issue? 😬🙏 Also let me know if you need more from me or if you already know what the issue is. I can try and create a better reproduction. |
Ah, ok so then it looks like your workspace is configured correctly and the diagnostics should be propagating. In the future when this happens, I'd suggest capturing detailed The process of cache invalidations after adding and deleting files is not perfect yet, so it's likely that that was the cause. I will be adding more integration tests soon, so I'll retitle this issue to make sure I add a few cases for adding and deleting files. |
Okay sounds good. Do I also need to enable trace logs or is the default log output detailed enough? |
You'll want to add the |
Note to self: Another case to add a regression test for is microsoft/vscode-go#3179 (comment). |
Closing since I this appears to be addressed 🙌 |
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?
I created a broken Go program 😬
https://play.golang.org/p/AGtHpgFoOts
What did you expect to see?
Proper syntax highlighting where I made my mistake.
In this case,
func (*u Up) Run
should befunc (u *Up) Run
What did you see instead?
Nada. Nothing. Formatting fails, but that's about it.
If I go into the gopls logs on VSCode, I see the following:
The text was updated successfully, but these errors were encountered: