Skip to content
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

Requests vs. Notifications #7

Open
KillTheMule opened this issue Dec 30, 2019 · 0 comments
Open

Requests vs. Notifications #7

KillTheMule opened this issue Dec 30, 2019 · 0 comments

Comments

@KillTheMule
Copy link
Owner

KillTheMule commented Dec 30, 2019

From the Roadmap:

Consider making a difference between requests and notifications, and send out notifications with the proper message type, and don't wait for a response

Does neovim actually recognize this? Read the docs! Maybe everything's a requests anyways, then don't bother
It does, see https://neovim.io/doc/user/api.html#api-global-events. Maybe not so usefull since there seems little to do where you don't want direct error feedback

So we could send out requests without a real return value, such as nvim_buf_set_lines, as notifications instead.

  • Pros:
    • This would save a bit of RPC traffic, as we don't get an answer unless there was an error
  • Cons:
    • Need to implement handling the error event
      • Needs design work: Always handle? Let clients handle it on their leisure?
      • Makes everything more complicated
    • Gets us into trouble because of timing issues, we don't know exactly which message the error event belongs to.

My take: It's not worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant