-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
std: move stdio to sys
#136780
std: move stdio to sys
#136780
Conversation
This comment has been minimized.
This comment has been minimized.
5ebfcb1
to
65f4376
Compare
@@ -89,7 +96,7 @@ impl io::Write for Stderr { | |||
} | |||
|
|||
pub fn is_ebadf(err: &io::Error) -> bool { | |||
err.raw_os_error() == Some(libc::EBADF as i32) | |||
err.raw_os_error() == Some(EBADF as i32) | |||
} | |||
|
|||
pub const STDIN_BUF_SIZE: usize = crate::sys::io::DEFAULT_BUF_SIZE; |
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.
Did you mean to change Hermit from pub const STDIN_BUF_SIZE: usize = 128;
to DEFAULT_BUF_SIZE
?
pub const DEFAULT_BUF_SIZE: usize = if cfg!(target_os = "espidf") { 512 } else { 8 * 1024 };
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.
No, I didn't. Whoops! 😄 Though maybe that isn't too bad a thing anyway, @mkroening?
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.
Yeah, that sounds sensible to me, thanks! :) 👍
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'm not an official reviewer, but having been working in this area recently, this looks good to me.
☔ The latest upstream changes (presumably #137046) made this pull request unmergeable. Please resolve the merge conflicts. |
65f4376
to
9c737e0
Compare
☔ The latest upstream changes (presumably #137163) made this pull request unmergeable. Please resolve the merge conflicts. |
9c737e0
to
a1a2a46
Compare
@bors r+ |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#120580 (Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants) - rust-lang#132268 (Impl TryFrom<Vec<u8>> for String) - rust-lang#136093 (Match Ergonomics 2024: update old-edition behavior of feature gates) - rust-lang#136344 (Suggest replacing `.` with `::` in more error diagnostics.) - rust-lang#136690 (Use more explicit and reliable ptr select in sort impls) - rust-lang#136815 (CI: Stop /msys64/bin from being prepended to PATH in msys2 shell) - rust-lang#136923 (Lint `#[must_use]` attributes applied to methods in trait impls) - rust-lang#137155 (Organize `OsString`/`OsStr` shims) - rust-lang#137225 (vectorcall ABI: require SSE2) Failed merges: - rust-lang#136780 (std: move stdio to `sys`) r? `@ghost` `@rustbot` modify labels: rollup
The merge conflict is with #120580. |
☔ The latest upstream changes (presumably #137290) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #138155) made this pull request unmergeable. Please resolve the merge conflicts. |
The past two runs were both spurious failures on @rustbot label +CI-spurious-fail-msvc |
Unfortunately needs a rebase. |
…rious, r=compiler-errors Allow anyone to relabel `CI-spurious-*` As suggested by `@Noratrieb` in reference to me attempting to set this label in rust-lang#136780 (comment), allow unauthenticated users to relabel `CI-spurious-*`.
Rollup merge of rust-lang#138184 - thaliaarchi:unauthenticated-ci-spurious, r=compiler-errors Allow anyone to relabel `CI-spurious-*` As suggested by `@Noratrieb` in reference to me attempting to set this label in rust-lang#136780 (comment), allow unauthenticated users to relabel `CI-spurious-*`.
As per rust-lang#117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
@bors r=Amanieu |
@bors p=10 |
☀️ Test successful - checks-actions |
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
Finished benchmarking commit (2c6a12e): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 778.705s -> 778.298s (-0.05%) |
As per #117276, this moves the platform definitions of
Stdout
and friends intosys
. This PR also unifies the UNIX and Hermit implementations and moves the__rust_print_err
function needed by libunwind on SGX into the dedicated module for such helper functions.