This is causing weird code patterns in various places and I can't see
any difference between None and empty change list. Neither in the current use
cases nor in the spec.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
changes is in fact optional, indicated by the ? in changes?: { [uri: DocumentUri]: TextEdit[]; };.
But the spec requires *some* field to be set, and this is the only one we support, so it's not optional in practice for us.
clang-tools-extra/clangd/Protocol.cpp | ||
---|---|---|
810–811 | I'd suggest deleting this special case. {changes:{}} is a well-defined empty edit, even if that never makes sense to actually send. |
I'd suggest deleting this special case.
We no longer have two distinct states of our WorkspaceEdit struct to represent {changes:{}} and {}.
{changes:{}} is a well-defined empty edit, even if that never makes sense to actually send.
{} conforms to the typescript type definition of the spec, but doesn't actually define an edit per the spec text.