Closed mweidner037 closed 1 year ago
Minor API changes:
Position
type (alias for string) to IList.info
in CRuntime.transact
. Instead, apps should use their own CMessenger.CRuntime
events: remove Load, instead emitting Transaction. Also remove isLoaded
.vectorClockGet
with vectorClock
interface; in Collab.load
, use type CRDTSavedStateMeta
instead of CRDTMessageMeta
.null
from Collab.save
. Also, add option to pass null
to Collab.load
, but with a different meaning from before (tied to Collab.canGC
).Behavior changes:
CSet.add
is now a pure CRDT operation, hence can be used with RunLocallyLayer
.CSet.fromID
will remember deleted values (hence return non-undefined) until the end of the current Transaction. This avoids surprises where you try to reference a just-deleted value in an event handler (e.g., see the comments in CMap
's internal event handlers).CausalMessageBuffer
.Other:
npm run coverage
.
Completes https://github.com/composablesys/collabs/issues/239
Rewrites
CRuntime.load
and all CRDTs'load
functions to allow loading at any time. If there is already a non-trivial state, the loaded state is merged with that one, in the style of state-based CRDTs.Additionally,
load
functions now emit events describing their changes (including incremental changes during merging). This eliminates the need for special cases to refresh the display after loading.I've also made minor API changes and rewritten the list CRDT internals.
Still TODO: