Skip to content

uucore: translate! UIoError error messages, reduce error message duplication - #13680

Open
RenjiSann wants to merge 5 commits into
uutils:mainfrom
RenjiSann:l10n-uioerror
Open

uucore: translate! UIoError error messages, reduce error message duplication#13680
RenjiSann wants to merge 5 commits into
uutils:mainfrom
RenjiSann:l10n-uioerror

Conversation

@RenjiSann

Copy link
Copy Markdown
Collaborator

This is an attempt to fix #11451

@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 8.95%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 6 improved benchmarks
❌ 29 regressed benchmarks
✅ 312 untouched benchmarks
⏩ 46 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation complex_relative_date 314.1 µs 437.6 µs -28.22%
Simulation df_with_path 571.4 µs 707.1 µs -19.18%
Memory factor_multiple_u64s[2] 54.1 KB 66.2 KB -18.3%
Memory hostname_basic 56.3 KB 68.4 KB -17.71%
Memory seq_custom_separator 58.4 KB 70.5 KB -17.17%
Memory wc_lines_extreme_line_lengths[(100000, 200)] 65 KB 77.1 KB -15.7%
Memory nl_many_lines[100000] 66.2 KB 78.3 KB -15.47%
Memory unexpand_many_lines[100000] 67 KB 79.1 KB -15.32%
Memory expand_custom_tabstops[50000] 67 KB 79.1 KB -15.31%
Memory cut_characters_long_lines 69 KB 81.1 KB -14.93%
Memory fold_custom_width[50000] 76 KB 88.1 KB -13.75%
Memory split_numeric_suffix 80.5 KB 92.6 KB -13.07%
Memory df_deep_directory 80.7 KB 92.8 KB -13.04%
Memory join_custom_separator 86 KB 98.1 KB -12.34%
Memory cksum_multiple_files 91.2 KB 103.3 KB -11.72%
Memory tee_stdin_file[10000000] 69.7 KB 78.7 KB -11.48%
Memory rm_recursive_tree 98 KB 110.1 KB -11%
Simulation hostname_basic 332.7 µs 371.8 µs -10.52%
Memory timer_expiry_latency[0.001] 79.9 KB 88.9 KB -10.17%
Memory cat_default[10000] 81.4 KB 89.9 KB -9.49%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing RenjiSann:l10n-uioerror (fab1573) with main (21d4e96)

Open in CodSpeed

Footnotes

  1. 46 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.

@RenjiSann

Copy link
Copy Markdown
Collaborator Author

Well, that's some nasty performance regression

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/tail-n0f (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!

@RenjiSann

Copy link
Copy Markdown
Collaborator Author

For some reason I don't get, translate!() in uucore in the du binary is broken 🤔

@RenjiSann
RenjiSann force-pushed the l10n-uioerror branch 2 times, most recently from c178883 to ea01d67 Compare August 4, 2026 11:30
error-invalid-argument = Argument invalide
error-is-a-directory = { $file }: Est un répertoire

uio-err-not-found = Aucun fichier ou répertoire de ce type

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just don't put the id then

Comment thread src/uu/du/src/du.rs Outdated
print_tx.send(Err(std::io::Error::new(
std::io::ErrorKind::InvalidData,
print_tx.send(Err(std::io::Error::other(
"Too many levels of symbolic links",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line too i guess :)

// and we want to strip the "(os error X)" suffix.
match self.inner.kind() {
NotFound => "No such file or directory",
PermissionDenied => "Permission denied",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oups

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I get this one 😅

@RenjiSann
RenjiSann force-pushed the l10n-uioerror branch 3 times, most recently from 7f5e6bf to fdbdd4a Compare August 4, 2026 14:32
@RenjiSann

RenjiSann commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

I introduced a new dev dependency two_rusty_fork, which allows to run tests in separate processes.
I think it's better to use that than to complexify locale.rs even further for the sake of tests conflicting with each other.

I'm considering splitting the work into 2 separate PRs, wdyt @sylvestre ?

@RenjiSann
RenjiSann marked this pull request as ready for review August 4, 2026 14:34
@sylvestre

Copy link
Copy Markdown
Contributor

i am fine in this pr, i am more worried about the perf impact :)

@RenjiSann

Copy link
Copy Markdown
Collaborator Author

i am more worried about the perf impact :)

Yep, as do I. not sure how we can avoid it though. Do you happen to know why fluent_bundle can't be passed between threads ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UIoError messages are not translated

2 participants