automerge / automerge-swift

Swift language bindings presenting Automerge

Home Page:https://automerge.org/automerge-swift/documentation/automerge/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encoding counter results in incorrect merging between documents.

heckj opened this issue · comments

When an Automerge doc using the AutomergeEncoding updates a counter, it's setting a value explicitly rather than incremented (or decrementing) by a value, resulting in updates between documents acting akin to "LWW Ints" rather than combining the increment values from the base value set.

Ultimately, Counter ergonomics would benefit from Counter becoming a reference type instead of a value type, but at the base level this is a bug with the 0.3.x release branch, and the reference type updates (#63) should only apply to later updates.