-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Out-of-order Msgpack responses from remote plugin cause channel to close #19932
Comments
Rather, we should document that we deviate from the msgpack-rpc spec in this respect. In addition, properly supporting an async mixture of requests and notifications is going to require to deviate from the spec even more, not less. |
In departing in this way from the Msgpack RPC spec, does Neovim guarantee that all messages, whether requests or notifications, will be processed in the order in which they are received? |
yes. |
#24061 mentions this in |
Neovim version (nvim -v)
0.7.0
Vim (not Nvim) behaves the same?
N/A
Operating system/version
CentOS 7.9
Terminal name/version
xfce4-terminal 0.8.7.4
$TERM environment variable
tmux-256color
Installation
system package manager
How to reproduce the issue
In a remote plugin in a language of your choosing, create a new RPC connection with Neovim. Then send the following:
[ 0, 1, "nvim_call_function", [ "rpcrequest", [ {channel id}, "rpc" ] ] ]
(we receive:[ 0, 1, "rpc", [ ] ]
)[ 0, 2, "nvim_call_function", [ "rpcrequest", [ {channel id}, "rpc" ] ] ]
(we receive:[ 0, 2, "rpc", [ ] ]
)[ 1, 1, nil, nil ]
Expected behavior
Neovim should continue being blocked until the remote plugin returns a response for request 2.
Actual behavior
Neovim closes the connection and the following error is logged in $NVIM_LOG_FILE:
The Msgpack RPC spec says that responses can be given out of order, but it seems that Neovim requires responses to be given in reverse order of requests. The idea that responses should be given in this order is intuitive - operating like a call stack - but shouldn't be required per the spec.
The text was updated successfully, but these errors were encountered: