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

Git operations are not updating the document manager #692

Open
charlespwd opened this issue Jan 8, 2025 · 0 comments · May be fixed by #775
Open

Git operations are not updating the document manager #692

charlespwd opened this issue Jan 8, 2025 · 0 comments · May be fixed by #775
Assignees
Labels
Bug Something isn't working

Comments

@charlespwd
Copy link
Contributor

Describe the bug
Git operations change files in the workspace without shooting textDocument/did{Open,Change,Save,Close} lifecycle notifications.

This means that if you revert changes and do a rename, then the internal representation of preloaded files might be off.

Expected behaviour
When files are modified "under our feet", we need to sync them to the document manager with updated values

Actual behaviour
Stale values are kept around

@charlespwd charlespwd added the Bug Something isn't working label Jan 8, 2025
@charlespwd charlespwd self-assigned this Jan 15, 2025
charlespwd added a commit that referenced this issue Feb 10, 2025
Tricky part was to not invalidate the cache twice for the same change.

Lots of LSP lifecycle messages (onDidCreateFiles, onDidRenameFiles,
onDidDeleteFiles, onDidSaveTextDocument) were fired before the
onDidChangeWatchedFile events.

Had to do a little trick to avoid invalidating the cache twice for
those.

Fixes #692
@charlespwd charlespwd linked a pull request Feb 10, 2025 that will close this issue
1 task
charlespwd added a commit that referenced this issue Feb 10, 2025
Tricky part was to not invalidate the cache twice for the same change.

Lots of LSP lifecycle messages (onDidCreateFiles, onDidRenameFiles,
onDidDeleteFiles, onDidSaveTextDocument) were fired before the
onDidChangeWatchedFile events.

Had to do a little trick to avoid invalidating the cache twice for
those.

Fixes #692
charlespwd added a commit that referenced this issue Feb 10, 2025
Tricky part was to not invalidate the cache twice for the same change.

Lots of LSP lifecycle messages (onDidCreateFiles, onDidRenameFiles,
onDidDeleteFiles, onDidSaveTextDocument) were fired before the
onDidChangeWatchedFile events.

Had to do a little trick to avoid invalidating the cache twice for
those.

Fixes #692
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant