Fix LSP diagnostics on folder rename#11834
Draft
LeonMatthes wants to merge 2 commits into
Draft
Conversation
ogoffart
reviewed
May 23, 2026
Member
There was a problem hiding this comment.
The lsp shouldn't need this worker loop logic.
If i understand correctly, the goal is only to have the reconcile step to be shared, (WorkerState::reconcile) which is less than 100 lines of code.
But even then, it seems overkill to try to be so accurate. We could detect folder change and then clear the whole cache in the LSP. (not including the contents of the files open in the editor) wouldn't that work?
This should allow us to implement a separate file watcher for the LSP. The LSP currently can't reconcile watched paths, so it doesn't notice if a directory is deleted or renamed because it does not have the directory itself listed as a file in the document cache.
5036ae6 to
8357eea
Compare
This gives the LSP access to the reconcile logic of the file system watcher. E.g. If a directory is renamed, VS Code will just send a delete and create event for the directory, not the underlying files. The FileWatcher in the interpreter can deal with this kind of events and synthesizes any necessary events. Closes slint-ui#11778
8357eea to
8a853bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As outlined in #11778, this wires up the file system watcher to the LSP so that we can benefit from the reconcile logic in the file system watcher.
Closes #11778