fix(sync): support Ref-typed properties#282
Open
0hirume wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds full two-way sync support for
Ref-typed properties (Model.PrimaryPart,Weld.Part0/Part1,ObjectValue.Value, etc.)..rbxm/.rbxmxbuild/read now preserves internalRefproperties instead of dropping them.Refproperties are represented as relative-path strings in.data.json/.model.json, resolved back to realVariant::Reftargets viaTree::resolve_refs()..rbxm/.rbxmxfiles containing internalRefproperties:snapshot_from_domwas reusingSnapshot.idas a remap placeholder, which collided with its other meaning ("corresponds to an existing tree instance") and caused new instances to be misrouted as updates. Introduces a separate transientSnapshot.ref_idfield and a two-pass insert + remap, applied to both the live insertion path and the initial tree build path.cargo test --lib(8/8 pass)cargo clippy --all-targetscleanargon serve+ companion Studio plugin: created a Model with PrimaryPart and a Weld with Part0/Part1, confirmed.rbxm/.data.jsonround-trip and live two-way sync work without crashing.Closes #269