Skip to content

x/tools/gopls: support cancellation #35433

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

Closed
stamblerre opened this issue Nov 7, 2019 · 1 comment
Closed

x/tools/gopls: support cancellation #35433

stamblerre opened this issue Nov 7, 2019 · 1 comment
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

Comments

@stamblerre
Copy link
Contributor

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
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 7, 2019
@heschi
Copy link
Contributor

heschi commented Nov 13, 2019

Closed in https://golang.org/cl/206879.

@heschi heschi closed this as completed Nov 13, 2019
@golang golang locked and limited conversation to collaborators Nov 12, 2020
@rsc rsc unassigned heschi Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.
Projects
None yet
Development

No branches or pull requests

3 participants