automerge / automerge-swift-archived

Wrapper around Swift types that can be modified concurrently by different users, and merged again automatically (a CRDT).
MIT License
159 stars 14 forks source link

actors returned from Proxy.conflicts() don't match original actors #47

Closed heckj closed 2 years ago

heckj commented 2 years ago

I've tried to efforts - one that creates two independent documents from the same model, and another that clones an initial model. In both cases, conflicting changes are made, the two documents merged, and that's all (correctly) consistent.

However, the actors returned from the rootProxy.conflicts() don't match either of the original actors. The returned ActorId look like they're prepended with additional information, which the Swift API allows (related issue: https://github.com/automerge/automerge-swift/issues/45), but ultimately you can't really match the actors - which you should be able to do.

PR #48 illustrates the scenario that's failing as additional unit tests.

heckj commented 2 years ago

While looking at Documenting some of the other elements of the API, I ran into ObjectId, which includes a method to parse what looks like an ObjectId that's in the form of {counterValue}@{ActorId}. Is that what the conflicts API is returning? An ObjectID, not an Actor?

And if so, should the type of the key returned from a call to conflicts by ObjectId instead of Actor?