Repository navigation
feat: expose pending update export through FFI - #17
Merged
Merged
Conversation
Add optional pending-update bytes and preserve typed encoding errors across UniFFI. Pin the core review commit and cover Rust, Python, and Swift recovery behavior. Model: gpt-6.1-sol
Pin the reviewed core commit containing the published 1.16.2 baseline. Preserve legacy JSON signatures and schemas, expose fallible alternatives, and map new decode and unreadable-history errors without changing old tags. Validate deleted-container history recovery and Rust-to-native error conversion. Model: gpt-6.1-sol
Replace the review Git dependency with the released registry crate and its locked dependency graph. Document the separate FFI release boundary. Model: gpt-6.1-sol
zxch3n
marked this pull request as ready for review
October 22, 2026 08:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Imported remote updates can remain pending outside the applied oplog. This adds a thin
LoroDoc::export_pending_updates()wrapper and an optional-bytes UniFFI method so callers can persist those updates alongside a consistent ordinary snapshot and restore both through normal import.The Rust return type is
Result<Option<Vec<u8>>, LoroEncodeError>; generated Swift returnsthrows -> Data?, and Python returnsOptional[bytes]. Rustdoc, generated-language documentation, and README explain empty results, preserving the previous checkpoint on errors, coordinated saving, and missing-dependency limits. Pending export does not commit local edits or establish synchronization.The dependency is now the actual crates.io
loro1.17.0 release, replacing the temporary review Git pin. Four core crates are 1.17.0; three independently versioned core dependencies retain their versions. No unrelated locked dependency changes. The released 1.16.2 fixes are retained, resolving the reviewed downgrade blocker.Core 1.17 compatibility adds the new typed errors at the end of the UDL enums while preserving existing tags and legacy JSON method signatures. Fallible methods remain additive. Tests cover typed errors through real generated bindings, snapshot-at deleted-container history, and recovery after errors.
Final head:
f3f20d1f238d14adc0239f549e423ce63d24f0f9, based on0d215246d52540147edea7d38d3e50ceabbe017e. Independent review confirmed the exact seven Git-to-registry lock transitions, unchanged features, unchanged old-tag protection, and no dependency downgrade or unrelated drift.Validation uses the default registry manifest and lock, no local-core override, Rust 1.98.1, and
--locked: 2 Rust unit tests, 10 integration tests, 8 doctests, 10 Python tests, and compiled/executed Swift restoration and typed-error checks all passed. Format, Python syntax, and diff checks passed.Rust core 1.17.0 is published and its registry tarballs/API/source hashes are verified. This PR does not publish a new FFI crate, Swift artifact, or Python distribution.
Related: core #1220, Rust release #1221, website #54.