Skip to content

numfmt: diagnose write errors instead of panicking - #14715

Merged
sylvestre merged 2 commits into
uutils:mainfrom
sylvestre:gnu912-numfmt-write-error
Sep 21, 2026
Merged

sylvestre merged 2 commits into
uutils:mainfrom
sylvestre:gnu912-numfmt-write-error

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 19, 2026 09:51

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sylvestre
sylvestre force-pushed the gnu912-numfmt-write-error branch from e9ae345 to 02b4cab Compare September 19, 2026 10:26
Copilot AI review requested due to automatic review settings September 19, 2026 10:26

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

/// What can go wrong while writing a formatted line: either the line itself is
/// not convertible (which `--invalid` decides what to do with), or the output
/// could not be written at all (which is always fatal).
pub enum WriteError {

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.

We could also wrap errors with thiserror as it is done that way in a lot of other utils, or should we do that in a different PR when that one gets merged?

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.

WriteError is internal plumbing, not a reported error - it's never displayed, so a thiserror derive would only add an unused Display. numfmt's reported errors already use thiserror in errors.rs.

Copilot AI review requested due to automatic review settings September 19, 2026 18:24

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cakebaker

Copy link
Copy Markdown
Contributor

The new test fails on macOS and Android.

Copilot AI review requested due to automatic review settings September 21, 2026 08:34
@sylvestre
sylvestre force-pushed the gnu912-numfmt-write-error branch from 7ea48e5 to be203d0 Compare September 21, 2026 08:34

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sylvestre
sylvestre enabled auto-merge (rebase) September 21, 2026 08:58
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/shuf/shuf is no longer failing!

/dev/full does not exist on OpenBSD, macOS or Android, so opening it
fails with EACCES and the test panics.
Copilot AI review requested due to automatic review settings September 21, 2026 12:05

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sylvestre
sylvestre merged commit 5eb255f into uutils:main Sep 21, 2026
151 of 193 checks passed
@sylvestre
sylvestre deleted the gnu912-numfmt-write-error branch October 8, 2026 13:35
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.

4 participants