-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExitStatus: print "exit status: {}" rather than "exit code: {}" on unix #83462
Conversation
Proper Unix terminology is "exit status" (vs "wait status"). "exit code" is imprecise on Unix and therefore unclear. (As far as I can tell, "exit code" is correct terminology on Windows.) This new wording is unfortunately inconsistent with the identifier names in the Rust stdlib. It is the identifier names that are wrong, as discussed at length in eg https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html Unfortunately for API stability reasons it would be a lot of work, and a lot of disruption, to change the names in the stdlib (eg to rename `std::process::ExitStatus` to `std::process::ChildStatus` or something), but we should fix the message output. Many (probably most) readers of these messages about exit statuses will be users and system administrators, not programmers, who won't even know that Rust has this wrong terminology. So I think the right thing is to fix the documentation (as I have already done) and, now, the terminology in the implementation. This is a user-visible change to the behaviour of all Rust programs which run Unix subprocesses. Hopefully no-one is matching against the exit status string, except perhaps in tests. Signed-off-by: Ian Jackson <[email protected]>
r? @sfackler (rust-highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
📌 Commit 11e40ce has been approved by |
…, r=joshtriplett ExitStatus: print "exit status: {}" rather than "exit code: {}" on unix Proper Unix terminology is "exit status" (vs "wait status"). "exit code" is imprecise on Unix and therefore unclear. (As far as I can tell, "exit code" is correct terminology on Windows.) This new wording is unfortunately inconsistent with the identifier names in the Rust stdlib. It is the identifier names that are wrong, as discussed at length in eg https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html Unfortunately for API stability reasons it would be a lot of work, and a lot of disruption, to change the names in the stdlib (eg to rename `std::process::ExitStatus` to `std::process::ChildStatus` or something), but we should fix the message output. Many (probably most) readers of these messages about exit statuses will be users and system administrators, not programmers, who won't even know that Rust has this wrong terminology. So I think the right thing is to fix the documentation (as I have already done) and, now, the terminology in the implementation. This is a user-visible change to the behaviour of all Rust programs which run Unix subprocesses. Hopefully no-one is matching against the exit status string, except perhaps in tests.
failed in rollup |
@bors r- |
"exit code" is wrong terminology on Unix. I am trying to fix this in Rust stdlib in rust-lang/rust#83462 but this currently breaks the cargo test suite. See that MR for full explanation of the change. Signed-off-by: Ian Jackson <[email protected]>
I'm fixing the test in @rustbot modify labels +relnotes |
Error: Label relnotes can only be set by Rust team members Please let |
tests: Tolerate "exit status" in error messages "exit code" is wrong terminology on Unix. I am trying to fix this in Rust stdlib in rust-lang/rust#83462 but this currently breaks the cargo test suite. See that MR for full explanation of the change.
@joshtriplett Thanks for getting rust-lang/cargo#9307 merged so quickly! Do you know whether the rust-lang CI tests use cargo main branch, or if I need to wait for the cargo change to be released or something? |
I believe this will require updating the cargo submodule. I don't know the policy for doing mid-cycle updates for something like this. cc @ehuss |
There's an update in-flight (#83418) that was blocked. I'll look at moving it forward today without RLS. |
@bors r=joshtriplett |
📌 Commit 11e40ce has been approved by |
…, r=joshtriplett ExitStatus: print "exit status: {}" rather than "exit code: {}" on unix Proper Unix terminology is "exit status" (vs "wait status"). "exit code" is imprecise on Unix and therefore unclear. (As far as I can tell, "exit code" is correct terminology on Windows.) This new wording is unfortunately inconsistent with the identifier names in the Rust stdlib. It is the identifier names that are wrong, as discussed at length in eg https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html Unfortunately for API stability reasons it would be a lot of work, and a lot of disruption, to change the names in the stdlib (eg to rename `std::process::ExitStatus` to `std::process::ChildStatus` or something), but we should fix the message output. Many (probably most) readers of these messages about exit statuses will be users and system administrators, not programmers, who won't even know that Rust has this wrong terminology. So I think the right thing is to fix the documentation (as I have already done) and, now, the terminology in the implementation. This is a user-visible change to the behaviour of all Rust programs which run Unix subprocesses. Hopefully no-one is matching against the exit status string, except perhaps in tests.
…, r=joshtriplett ExitStatus: print "exit status: {}" rather than "exit code: {}" on unix Proper Unix terminology is "exit status" (vs "wait status"). "exit code" is imprecise on Unix and therefore unclear. (As far as I can tell, "exit code" is correct terminology on Windows.) This new wording is unfortunately inconsistent with the identifier names in the Rust stdlib. It is the identifier names that are wrong, as discussed at length in eg https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html Unfortunately for API stability reasons it would be a lot of work, and a lot of disruption, to change the names in the stdlib (eg to rename `std::process::ExitStatus` to `std::process::ChildStatus` or something), but we should fix the message output. Many (probably most) readers of these messages about exit statuses will be users and system administrators, not programmers, who won't even know that Rust has this wrong terminology. So I think the right thing is to fix the documentation (as I have already done) and, now, the terminology in the implementation. This is a user-visible change to the behaviour of all Rust programs which run Unix subprocesses. Hopefully no-one is matching against the exit status string, except perhaps in tests.
Rollup of 10 pull requests Successful merges: - rust-lang#79399 (Use detailed and shorter fs error explaination) - rust-lang#83348 (format macro argument parsing fix) - rust-lang#83462 (ExitStatus: print "exit status: {}" rather than "exit code: {}" on unix) - rust-lang#83526 (lazily calls some fns) - rust-lang#83558 (Use DebugStruct::finish_non_exhaustive() in std.) - rust-lang#83559 (Fix Debug implementation for RwLock{Read,Write}Guard.) - rust-lang#83560 (Derive Debug for io::Chain instead of manually implementing it.) - rust-lang#83561 (Improve Debug implementations of Mutex and RwLock.) - rust-lang#83567 (Update rustup cross-compilation docs link) - rust-lang#83569 (Add regression tests for rust-lang#56445) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
tests: Tolerate "exit status" in error messages "exit code" is wrong terminology on Unix. I am trying to fix this in Rust stdlib in rust-lang/rust#83462 but this currently breaks the cargo test suite. See that MR for full explanation of the change.
Going to untag this as relnotes, as the stability of |
Proper Unix terminology is "exit status" (vs "wait status"). "exit
code" is imprecise on Unix and therefore unclear. (As far as I can
tell, "exit code" is correct terminology on Windows.)
This new wording is unfortunately inconsistent with the identifier
names in the Rust stdlib.
It is the identifier names that are wrong, as discussed at length in eg
https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html
https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html
Unfortunately for API stability reasons it would be a lot of work, and
a lot of disruption, to change the names in the stdlib (eg to rename
std::process::ExitStatus
tostd::process::ChildStatus
orsomething), but we should fix the message output. Many (probably
most) readers of these messages about exit statuses will be users and
system administrators, not programmers, who won't even know that Rust
has this wrong terminology.
So I think the right thing is to fix the documentation (as I have
already done) and, now, the terminology in the implementation.
This is a user-visible change to the behaviour of all Rust programs
which run Unix subprocesses. Hopefully no-one is matching against the
exit status string, except perhaps in tests.