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

Clarification on order of operations when executeCommand results in multiple applyEdits #2015

Open
bstaletic opened this issue Sep 11, 2024 · 0 comments

Comments

@bstaletic
Copy link
Contributor

This is a question related to #2002
Two questions, really:

  1. Is there a server that would ever produce more than a single applyEdit on executeCommand?
  2. What is the exact order of operations?

To elaborate on the second, my client does this:

  1. Send executeCommand request
  2. Receive applyEdit
  3. Respond to applyEdit
  4. Receive executeCommand response
  5. Assert that there was at most one applyEdit
  6. Actually apply the edit and send change notifications.

I could aggregate more applyEdits and apply them all at once, i.e.

  1. Send executeCommand request
  2. Receive applyEdit
  3. Respond to applyEdit
  4. Receive another applyEdit
  5. Respond to that
  6. Receive executeCommand response
  7. Actually apply the edits and send change notifications.

But I'm assuming that the intention was:

  1. Send executeCommand request
  2. Receive applyEdit
  3. Apply it.
  4. Send change notification.
  5. Respond to applyEdit
  6. Repeat 2, 3, 4, 5
  7. Receive executeCommand response

Only, there I have not clue what should come first - the change notification or the applyEdit response.
Once again, having a server to test against would be crucial in order for me to implement this kind of thing.
All the servers I've come across either produced 1 or 0 applyEdits on executeCommand.

@bstaletic bstaletic changed the title Calrification on order of operations when executeCommand results in multiple applyEdits Clarification on order of operations when executeCommand results in multiple applyEdits Sep 14, 2024
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