-
Notifications
You must be signed in to change notification settings - Fork 804
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
Clarification: re-order responses? #306
Comments
May also want to see #278. |
The way that I read it, The particular note about |
@object88 is correct. The protocol only defines that results must be correct in terms of its request. Since the whole protocol is fully async it is very hard to define strict ordering anyways. For example in node if you create two promises there is IMO no guarantee that the first created promises resolves first and the second promise second even if they are constructed with a resolved value. Since the client sends requests in a specific order it is nice if the server returns them in the same order since results are usually shown in the UI as a result of user actions and a user executed them in a certain order. However given the above the UI might not react in the same order. I am open for a better description if you think that the current sentences don't make this clear enough. Please add them here and I will merge them in. |
The LSP spec says [link]
This is confusing -- e.g. ocaml/merlin#607 (comment)
Q. If the client sends textDocument/definition request id 10 followed by textDocument/hover request id 11, is the LSP server permitted to send back response id 11 followed by response id 10 if this still "produces the correct result"?
The spec says the server is able to "reorder requests and notifications if the reordering doesn't affect correctness". I don't know if this means to allow arbitrary re-ordering of requests with respect to each other, or if it's merely to allow re-ordering of notifications with respect to requests.
cc. @freebroccolo
The text was updated successfully, but these errors were encountered: