fix(pr): error messages to align with gnu#13231
Closed
HackingRepo wants to merge 6 commits into
Closed
Conversation
oech3
reviewed
Jun 30, 2026
Contributor
Author
|
oh one test is failing [34](https://github.com/uutils/coreutils/actions/runs/28441034874/job/84278985695?pr=13231#step:8:4735)
failures:
---- test_pr::test_file_not_found_error_message stdout ----
bin: "D:\\a\\coreutils\\coreutils\\target\\debug\\coreutils.exe"
run: D:\a\coreutils\coreutils\target\debug\coreutils.exe pr aha
thread 'test_pr::test_file_not_found_error_message' (9160) panicked at tests\by-util\test_pr.rs:1028:10:
assertion failed: `(left == right)`
Diff < left / right > :
<pr: aha: The system cannot find the file specified.
>pr: aha: No such file or directory
stack backtrace:
0: std::panicking::panic_handler
at /rustc/ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96/library\std\src\panicking.rs:689
1: core::panicking::panic_fmt
at /rustc/ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96/library\core\src\panicking.rs:80
2: uutests::util::CmdResult::stderr_is<ref$<str$> >
at .\tests\uutests\src\lib\util.rs:647
3: tests::test_pr::test_file_not_found_error_message
at .\tests\by-util\test_pr.rs:1028
4: tests::test_pr::test_file_not_found_error_message::closure$0
at .\tests\by-util\test_pr.rs:1024
5: core::ops::function::FnOnce::call_once<tests::test_pr::test_file_not_found_error_message::closure_env$0,tuple$<> >
at /rustc/ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96/library\core\src\ops\function.rs:250
6: core::ops::function::FnOnce::call_once
at /rustc/ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96/library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. |
|
GNU testsuite comparison: |
Contributor
Author
|
ok the issue with windows, linux and unix tests passing only windows tests failing |
xtqqczze
reviewed
Jul 2, 2026
Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Contributor
Author
|
the one failing job gnu tests just about network issues curl: (56) Recv failure: Connection reset by peerand unrelated to the pr |
xtqqczze
reviewed
Jul 18, 2026
|
|
||
| // New variant that correctly formats the file path error like GNU pr | ||
| #[error("pr: {path}: {msg}")] | ||
| Path { path: String, msg: String }, |
Contributor
There was a problem hiding this comment.
I’d prefer to preserve the original types here rather than converting them eagerly. Something like:
Suggested change
| Path { path: String, msg: String }, | |
| Path { path: Path, msg: io:Error }, |
and then perform the formatting in the #[error] attribute
xtqqczze
reviewed
Jul 18, 2026
Contributor
|
Superceded by #13534 . Anyway, thanks for the PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13013