Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
| } | ||
|
|
||
| #[test] | ||
| fn test_multibyte_char_split_across_read_buffers() { |
There was a problem hiding this comment.
i merged the ignored test too. please merge these
Seems that it is fully written with Claude please adding some tech debt for no good reason ... |
Merging this PR will degrade performance by 33.74%1 warning, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
|
GNU testsuite comparison: |
|
thanks for the PR! |
020584f to
5d77de4
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Fair point, and you're right about the duplication. It was a bad call to copy the helper so the two PRs could merge in any order. Yes, Claude Code wrote most of this; I reviewed and tested it, but I should have caught that. Fixed:
|
5d77de4 to
7e78a90
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
7e78a90 to
b808972
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Binary size comparison: |
|
it has been conflicting for more than 7 days, sorry! please rebase it |
b808972 to
2777364
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
When a read ends inside a UTF-8 character, hold its first bytes back and join them to the next read, so the character is measured once instead of as two invalid bytes of one column each. The check lives in uucore::char_width::incomplete_utf8_suffix so unexpand can share it. Un-ignore test_multibyte_char_split_across_reads and add a portable case where the character straddles the read buffer of a file. Fixes uutils#16503 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a read ends inside a UTF-8 character, hold its first bytes back and join them to the next read, so the character is measured once instead of as two invalid bytes of one column each. Uses the uucore::char_width::incomplete_utf8_suffix helper added for expand. Un-ignore test_multibyte_char_split_across_reads and add a portable case where the character straddles the read buffer of a file. Fixes uutils#16504 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2777364 to
cea2056
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Fixes #16504
Same problem as
expand(#16503, fixed in #16512): when a read ends inside a UTF-8 character,unexpand_bufsees the lead byte at the end of one buffer and the continuation byte at the start of the next, and counts each as an invalid byte one column wide.éthen takes two columns, soé+ 7 spaces +zwith-agivesé\t zinstead ofé\tz.unexpand_inputnow holds back the last 1-3 bytes of a buffer when they begin a sequence the buffer cuts short (UTF-8 mode only), and joins them to the next read. The join only allocates when there is something to carry. If the input ends inside a character, the held bytes are written as before. The per-line loop moved into a smallunexpand_lineshelper so the leftover can go through the same path.incomplete_utf8_suffixis the same helper as in #16512. I kept a copy in each crate so the two PRs are independent; once both land I can move it touucore::char_widthin a follow-up if you prefer.Tests:
test_multibyte_char_split_across_read_buffers: 8191 ASCII bytes, thené, 8 spaces andz, with-a, soéis split by the 8 KiB read buffer. It fails onmain(\t z) and passes with the fix. This is a portable version of thecmd_shell+sleeptest in Add as ignored some failing tests found by oss scanner #16493.test_file_ending_inside_a_multibyte_char: a file ending in a lone\xC3keeps its bytes (passes before and after).incomplete_utf8_suffix.cargo test --no-default-features --features unexpand --test tests -- test_unexpand::passes (60), as doescargo test -p uu_unexpand.cargo clippy -p uu_unexpand --all-targets -- -D warningsand rustfmt are clean.AI disclosure: written with help from Claude Code. Nothing was derived from GNU source.
🤖 Generated with Claude Code