automerge / automerge-classic

A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
http://automerge.org/
MIT License
14.75k stars 466 forks source link

Require actor ids to be uuid length #412

Closed jeffa5 closed 3 years ago

jeffa5 commented 3 years ago

The actor id is required to be a uuid but the length is not currently enforced.

I'm not aware of a documented reason to not observe a consistent length but do let me know if it was intentional.

jeffa5 commented 3 years ago

Ah, just seen https://github.com/automerge/automerge-rs/pull/178#issuecomment-863544241

lightsprint09 commented 3 years ago

As an user of the API I don't understand why an Actor needs to be fixed size. Maybe I use some Identity Managment System which provides me stable IDs which I can use as ActorId but are not UUID sized.

jeffa5 commented 3 years ago

Well it is documented as a UUID so I anticipated that it should be one but turns out that is a bit misleading

MeneDev commented 3 years ago

I'd prefer a change to the documentation rather than the code. As @ept argued in https://github.com/automerge/automerge-rs/pull/178 this could be unnecessarily limiting. Personally I thought about using git commit hashes (40 hex digits) as actors.