Funny you should post this article now, as I'm just getting ready to start on this work myself, would love recommendations about how to do this automatic conflict resolution on semi-structured text files if anyone has some!
[1] https://unifiedjs.com/ [2] https://www.inkandswitch.com/peritext/
Could you please explain how Motif touches the concepts of 'SSG', 'CMS', 'IDE'?
We've been working on a standard for merging conflicts over in the https://braid.org group! This will let different tools (like filesystems and web apps) interoperate with p2p synchronized state.
We've made great progress already— JosephG's Diamond-Types algorithm can synchronize perfectly with Yjs, Automerge, and Sync9, just by swapping out a single function in the source code. Standardized sync is possible!
Come join us if you're interested! We have open video meetings every two weeks.
Out of curiosity how do you deal with moving files in the file system?
[1] With the Webextensions API, you have to decide on an action before starting the download, and the only choices are "overwrite", "rename the new download" or "prompt the user". There's no "skip the download" option for example, and Firefox doesn't even support the "prompt the user" option, either.
This is a controversial and debated topic.
For more advanced formats - like a tree structure document - I’m intimidated by the problem of computing a good semantic diff from the plaintext format, and how to apply that semantic diff to the CRDT format. Adding an `id` to every node in the tree is helpful for this purpose - but that makes it harder to write such documents by hand in plaintext.
Have you encountered any troubles with weird diffs that put documents into invalid states? For example, plaintext updates that somehow merge in a way that breaks the MDX or JS syntax? Do you have or foresee having a “resolve merge conflicts” flow?
Ultimately, in the long term, I think the filesystem probably provides the wrong abstraction for this use case though. The API we really need is "make these changes", (w/ changes represented thoughtfully in a mergeable way) not "here's the new final state." For now, diffing filesystem states is a reasonable workaround.
I'm really thinking in practical terms, i.e. of how we can make this happen incrementally, without forcing a new standard that everyone needs to adhere to in order for it to work.
Epic.
Thanks for open sourcing this!
I'm glad to see that other browsers(Except FF) have it.