-
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
Add missing methods to unix ExitStatusExt #79982
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
r? @dtolnay -- needs T-libs decision on the general direction. I am also not familiar enough with the details of signals and such to know whether this is correct (and my quick manpage investigation is not feeling too productive). I did flag a concern that this is extending a non-sealed stable extension trait. I forget if we've previously decided that's acceptable, but I presume that would be a breaking change. |
This broke async-std in #77089, so I would expect this is a no go for that reason alone :/ |
Urgh. It hadn't occurred to me that anyone would implement this for their own types. ISTM that not making this trait sealed was a serious mistake. Given where we are now, I think our options are:
I think 3 is clearly unacceptable given the fact that, currently, this type is missing at the very least the absolutely necessary access to
Sealing the trait may or may not be disruptive. If a crater run would suffice, it could be run on this branch as-is, since adding methods will break all other implementors. In defence of the idea of retrospectively sealing |
A crater run seems like a good idea to me, but we should probably get feedback from T-libs that this is functionality they want to add first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am on board with these. Please file a tracking issue and we can figure out how to land them.
I don't think a crater run is necessarily worth it for this. If someone has a quick way to grep all crates for the string ExitStatusExt for
we can do that but otherwise I'm comfortable enough with https://github.com/search?l=Rust&o=desc&q=%22ExitStatusExt+for%22&s=indexed&type=Code showing no results outside std. I think we can land this and listen for reported breakage, and leave it to the first beta crater run to measure fallout.
However I'd like for both ExitStatusExt traits to be changed to sealed in the same PR.
The job Click to see the possible cause of the failure (guessed by this bot)
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
This comment has been minimized.
This comment has been minimized.
@rustbot modify labels -S-waiting-on-review +S-waiting-on-author |
Hi again. Sorry for the flail on this branch while I tried to get the CI to tell my my syntax errors :-). Worked better when I did it locally. I think this is all sorted now, and I have squashed it a bit and rebased onto current master. NB: I made the new trait Thanks. @rustbot modify labels -S-waiting-on-author +S-waiting-on-review |
@ijackson: 🔑 Insufficient privileges: not in try users |
@rustbot modify labels -S-waiting-on-author +S-waiting-on-review |
@dtolnay would you mind re-reviewing? You might want to look at my "fix fuchsia" commit in particular since the situation is suboptimal to start with and I had to make some ... decisions. As regards the build failure, I did a local "./x.py check" targeting fuchsia which found the original build failure as detected by bors and have checked that this commit fixes it. |
@bors r+ |
📌 Commit a8d0161 has been approved by |
I added a note in the tracking issue to run this by a Fuchsia dev prior to stabilization. |
Add missing methods to unix ExitStatusExt These are the methods corresponding to the remaining exit status examination macros from `wait.h`. `WCOREDUMP` isn't in SuS but is it is very standard. I have not done portability testing to see if this builds everywhere, so I may need to Do Something if it doesn't. There is also a bugfix and doc improvement to `.signal()`, and an `.into_raw()` accessor. This would fix rust-lang#73128 and fix rust-lang#73129. Please let me know if you like this direction, and if so I will open the tracking issue and so on. If this MR goes well, I may tackle rust-lang#73125 next - I have an idea for how to do it.
Add missing methods to unix ExitStatusExt These are the methods corresponding to the remaining exit status examination macros from `wait.h`. `WCOREDUMP` isn't in SuS but is it is very standard. I have not done portability testing to see if this builds everywhere, so I may need to Do Something if it doesn't. There is also a bugfix and doc improvement to `.signal()`, and an `.into_raw()` accessor. This would fix rust-lang#73128 and fix rust-lang#73129. Please let me know if you like this direction, and if so I will open the tracking issue and so on. If this MR goes well, I may tackle rust-lang#73125 next - I have an idea for how to do it.
Rollup of 17 pull requests Successful merges: - rust-lang#79982 (Add missing methods to unix ExitStatusExt) - rust-lang#80017 (Suggest `_` and `..` if a pattern has too few fields) - rust-lang#80169 (Recommend panic::resume_unwind instead of panicking.) - rust-lang#80217 (Add a `std::io::read_to_string` function) - rust-lang#80444 (Add as_ref and as_mut methods for Bound) - rust-lang#80567 (Add Iterator::intersperse_with) - rust-lang#80829 (Get rid of `DepConstructor`) - rust-lang#80895 (Fix handling of malicious Readers in read_to_end) - rust-lang#80966 (Deprecate atomic::spin_loop_hint in favour of hint::spin_loop) - rust-lang#80969 (Use better ICE message when no MIR is available) - rust-lang#80972 (Remove unstable deprecated Vec::remove_item) - rust-lang#80973 (Update books) - rust-lang#80980 (Fixed incorrect doc comment) - rust-lang#80981 (Fix -Cpasses=list and llvm version print with -vV) - rust-lang#80985 (Fix stabilisation version of slice_strip) - rust-lang#80990 (llvm: Remove the unused context from CreateDebugLocation) - rust-lang#80991 (Fix formatting specifiers doc links) Failed merges: - rust-lang#80944 (Use Option::map_or instead of `.map(..).unwrap_or(..)`) r? `@ghost` `@rustbot` modify labels: rollup
…aahc Stabilise unix_process_wait_more, extra ExitStatusExt methods This stabilises the feature `unix_process_wait_more`. Tracking issue rust-lang#80695, FCP needed. This was implemented in rust-lang#79982 and merged in January.
…aahc Stabilise unix_process_wait_more, extra ExitStatusExt methods This stabilises the feature `unix_process_wait_more`. Tracking issue rust-lang#80695, FCP needed. This was implemented in rust-lang#79982 and merged in January.
…aahc Stabilise unix_process_wait_more, extra ExitStatusExt methods This stabilises the feature `unix_process_wait_more`. Tracking issue rust-lang#80695, FCP needed. This was implemented in rust-lang#79982 and merged in January.
These are the methods corresponding to the remaining exit status examination macros from
wait.h
.WCOREDUMP
isn't in SuS but is it is very standard. I have not done portability testing to see if this builds everywhere, so I may need to Do Something if it doesn't.There is also a bugfix and doc improvement to
.signal()
, and an.into_raw()
accessor.This would fix #73128 and fix #73129. Please let me know if you like this direction, and if so I will open the tracking issue and so on.
If this MR goes well, I may tackle #73125 next - I have an idea for how to do it.