Skip to content

Conversation

@mattsu2020
Copy link
Contributor

@mattsu2020 mattsu2020 commented Dec 29, 2025

Added localized warning messages in en-US.ftl for various sort command issues, including obsolescent key formats, ignored options, and locale-related warnings. Implemented LegacyKeyWarning struct and GlobalOptionFlags in sort.rs to detect deprecated key syntax (e.g., +field -field) and suggest modern -k replacements, improving user guidance and compatibility.

fix
sort/sort-debug-warn.sh

Added localized warning messages in en-US.ftl for various sort command issues, including obsolescent key formats, ignored options, and locale-related warnings. Implemented LegacyKeyWarning struct and GlobalOptionFlags in sort.rs to detect deprecated key syntax (e.g., +field -field) and suggest modern -k replacements, improving user guidance and compatibility.
Removes the unused `stable` and `unique` boolean fields from the GlobalOptionFlags struct and their initialization in the impl block, simplifying the code by eliminating redundant options.
@github-actions
Copy link

GNU testsuite comparison:

Note: The gnu test tests/id/smack was skipped on 'main' but is now failing.
Note: The gnu test tests/mkdir/smack-no-root was skipped on 'main' but is now failing.
Note: The gnu test tests/mkdir/smack-root was skipped on 'main' but is now failing.
Previously, sort mode flags were mutually exclusive, preventing users from specifying more than one mode. This change removes the conflicts to enable combining sort options for more flexible sorting behavior.
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 29, 2025

CodSpeed Performance Report

Merging #9900 will not alter performance

Comparing mattsu2020:sort/sort-debug-warn.sh (ea1bfcd) with main (1e11921)

Summary

✅ 136 untouched
⏩ 24 skipped1

Footnotes

  1. 24 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tty/tty-eof. tests/tty/tty-eof is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
@sylvestre
Copy link
Contributor

thanks. It needs some tests

@sylvestre
Copy link
Contributor

also, please have a look on the perf regression - -4.52% is quite high

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
- Update LegacyKeyWarning struct to include arg_index and make key_index optional
- Modify preprocess_legacy_args to set arg_index instead of key_index during parsing
- Add index_legacy_warnings function to compute key_index after arg processing
- Adjust emit_debug_warnings to match updated key_index type
- This ensures accurate indexing for legacy key warnings in sort utility
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tty/tty-eof. tests/tty/tty-eof is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
- Introduce `starts_with_plus` function to check for arguments starting with '+' in a platform-specific manner
- Modify `parse_sort_arguments` to detect and process legacy sort keys, enabling proper handling of deprecated options with warnings
- This ensures backward compatibility for users relying on old sort syntax while guiding migration to modern flags
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tty/tty-eof. tests/tty/tty-eof is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/shuf/shuf-reservoir. tests/shuf/shuf-reservoir is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/sort/sort-stale-thread-mem. tests/sort/sort-stale-thread-mem is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
@github-actions
Copy link

github-actions bot commented Jan 1, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
Remove intermediate vector creation in preprocess_legacy_args and streamline the handling of legacy '+' prefixed arguments to improve efficiency and readability without altering functionality. Additionally, refactor uumain to directly index legacy warnings when present.
@github-actions
Copy link

github-actions bot commented Jan 1, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
Congrats! The gnu test tests/tail/follow-name is no longer failing!
…g args

Move output file creation and argument setup outside benchmark loops in sort_locale_utf8_bench.rs to avoid measuring initialization time in each iteration, ensuring accurate performance measurements for sorting operations.
@github-actions
Copy link

github-actions bot commented Jan 1, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/shuf/shuf-reservoir is no longer failing!
Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
Congrats! The gnu test tests/sort/sort-stale-thread-mem is no longer failing!
@github-actions
Copy link

github-actions bot commented Jan 1, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/shuf/shuf-reservoir is no longer failing!
Congrats! The gnu test tests/sort/sort-debug-warn is no longer failing!
Congrats! The gnu test tests/sort/sort-stale-thread-mem is no longer failing!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants