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

Use history recording and don't do anything permanent #915

Merged
merged 6 commits into from
May 30, 2024

Conversation

boatbomber
Copy link
Member

@boatbomber boatbomber commented May 14, 2024

Adopts the latest ChangeHistoryService APIs. Our Undo/Redo notification warnings (to prevent accidentally undoing a Rojo patch) still work fine with this new API.

Avoids the permanent Destroy action, uses Remove instead. This closes #914.

@boatbomber boatbomber changed the title Use history recording Use history recording and don't do anything permanent May 14, 2024
@boatbomber boatbomber marked this pull request as ready for review May 14, 2024 03:01
@boatbomber boatbomber requested a review from Dekkonot May 14, 2024 03:01
@boatbomber boatbomber added scope: plugin Relevant to the Roblox Studio plugin size: small status: needs review This work is mostly done, but just needs work to integrate and merge it. labels May 14, 2024
Copy link
Member

@Dekkonot Dekkonot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have concerns about memory usage if we make this change, since connections will remain active on Instances now. I know there's not much we can do about it, but I'm still unhappy.

Otherwise, would prefer we not use Remove but looks good to me.

plugin/src/Reconciler/applyPatch.lua Outdated Show resolved Hide resolved
@boatbomber
Copy link
Member Author

not much we can do about it, but I'm still unhappy

Sums up a lot of Rojo work, doesn't it 😭

@kennethloeffler
Copy link
Member

Does the problem in the linked issue only occur for changed class names? We destroy instances for normal removals, too

@boatbomber
Copy link
Member Author

Good catch, Ken. Updated all uses of Destroy to be Parent = nil, and updated all the relevant tests to pin this behavior.

@boatbomber boatbomber requested a review from Dekkonot May 16, 2024 06:59
@Dekkonot Dekkonot merged commit 62f4a1f into rojo-rbx:master May 30, 2024
6 checks passed
@boatbomber boatbomber deleted the history-recordings branch July 26, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: plugin Relevant to the Roblox Studio plugin size: small status: needs review This work is mostly done, but just needs work to integrate and merge it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin cannot undo rbxm sync if the root instance has changed type
3 participants