rojo-rbx / rbx-dom

Roblox DOM and (de)serialization implementation in Rust
MIT License
113 stars 46 forks source link

Perform property migrations in rbx_xml serializer #340

Closed Dekkonot closed 1 year ago

Dekkonot commented 1 year ago

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.