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

Don't bail for MaterialColors and Attributes parse failures #471

Conversation

kennethloeffler
Copy link
Member

@kennethloeffler kennethloeffler commented Nov 1, 2024

In #293, we changed the rbx_binary deserializer to bail completely when it fails to read attributes. This turns out to be a pretty bad idea, because it means when Roblox changes the attributes format, any files containing the new version cannot be parsed at all.

This PR allows MaterialColors and Attributes to be parsed as BinaryStrings when they cannot be parsed into their specialized types in both rbx_binary and rbx_xml, and changes the corresponding rbx_dom_lua custom property codecs to fail gracefully under these conditions. I'm thinking we might want to do this for Tags too, but I'm not sure... let me know what you think!

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 find it unlikely the serialization of Tags will change. I'm also not sure if it can even fail, since the worst case is a blob that contains no zeros so our implementation just assumes it's one Tag.

@kennethloeffler kennethloeffler merged commit bc8ab6b into rojo-rbx:master Nov 1, 2024
3 checks passed
@kennethloeffler kennethloeffler deleted the attributes-material-colors-dont-bail branch November 1, 2024 15:47
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