Skip to content
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

Merged
merged 1 commit into from
Mar 10, 2025
Merged

std: move stdio to sys #136780

merged 1 commit into from
Mar 10, 2025

Conversation

joboet
Copy link
Member

@joboet joboet commented Feb 9, 2025

As per #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.

@rustbot
Copy link
Collaborator

rustbot commented Feb 9, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 9, 2025
@rust-log-analyzer

This comment has been minimized.

@@ -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;
Copy link
Contributor

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 };

Copy link
Member Author

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?

Copy link
Contributor

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! :) 👍

Copy link
Contributor

@thaliaarchi thaliaarchi left a 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.

@bors
Copy link
Contributor

bors commented Feb 15, 2025

☔ The latest upstream changes (presumably #137046) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Feb 17, 2025

☔ The latest upstream changes (presumably #137163) made this pull request unmergeable. Please resolve the merge conflicts.

@Amanieu
Copy link
Member

Amanieu commented Feb 18, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Feb 18, 2025

📌 Commit a1a2a46 has been approved by Amanieu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 18, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2025
…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
@thaliaarchi
Copy link
Contributor

The merge conflict is with #120580.

@bors
Copy link
Contributor

bors commented Feb 20, 2025

☔ The latest upstream changes (presumably #137290) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 20, 2025
@bors
Copy link
Contributor

bors commented Mar 7, 2025

⌛ Testing commit 489e9c4 with merge 196b752...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 7, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 7, 2025
@bors
Copy link
Contributor

bors commented Mar 7, 2025

☔ The latest upstream changes (presumably #138155) made this pull request unmergeable. Please resolve the merge conflicts.

@thaliaarchi
Copy link
Contributor

The past two runs were both spurious failures on x86_64-msvc-1: failing to open a file while linking (in rollup #138146) and failing to create a temp dir (ran alone).

@rustbot label +CI-spurious-fail-msvc

@rustbot
Copy link
Collaborator

rustbot commented Mar 7, 2025

Error: Label CI-spurious-fail-msvc can only be set by Rust team members

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

@jieyouxu
Copy link
Member

jieyouxu commented Mar 8, 2025

Unfortunately needs a rebase.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 8, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 8, 2025
…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-*`.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
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.
@workingjubilee
Copy link
Member

@bors r=Amanieu

@bors
Copy link
Contributor

bors commented Mar 10, 2025

📌 Commit c52e059 has been approved by Amanieu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 10, 2025
@workingjubilee
Copy link
Member

@bors p=10

@bors
Copy link
Contributor

bors commented Mar 10, 2025

⌛ Testing commit c52e059 with merge 2c6a12e...

@bors
Copy link
Contributor

bors commented Mar 10, 2025

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 2c6a12e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 10, 2025
@bors bors merged commit 2c6a12e into rust-lang:master Mar 10, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 10, 2025
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

gh pr comment ${HEAD_PR} -F output.log
shell: /usr/bin/bash -e {0}
##[endgroup]
fatal: ambiguous argument 'HEAD^1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
##[error]Process completed with exit code 128.
Post job cleanup.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2c6a12e): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 778.705s -> 778.298s (-0.05%)
Artifact size: 365.15 MiB -> 365.18 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-spurious-fail-msvc CI spurious failure: target env msvc merged-by-bors This PR was explicitly merged by bors. O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.