Add efficient serialisation for diffs #21
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: andras/reconcile#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "asch/serialisation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When reconciling diffs remotely, it's no longer required to send the entire text document over the network, only the changes.
API breaks
Sidewithin operationsSideargument to create anEditedTextDownsides
This PR add serde_json as a wasm dependency increasing the bundle size.
Pull Request Overview
This PR adds efficient serialization support for text diffs by introducing a
ChangeSettype that can be serialized/deserialized without including the full original text. The key architectural change is removing theSideparameter from operation creation, instead tracking operation sides separately in a parallel vector withinEditedText.Key changes:
ChangeSetandSimpleOperationtypes for compact serialization of text operationsOperationenum to removesidefield and track sides in a separateoperation_sidesvectorserialise_as_change_set()andfrom_change_set()toEditedTextReviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
Files not reviewed (1)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@ -0,0 +1,204 @@use std::fmt::Debug;The range description is incorrect. The actual range is -2^63 to 2^64-1 (i64::MIN to u64::MAX). The message should read 'an integer between -2^63 and 2^64-1 or a string'.