Skip to content

Conversation

@SuchAFuriousDeath
Copy link
Collaborator

@SuchAFuriousDeath SuchAFuriousDeath commented Jan 13, 2026

While working on #21107, I discovered that quick_xml errors do not map 1:1 with Flash errors, so make_xml_error needs to be refactored (and all the code adapted). Doing it in that PR would be too hectic (quick-xml has had major breaking changes), so I'm submitting this separately. This PR also does some minor refactors and implements a FIXME.

No functional changes intended, everything should map to the exact same error code as before. There's quite a lot of xml tests, so if they all pass, we can be reasonably sure this does not break anything.

Context for the decoder usage removal:

The decoder doesn't actually do anything special for us, since we don't use the encoding feature. So there's no need to pass it around.

https://docs.rs/quick-xml/latest/quick_xml/encoding/struct.Decoder.html

If feature encoding is disabled, the decoder is always UTF-8 decoder: any XML declarations are ignored.

It can be seen here that without the encoding feature, std::str::from_utf8 is all the decoder does.
https://docs.rs/quick-xml/latest/src/quick_xml/encoding.rs.html#121-129

@Lord-McSweeney Lord-McSweeney added A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup waiting-on-review Waiting on review from a Ruffle team member labels Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup waiting-on-review Waiting on review from a Ruffle team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants