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

Perform property migrations in rbx_xml serializer #340

Merged
merged 5 commits into from
Aug 4, 2023

Conversation

Dekkonot
Copy link
Member

@Dekkonot Dekkonot commented Aug 4, 2023

A companion to #339 and related to #335 as well.

As hoped for in 339, this was in fact much easier. We already have a mechanism for replacing names and values during serialization in rbx_xml, so it wasn't hard to add migrations to that process.

Unlike in the rbx_binary implementation, there's no compatibility concern if a migration fails. I've noted that in the source, but for posterity, if one fails and we allow a property to not be migrated, it'll still load just fine in Studio so there's not any real concern.

<Item class="Part" referent="4">
<Properties>
<string name="Name">Part</string>
<Color3uint8 name="Color">11829503</Color3uint8>
Copy link
Member

@kennethloeffler kennethloeffler Aug 4, 2023

Choose a reason for hiding this comment

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

Maybe the new property for MigrationOperation::BrickColorToColor should really be Color3uint8? 🤔 It'll still work regardless though...

Copy link
Member Author

Choose a reason for hiding this comment

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

I suspect yes, it should be. With the way Roblox handles reflection, it turns out to be fine, but we should probably fix that for correctness's sake.

@Dekkonot Dekkonot merged commit 0805cf6 into rojo-rbx:master Aug 4, 2023
2 checks passed
@Dekkonot Dekkonot deleted the xml-ser-migrate branch August 4, 2023 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants