-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify that the current protocol requires that requests and notification are processed in order #12
Comments
I would suggest that requests should be processed sequentially as far as the client can tell, but internally they can be processed concurrently if it is guaranteed the result is the same as if they were processed sequentially. For example mutiple read-only/query operations can be processed concurrently, obviously. As for mixing read-only and write operations (like If we wanted to get smart, the server could try to detect if the |
A more extensive and principled way to handle the LSP protocol. Adds *interface* support for all LSP requests. Fixes: * 'completionItem/resolve' should return CompletionItem not a vector * Concurrent handling of requests. Requests must be handled in order, otherwise, for example, text document changes could be applied out of order. Only read-only requests can conceptually be executed in parallel (since that would have the same result as if they were processed in order). See here for more info: microsoft/language-server-protocol#12 TODO for RustLSP: * Cancel support * Support sending requests to client from server (only notifications can be sent currently). This is required for one LSP request: 'window/showMessageRequest'. * Perhaps integrate with https://github.com/ethcore/jsonrpc-core and share part of the JSON-RPC implementation?
A more extensive and principled way to handle the LSP protocol. Adds *interface* support for all LSP requests. Fixes: * 'completionItem/resolve' should return CompletionItem not a vector * Concurrent handling of requests. Requests must be handled in order, otherwise, for example, text document changes could be applied out of order. Only read-only requests can conceptually be executed in parallel (since that would have the same result as if they were processed in order). See here for more info: microsoft/language-server-protocol#12 TODO for RustLSP: * Cancel support
I added the following to the spec to clarify this: Request, Notification and response orderingResponses for requests should be sent in the same order as the requests appear on the server or client side. So for example if a server receives a How the server internally processes the requests is up to the server implementation. If the server decides to execute them in parallel and this produces correct result the server is free to do so. The server is also allowed to reorder requests and notification if the reordering doesn't affect correctness. |
…nd notification are processed in order
A more extensive and principled way to handle the LSP protocol. Adds *interface* support for all LSP requests. Fixes: * 'completionItem/resolve' should return CompletionItem not a vector * Concurrent handling of requests. Requests must be handled in order, otherwise, for example, text document changes could be applied out of order. Only read-only requests can conceptually be executed in parallel (since that would have the same result as if they were processed in order). See here for more info: microsoft/language-server-protocol#12 TODO for RustLSP: * Cancel support
The current protocol requires that request and notifications send from the client to the server are processed in the same order as they are sent.
The text was updated successfully, but these errors were encountered: