Conversation
|
GNU testsuite comparison: |
d468737 to
8ab9b62
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
828477d to
95b0ea3
Compare
95b0ea3 to
9fe5d79
Compare
|
Binary size comparison: |
9fe5d79 to
d14f018
Compare
|
Would you mind taking a look when convenient? Thanks! |
| if let Some((prog, err)) = compress_prog_error { | ||
| let _ = writeln!( | ||
| stderr(), | ||
| "sort: could not run compress program '{prog}': {}", |
There was a problem hiding this comment.
Please use the translate macro
| "nonexistent-program", | ||
| "-S", | ||
| "10", | ||
| "1K", |
d14f018 to
a97b03b
Compare
d077b2a to
03ee9d6
Compare
03ee9d6 to
32a1dae
Compare
32a1dae to
596981d
Compare
596981d to
1b214b2
Compare
1b214b2 to
f936598
Compare
f936598 to
25b047d
Compare
25b047d to
ba7cfef
Compare
ba7cfef to
ac8524a
Compare
ac8524a to
c4a433d
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 3
Open (4)
Emitting the warning viashow_error!from the reader/writer thread can cause non-deterministic… · New Emitting the warning viashow_error!from the reader/writer thread can cause non-deterministic… · New The assertion.stderr_contains(\"Is a directory\")is potentially brittle across… · New This relies onext_sort.txtbeing large enough to exceed the in-memory threshold (effectively the… · New
| #[allow(clippy::too_many_arguments)] | ||
| fn read_write_loop<I: WriteableTmpFile>( | ||
| mut files: impl Iterator<Item = UResult<Box<dyn Read + Send>>>, | ||
| tmp_dir: &mut TmpDirWrapper, | ||
| separator: u8, | ||
| buffer_size: usize, | ||
| settings: &GlobalSettings, | ||
| compress_prog_error: Option<(String, std::io::Error)>, | ||
| receiver: &Receiver<Chunk>, | ||
| sender: SyncSender<Chunk>, | ||
| ) -> UResult<ReadResult<I>> { |
| // The input did not fit into the first two in-memory chunks. | ||
| if let Some((prog, err)) = compress_prog_error { | ||
| show_error!( | ||
| "{}", | ||
| translate!( | ||
| "sort-compress-prog-execution-failed", | ||
| "prog" => prog, | ||
| "error" => strip_errno(&err) | ||
| ) | ||
| ); | ||
| } |
| ucmd.args(&["--compress-program=nonexistent", "input", "directory"]) | ||
| .fails_with_code(2) | ||
| .no_stdout() | ||
| .stderr_contains("Is a directory") |
| // Force external sorting by using 1K buffer size so ext_sort.txt spills to disk | ||
| "-S", | ||
| "10", | ||
| "1K", |
c4a433d to
8b27135
Compare


Fixes #13148.
Defer reporting compression program errors until external sorting is required, allowing earlier input errors to be reported without an unrelated compression warning.