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

Custom Actor ID

lightsprint09 opened this issue · comments

Actor ID is missing a public init. I would like to init the Actor with a given custom string

The core library (as far as I know, intentionally) doesn't allow you to specify your own custom actorID. That is managed by the Automerge core library, and provided to us (which is why it doesn't have a public initializer). There's no current way to create an Automerge document with your own specified actorID.

I believe @alexjg and the core team have been leaning towards wanting to even remove the concept of an ActorID if they can - but that's "down the road" in terms of efforts on the overall project.

The core library does actually expose ways to construct your own actor ID, I just didn't expose those methods here. I do think exposing ways to set the actor ID is a big old footgun but that doesn't mean we shouldn't, just that we should try and find ways not to 🙂 .

@lightsprint09 what's your usecase?

Just check my code... looks like I don't need them anymore :)