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: failure to recover from cancelled reinitialization #57626

Closed
findleyr opened this issue Jan 5, 2023 · 1 comment
Closed

x/tools/gopls: failure to recover from cancelled reinitialization #57626

findleyr opened this issue Jan 5, 2023 · 1 comment
Assignees
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

@findleyr
Copy link
Contributor

findleyr commented Jan 5, 2023

I just encountered this after refactoring some of our workspace tests: when a snapshot is reinitialized (for example, because of a go.work change), in some cases it is possible that reinitialization is can be cancelled if it is not running on a durable context.

This can lead to a broken workspace, because while we allow network access on reinitialization, we don't allow it when loading individual packages / files.

I think this could be one of the major remaining causes of inconsistent state following a branch switch or go generate command.

@findleyr findleyr added this to the gopls/v0.12.0 milestone Jan 5, 2023
@findleyr findleyr self-assigned this Jan 5, 2023
@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 Jan 5, 2023
@gopherbot
Copy link

Change https://go.dev/cl/460795 mentions this issue: gopls/internal/cache: don't mark initialized after cancelation

@golang golang locked and limited conversation to collaborators Jan 12, 2024
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

2 participants