Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to [email protected], implement marks (#39)
* Update to [email protected], implement marks There are some mechanical changes to the API: * Allow negative `delete` arguments for `Doc.splice` and `Doc.spliceText` * Add `Doc.mark`, `Doc.marks` and `Doc.marksAt` * Add the `Mark` and `ExpandMark` types * Add PatchAction.Conflict and PatchAction.Marks * Add a `marks` field to `PatchAction.SpliceText` and `PatchAction.Insert` One slightly more significant change is the addition of `unsafe impl Send{}` and `unsafe impl Sync{}` on the `Doc` we export to uniffi. This is required because currently `automerge::Automerge` is not `Send` or `Sync` due to the internal use of an `Rc`. The `unsafe` impls are okay because we guarantee that all accesses of the document on the Swift side are from a single thread. In future we should be able to remove the `Rc` from automerge to make it `Send` again and remove these unsafe impls. * fix: removes extraneous whitespace `rustfmt` complains about. * fix: sets LOCAL_BUILD environment variable in CI so that swift package uses the locally built XCFramework. Thought this was working, but with errors on the swift file, I think I missed it earlier. * docs: updates documentation to curate Marks into Document and overall Automerge-Swift documentation --------- Co-authored-by: Joe Heck <[email protected]>
- Loading branch information