x/tools/gopls: support cancellation #35433
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
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: