x/tools/gopls: support cancellation #35433
Closed
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
internal/memoize
package leaves the generator running if a context was canceled. This means that when a user is typing quickly, we can build up a lot of type-checking and analysis runs. We also don't want to return acontext.Canceled
inside of the generator, to avoid caching that error. I think that we should add support for canceling the generator to avoid this issue.We should also consider whether or not
packages.Load
should take a context. On one hand, this is useful when a user is typing an import manually because it stops us from doing multiplepackages.Load
in rapid succession, but it also means that we might cancel a usefulpackages.Load
and have to recompute it right away./cc @ianthehat @heschik
The text was updated successfully, but these errors were encountered: