Replies: 1 comment 5 replies
-
I think calls intovfs-notify , which reads the file and tells vfs about it, then in
we pull in those changes.
But I didn't understand this part in your linked issue:
If you're re-reading the files from disk, why do you see at step 5 the file contents from step 3 or earlier? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i lifted (with minor tweaks)
apply_document_changes
from the r-a codebase and put it into my own language server for standard ml, millet.recently there was an issue on millet involving frequent crashes, azdavis/millet#53. i investigated and was able to reproduce.
the proximate cause is that String::replace_range panics in
apply_document_changes
. the reason why appears to be that we get aDidChangeWatchedFiles
in between someDidChangeTextDocument
notifications.specifically, the file contents that we read from disk as a result of the
DidChangeWatchedFiles
notif seem out of date with what's in the editor, so any followingDidChangeTextDocument
notifications cause us to crash.i was wondering how r-a handles this? i know vaguely there is a Vfs used across r-a; my own lsp does not have this.
Beta Was this translation helpful? Give feedback.
All reactions