Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/gopls: context cancellation errors in type-checking #33678
Please answer these questions before submitting your issue. Thanks!
What did you do?
Edit my code normally, adding functions, imports, etc.
What did you expect to see?
Completion, diagnostics, etc, continue to work.
What did you see instead?
After a few edits, I'm stuck with "work queue is full" and am forced to reload the editor.
This is an issue I just introduced with CL 185438. I'm in the process of some pretty large changes, so things may be a bit unstable on master right now. That said, it seems like what's happening here is that we are propagating context cancellation errors from type-checking. I'll try to investigate this a bit further.
Maybe the CL you mentioned reintroduced the problem where we cache the context.Canceled error in the package cache and it gets stuck that way indefinitely. Can we make it never cache the package on type checker errors like before?
Also, it seems like https://go-review.googlesource.com/c/tools/+/190412 maybe have broken some spots checking explicitly for the context.Canceled error. Perhaps we should use the "%w" error wrapping verb and the checking code should use