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

Introducing logical collection pointers #393

Merged
merged 30 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cd15621
moved Branch, BranchPtr to branch.rs
Horusiath Feb 11, 2024
877499a
introduced RootRefs
Horusiath Feb 15, 2024
4ab1faf
exposed Root and Nested types
Horusiath Feb 16, 2024
73d2626
Working YArray on ywasm
Horusiath Feb 22, 2024
7afa7b9
ywasm: YDoc and YTransaction methods
Horusiath Feb 22, 2024
c1f1ce4
ywasm: working YArray
Horusiath Feb 24, 2024
fb8073c
ywasm: prepared UndoManager
Horusiath Feb 24, 2024
6c38c3d
ywasm: prepared WeakLink
Horusiath Feb 24, 2024
3e98907
ywasm: flattened YDoc
Horusiath Feb 24, 2024
d33f946
ywasm: make YDoc compilable through wasm-interpreter
Horusiath Feb 29, 2024
064444c
ywasm: support YWeakLink
Horusiath Feb 29, 2024
5d24059
ywasm: support YMap
Horusiath Feb 29, 2024
ddf8a8a
ywasm: support YText
Horusiath Feb 29, 2024
5b1f1d8
ywasm: support XML types
Horusiath Mar 2, 2024
d45b345
ywasm: support for snapshots and sticky indexes
Horusiath Mar 3, 2024
7d60a01
ywasm: first batch of fixes
Horusiath Mar 7, 2024
9054653
ywasm: second batch of fixes
Horusiath Mar 7, 2024
56c8963
ywasm: third batch of fixes
Horusiath Mar 8, 2024
7f137df
ywasm: fourth batch of fixes
Horusiath Mar 8, 2024
b07878e
ywasm: fixed remaining tests
Horusiath Mar 8, 2024
19cdcd8
exposed logical IDs in ywasm API
Horusiath Mar 8, 2024
9b70f79
added documentation
Horusiath Mar 8, 2024
e732534
fixed doc.rs example
Horusiath Mar 8, 2024
7d50569
updated yffi tests
Horusiath Mar 8, 2024
9ed4e5d
added BranchID to yffi
Horusiath Mar 8, 2024
80dbfba
yffi: fixed one test
Horusiath Mar 8, 2024
10e6f1c
yffi: fixed event target resolution
Horusiath Mar 8, 2024
a105298
wtf 1
Horusiath Mar 8, 2024
00f8e48
added test for logical branches
Horusiath Mar 9, 2024
10f3b6d
fixed c ffi tests
Horusiath Mar 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
moved Branch, BranchPtr to branch.rs
  • Loading branch information
Horusiath committed Feb 11, 2024
commit cd15621e88c1e45eb42a633930a8611047089c6b
7 changes: 3 additions & 4 deletions yffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::ptr::{null, null_mut};
use std::sync::atomic::{AtomicPtr, Ordering};
use std::sync::Arc;
use yrs::block::{ClientID, ItemContent, Prelim, Unused};
use yrs::branch::BranchPtr;
use yrs::encoding::read::Error;
use yrs::types::array::ArrayEvent;
use yrs::types::array::ArrayIter as NativeArrayIter;
Expand All @@ -16,9 +17,7 @@ use yrs::types::weak::{LinkSource, Unquote as NativeUnquote, WeakEvent, WeakRef}
use yrs::types::xml::{Attributes as NativeAttributes, XmlNode};
use yrs::types::xml::{TreeWalker as NativeTreeWalker, XmlFragment};
use yrs::types::xml::{XmlEvent, XmlTextEvent};
use yrs::types::{
Attrs, BranchPtr, Change, Delta, EntryChange, Event, PathSegment, TypeRef, Value,
};
use yrs::types::{Attrs, Change, Delta, EntryChange, Event, PathSegment, TypeRef, Value};
use yrs::undo::EventKind;
use yrs::updates::decoder::{Decode, DecoderV1};
use yrs::updates::encoder::{Encode, Encoder, EncoderV1, EncoderV2};
Expand Down Expand Up @@ -118,7 +117,7 @@ pub type Doc = yrs::Doc;
///
/// Using write methods of different shared types (eg. `ytext_insert` and `yarray_insert`) over
/// the same branch may result in undefined behavior.
pub type Branch = yrs::types::Branch;
pub type Branch = yrs::branch::Branch;

/// Subscription to any kind of observable events, like `ymap_observe`, `ydoc_observe_updates_v1` etc.
/// This subscription can be destroyed by calling `yunobserve` function, which will cause to unsubscribe
Expand Down
3 changes: 2 additions & 1 deletion yrs/src/block.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::branch::{Branch, BranchPtr};
use crate::doc::{DocAddr, OffsetKind};
use crate::encoding::read::Error;
use crate::gc::GCCollector;
Expand All @@ -6,7 +7,7 @@ use crate::slice::{BlockSlice, GCSlice, ItemSlice};
use crate::store::{Store, WeakStoreRef};
use crate::transaction::TransactionMut;
use crate::types::text::update_current_attributes;
use crate::types::{Attrs, Branch, BranchPtr, TypePtr, TypeRef, Value};
use crate::types::{Attrs, TypePtr, TypeRef, Value};
use crate::undo::UndoStack;
use crate::updates::decoder::{Decode, Decoder};
use crate::updates::encoder::{Encode, Encoder};
Expand Down
3 changes: 2 additions & 1 deletion yrs/src/block_iter.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use crate::block::{Item, ItemContent, ItemPtr, Prelim};
use crate::branch::BranchPtr;
use crate::moving::{Move, StickyIndex};
use crate::transaction::{ReadTxn, TransactionMut};
use crate::types::{BranchPtr, TypePtr, Value};
use crate::types::{TypePtr, Value};
use crate::{Assoc, ID};

/// Struct used for iterating over the sequence of item's values with respect to a potential
Expand Down
4 changes: 0 additions & 4 deletions yrs/src/block_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ pub(crate) struct ClientBlockList {
}

impl ClientBlockList {
fn new() -> ClientBlockList {
ClientBlockList { list: Vec::new() }
}

/// Creates a new instance of `ClientBlockList` with the specified capacity.
///
/// This function initializes an internal vector with a capacity
Expand Down
Loading