rojo-rbx / rbx-dom

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

Make SSTR chunk deterministic #254

Closed JohnnyMorganz closed 1 year ago

JohnnyMorganz commented 1 year ago

Currently, the SSTR chunk is non-deterministic, where the ordering of the SharedStrings inside the array can change on each run.

We make this deterministic by sorting the shared strings array (based on its hash), and then assigning IDs afterwards.

Dependent on the test files introduced in https://github.com/rojo-rbx/rbx-test-files/pull/16

JohnnyMorganz commented 1 year ago

Whoops, I didn't see https://github.com/rojo-rbx/rbx-dom/pull/244 which also fixes this. Feel free to close this one out if you want to merge the other one instead