This is much more efficient over the full mode, as it only requires sending
smalls chunks of files. It also works around a weird command ordering
issue (full document updates are being sent after other commands like
code completion) in newer versions of vscode.
Details
- Reviewers
jpienaar - Commits
- rG6187178e832c: [mlir:LSP] Switch document sync mode to Incremental
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Nice, injecting errors for testing :-)
mlir/lib/Tools/lsp-server-support/Protocol.cpp | ||
---|---|---|
476 | And these can't get out of sync? E.g., would there be a failure rather than the state we believe internally here doesn't match what the user sees? | |
mlir/lib/Tools/lsp-server-support/Protocol.h | ||
330 | Why not getAsSMRange? |
mlir/lib/Tools/lsp-server-support/Protocol.cpp | ||
---|---|---|
476 | Given that we communicate LSP commands via stdin/stdout it would only really get out-of-sync if the client is sending commands in an invalid order, but in that case given that we only get ranges and positions there isn't much we could do in terms of fully guaranteeing the text file is what it is supposed to be. If we do detect an invalid range though, we essentially forget the file (no longer serve e.g. diagnostics to the user). This is what clangd does in this situation as well. |
Why not getAsSMRange?