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/cmd/gopls: files get out of sync with incremental sync #32348

Closed
muirdm opened this issue May 31, 2019 · 1 comment
Closed

x/tools/cmd/gopls: files get out of sync with incremental sync #32348

muirdm opened this issue May 31, 2019 · 1 comment

Comments

@muirdm
Copy link

@muirdm muirdm commented May 31, 2019

With incrementalSync enabled, my files often get out of sync between Emacs and gopls. I dug into it a bit and the main problem I found was didChange doesn't apply already pending content changes before applying the new change that just came in.

Emacs tends to send multiple didChange events in rapid succession, and what happens is the first change gets queued up in the view's contentChanges, but not actually applied to the overlay. If the second change comes in before loadParseTypecheck calls applyContentChanges, then the second change ends up getting applied to the original content and the first change is overwritten in contentChanges.

/cc @ianthehat

@gopherbot gopherbot added this to the Unreleased milestone May 31, 2019
@gopherbot gopherbot added the gopls label May 31, 2019
@gopherbot
Copy link

@gopherbot gopherbot commented Jun 1, 2019

Change https://golang.org/cl/179922 mentions this issue: internal/lsp: don't queue content changes

@golang golang locked and limited conversation to collaborators Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.