Skip to content

base32, base64, basenc: drop the "error: " from the invalid-input message - #14396

Open
Socialpranker wants to merge 1 commit into
uutils:mainfrom
Socialpranker:base-drop-error-prefix
Open

Socialpranker wants to merge 1 commit into
uutils:mainfrom
Socialpranker:base-drop-error-prefix

Conversation

@Socialpranker

@Socialpranker Socialpranker commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Drop the literal error: from the invalid-input message; uucore already prints the program name, and GNU says just invalid input:

$ printf 'not base64!' | base64 -d
base64: invalid input           # GNU
base64: error: invalid input    # uutils before

The messages are localised now (base-common-invalid-input, encoding-error-invalid-input*). The partial-output difference is #6008, not touched here.

Prepared with AI assistance (Claude Opus 5, via Claude Code).

@Socialpranker

Copy link
Copy Markdown
Contributor Author

Pushed one more commit: util/build-gnu.sh patched tests/basenc/basenc.pl to add error: to the upstream expectation, so that sed is now obsolete and removed — the GNU test expects what uutils prints.

For the record, the one red job here (Build (ubuntu-latest, i686-unknown-linux-gnu, …)) is test_numfmt::test_unit_hyphen_leading_as_separate_arg panicking on failed to write to stdin of child: Broken pipe — a test-harness race in an unrelated utility, not something this change can reach.

@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)

@anastygnome

Copy link
Copy Markdown
Contributor

Could you please squash your commits ? Thanks

@anastygnome anastygnome left a comment •

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 should be localised as done in other utils

} else if ignore_garbage {
continue;
} else {
return Err(USimpleError::new(1, "error: invalid input"));

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.

SHould be localised

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Localised as base-common-invalid-input in base_common.rs/.ftl, sha a8d7da6.

if !input.len().is_multiple_of(4) {
return Err(USimpleError::new(
1,
"error: invalid input (length must be multiple of 4 characters)",

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.

should be localised too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Localised as encoding-error-invalid-input/encoding-error-invalid-input-z85-length in uucore/encoding.rs/.ftl, sha a8d7da6.

@Socialpranker

Copy link
Copy Markdown
Contributor Author

Squashed to a single commit, sha a8d7da6.

@codspeed

codspeed Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 13.49%

⚠️ 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

⚡ 3 improved benchmarks
❌ 10 regressed benchmarks
✅ 384 untouched benchmarks
⏩ 54 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Memory dd_copy_default 19.7 KB 28.4 KB -30.7%
❌ Memory dd_copy_4k_blocks 23 KB 31.7 KB -27.47%
❌ Memory dd_copy_partial 23 KB 31.8 KB -27.46%
❌ Memory dd_copy_with_skip 23.3 KB 32 KB -27.21%
❌ Memory dd_copy_with_seek 23.3 KB 32 KB -27.21%
❌ Memory dd_copy_8k_blocks 27 KB 35.7 KB -24.39%
❌ Memory dd_copy_64k_blocks 83 KB 91.7 KB -9.5%
❌ Memory dd_copy_separate_blocks 184.9 KB 194.7 KB -5.03%
❌ Simulation hostname_ip_lookup[100000] 167.4 µs 174.9 µs -4.3%
❌ Simulation mv_single_file 146.6 ms 152.2 ms -3.66%
⚡ Simulation five_38_bit_primes 1.9 s 1.7 s +16.68%
⚡ Simulation three_39_bit_primes 620.5 ms 568.5 ms +9.15%
⚡ Simulation thirteen_39_bit_primes 8.9 s 8.6 s +3.11%

Tip

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


Comparing Socialpranker:base-drop-error-prefix (fd29c57) with main (f56fe41)

Open in CodSpeed

Footnotes

  1. 54 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. ↩

@anastygnome

Copy link
Copy Markdown
Contributor

Flaky CI

@xtqqczze

Copy link
Copy Markdown
Collaborator

This seems a bit over-documented for such a trivial wording-only change.

@Socialpranker
Socialpranker force-pushed the base-drop-error-prefix branch from a8d7da6 to 4dd23b9 Compare October 1, 2026 12:28
…sage

The diagnostic already carries the program name, so the extra literal
made it read "base64: error: invalid input" where GNU writes
"base64: invalid input".
@sylvestre
sylvestre force-pushed the base-drop-error-prefix branch from 4dd23b9 to fd29c57 Compare October 4, 2026 17:16
@codspeed

codspeed Bot commented Oct 4, 2026

Copy link
Copy Markdown

Unable to generate the flame graphs

The performance report has correctly been generated, but there was an internal error while generating the flame graphs for this run. We're working on fixing the issue. Feel free to contact us on Discord or at support@codspeed.io if the issue persists.

@Socialpranker

Copy link
Copy Markdown
Contributor Author

fair, cut the description down

This branch has not been deployed

No deployments
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.

3 participants