swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.2k stars 264 forks source link

Don’t return edits from `ExecuteCommandRequest` #1498

Closed ahoppen closed 16 hours ago

ahoppen commented 1 week ago

Currently, the ExecuteCommandRequest is returning the edits it wants to perform to the source file as the LSPAny response. Clients shouldn’t know how to interpret that LSPAny and the edits are actually applied by sending a ApplyEditRequest to the client.

Only tests are currently relying on the response of the ExecuteCommandRequest. We should change those tests to test the actual ApplyEditRequest sent to the client and make ExecuteCommandRequest return an empty response.

ahoppen commented 1 week ago

Synced to Apple’s issue tracker as rdar://130207754