atom-archive / xray

An experimental next-generation Electron-based text editor
MIT License
8.48k stars 235 forks source link

memo_core filesystem sync status? #138

Closed jessegrosjean closed 5 years ago

jessegrosjean commented 5 years ago

First thanks for Atom, Xray, Memo, and whatever's next.

At the moment I'm particular interested in memo_core and how it plans to sync with the filesystem. The "Update" posts over the summer described lots of work related to filesystem sync. But looking at the memo README it seems like what is in memo_core right now is just the "light client" as described here:

Library: Memo provides a reference library implementation written in Rust that produces and consumes the Memo protocol messages to synchronize working trees. We plan to ship a "light client" version of the library that compiles to WebAssembly and exposes a virtual file system API

Is the next step code to sync this model with the filesystem? Any idea on how long until such code appears? Also will it depend on the underlying filesystem being a git repository? This seems to suggest that it might:

as well as a full version based on Libgit2 that synchronizes with a full replica on the local file system.

But I think it would be really useful to be able to sync memo with any local filesystem (git or not). In the case where git isn't present then it wouldn't make sense to sync memo state with multiple clients, because no shared git commit... but it would still be useful to have a single client reading memo state... that is synced with filesystem changes that are made outside of memo API.

nathansobo commented 5 years ago

Hi, thanks for your interest. I’m on my phone at a conference right now, so I can’t grab you the commit right now, but we did have an implementation of file system sync working in a previous iteration. In timeline.rs In the Git history, you can find it randomized tested against a simulated OS. When we decided to ship the light client and build more explicitly on top of Git, we dropped that work temporarily. We should be setup to handle it though and have confidence it will work based on that previous attempt. I can follow up with a more specific link later if needed.

jessegrosjean commented 5 years ago

Ah, thanks. I think I've found the latest version of timeline.rs.

nathansobo commented 5 years ago

We definitely intend to implement syncing once we deal with commits. I’m due for an update and will explain our present thinking. But I’m short we shouldn’t require Git, but then all paths will need to be represented via operations.