automerge / automerge-swift

Swift language bindings presenting Automerge
https://automerge.org/automerge-swift/documentation/automerge/
MIT License
216 stars 11 forks source link

Isolated change signal #154

Closed heckj closed 2 months ago

heckj commented 2 months ago

I couldn't stand to leave it with at least a little more granular refinement to the change signals, and I wasn't yet ready to tackle the Rust and wiring through the low-level bits for the Diff api. So this is a "in the mean time" update to at least get it more properly correct in terms of change signals for bound types.

I also found my earlier miss in strong references to the Doc and resolved that for the bound types so that observation doesn't make an retain loop, which it previously did.

fixes #152, although a nicer version would be nice using the Diff APIs with computation of sending those signals at the Doc level to reduce work in non-simple-doc/few-instance scenarios.