Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two-Way Sync #164

Open
LPGhatguy opened this issue Apr 24, 2019 · 0 comments
Open

Two-Way Sync #164

LPGhatguy opened this issue Apr 24, 2019 · 0 comments
Labels
impact: high Major blocker for Rojo users, or stops people from adopting Rojo. scope: cli Relevant to the Rojo CLI scope: plugin Relevant to the Roblox Studio plugin size: large two-way-sync This will help further two-way-sync. type: enhancement Feature or improvement that should potentially happen

Comments

@LPGhatguy
Copy link
Contributor

LPGhatguy commented Apr 24, 2019

This is the giant killer feature Rojo needs!

Enabling Two-Way Sync

Turn on the "Two-Way Sync" toggle in the plugin, available on master:

Rojo settings panel

Work Items

Remaining work for two-way sync involves every issue with the "two-way-sync" label.

Patch-to-VFS-Patch Resolver

One promising approach is to eagerly apply the client's patch (which is of type PatchSet), which will give us an AppliedPatchSet. Using the applied patch as well as information from the DOM, we should be able to produce a VfsPatch of some sort.

If generating a VfsPatch fails, like we couldn't figure out how to modify the files on-disk, we can snapshot instances from the filesystem again to undo the patch and let the client know that their change was rejected.

VfsPatch should be pretty simple, probably similar to the shape of AppliedPatchSet. Something like:

struct VfsPatch {
    pub removed: Vec<PathBuf>,
    pub updated: Vec<(PathBuf, Vec<u8>)>, // with its own struct instead of a tuple
    pub added: Vec<VfsPatchAdd>,
}

How you can help

Rojo's codebase has historically been kind of a rat's nest of complexity. We're slowly trying to make it better, and any improvements to readability (comments, better names, small refactors) are welcome!

There are more ways to help than with code, though. Come to the Roblox Open Source Discord (run by Quenty) to get involved in design discussions, hard technical problems, documentation, and evangelism!

@LPGhatguy LPGhatguy added type: enhancement Feature or improvement that should potentially happen scope: cli Relevant to the Rojo CLI scope: plugin Relevant to the Roblox Studio plugin impact: high Major blocker for Rojo users, or stops people from adopting Rojo. size: large labels Apr 24, 2019
@Kampfkarren Kampfkarren mentioned this issue May 21, 2019
4 tasks
@LPGhatguy LPGhatguy pinned this issue May 31, 2019
@LPGhatguy LPGhatguy changed the title Two-way sync Two-Way Sync Dec 24, 2019
@LPGhatguy LPGhatguy added the two-way-sync This will help further two-way-sync. label Mar 18, 2020
@boatbomber boatbomber unpinned this issue Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: high Major blocker for Rojo users, or stops people from adopting Rojo. scope: cli Relevant to the Rojo CLI scope: plugin Relevant to the Roblox Studio plugin size: large two-way-sync This will help further two-way-sync. type: enhancement Feature or improvement that should potentially happen
Projects
None yet
Development

No branches or pull requests

1 participant