-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: log errors during gopls check
#35564
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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. |
The trouble is the nature of diagnostics in the LSP.
|
In |
Yeah, that is kind of what I was thinking when I said some kind of signal, but I know there was also a proposal and some work on adding background task and progress monitoring to the LSP spec, if those have arrived (or are likely to in the future) we could do something cleaner than just trying to recognize a log message |
Yeah, there's definitely support for in-progress replies for the majority of the requests, but I think for diagnostics there isn't anything like that (yet). |
gopls check
gopls check
gopls check
So, to summarize this issue, we need 2 key fixes for
@ianthehat is going to take a look at implementing these fixes. |
We are now relying on the fact that the diagnostics will come for file version 1 to determine when diagnostics are done being sent. The remaining work would be make sure that logged errors are shown to the user. |
gopls check
gopls check
It's worse than that. If there are just Errors, they are eaten by something and never seen by the loop checking for file diagnostics. Thinking... |
I just tried running |
What did you do?
Trigger a simple error in
gopls
, for example by settingGOROOT
to an invalid path:What did you expect to see?
gopls
should immediately exit after printing the error.What did you see instead?
gopls
hangs for 30s after printing the error, then printsgopls: timed out waiting for results from ...
I suspect the same thing is happening with the 30s delay in #35520
Build info
Go info
The text was updated successfully, but these errors were encountered: