fix(buffer): align both write entry points on encoding tags - #10987
proggeramlug wants to merge 2 commits into
Conversation
|
Warning Review limit reachedNext included review available in 6 minutes. View limit detailsLimit details: You’ve used all 8 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Landed on main in merge train 257 (#11039, v0.5.1640), main Carried at head This train was split by blast radius after an earlier 35-PR assembly hit five gap regressions: it carries only PRs touching no lowering path. Trains rebase-merge, so commits get new SHAs and GitHub cannot mark this merged. Closed as landed. |
Fixes #10645.
js_buffer_writehandled hex and base64 but fell back to raw UTF-8 for utf16le/ucs2, base64url, latin1, and ascii tags. Both buffer write entry points now use the existing shared string-to-encoding helper, so their tag tables cannot drift independently.A runtime unit test writes through both entry points with tags 0–6 and checks the byte counts, encoded bytes, and untouched surrounding bytes.
Verification:
RUST_TEST_THREADS=1 cargo test -p perry-runtime --lib both_write_entry_points_decode_every_encoding_tag -- --test-threads=1,rustfmt --check --edition 2021 crates/perry-runtime/src/buffer/copy_write.rs, andgit diff --check.