-
Notifications
You must be signed in to change notification settings - Fork 467
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
Add OpId to remove actions in Patch #453
base: main
Are you sure you want to change the base?
Conversation
It also fails on main branch, so it has nothing to do with this PR. @ept, FYI. |
Converted to draft -- this'll need more work, we also want removes of map keys to include op id. E.g. currently we have |
Hi @begor, thanks for this. The browsertest failure can be ignored (it's been flaky since I moved from Travis CI to GitHub Actions and I haven't yet figured out how to make it reliable again). I am happy to consider this, but could you please tell me more about why you need this information in the patches? I don't currently see a need for it, and I am worried you might be doing something that goes against the grain of the intended use of Automerge. For map keys, Also, a heads up – we are planning to change the patch format/API with a view towards improving performance. We can also include deletion opIds in the new API if we have a need for it. |
@ept I've updated the PR. Why do we need this: we use For this we'd like to sort updates inside a Patch by The implementation is a bit peculiar when it comes to map deletes -- here we use |
48f4c5b
to
fc55ebd
Compare
Currently we put
OpId
(operation id) forSingleInsertEdit
andUpdateEdit
, but omit it forRemoveItem
. The same thing is true about map deletions -- we simply do{attr: {}}
and there's no way to know which operation is responsible for this change.This is sometimes annoying, because we'd like to have some ordering of actions inside one patch and it's tricky (or impossible) without
OpId
.