Skip to content
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: support cancellation #35433

stamblerre opened this issue Nov 7, 2019 · 1 comment


Copy link

@stamblerre stamblerre commented Nov 7, 2019

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 a context.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 multiple packages.Load in rapid succession, but it also means that we might cancel a useful packages.Load and have to recompute it right away.

/cc @ianthehat @heschik

@gopherbot gopherbot added this to the Unreleased milestone Nov 7, 2019

This comment has been minimized.

Copy link

@heschik heschik commented Nov 13, 2019

@heschik heschik closed this Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.