Skip to content

[Experiment]: Test EII for RawOsError in core#158116

Draft
bushrat011899 wants to merge 12 commits into
rust-lang:mainfrom
bushrat011899:core_io_raw_os_error_eii
Draft

[Experiment]: Test EII for RawOsError in core#158116
bushrat011899 wants to merge 12 commits into
rust-lang:mainfrom
bushrat011899:core_io_raw_os_error_eii

Conversation

@bushrat011899

@bushrat011899 bushrat011899 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

View all comments

Objective

Checking with CI what kind of issues there may be with using EII for #155625. I'm expecting this to fail on Mac OS and Windows.

Notable Issues

  • No GCC support, and no way to tell at compile time if we're using the GCC backend to cfg it out.
  • core will always be marked as used even if it isn't actually in use because of the EII symbols.
  • Mac OS doesn't yet support defaults for EII.
  • Windows doesn't yet support EII at all.
    • MinGW fails to link in no_std, implying strong symbols work correctly.
    • MSVC seems to work, need to confirm the functions are actually being overridden.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 19, 2026
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 19, 2026
@rust-log-analyzer

This comment has been minimized.

@bushrat011899 bushrat011899 force-pushed the core_io_raw_os_error_eii branch from 8679f7c to cd28cca Compare June 19, 2026 05:02
@rust-log-analyzer

This comment has been minimized.

Seem entirely unrelated to me
@rust-log-analyzer

This comment has been minimized.

Comment thread library/std/src/io/error.rs Outdated

@bjorn3 bjorn3 Jun 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They now fail because libcore implements an EII. Crates that implement an EII are never considered unused as removing them would affect which implementation is picked for an EII or even give an error if there ie no default. That check should probably be changed to ignore the default implementation of an EII.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh ok. I'll update this bodge commit to note this an be a bit more surgical than just outright deleting the tests. Thanks!

@Kobzol

Kobzol commented Jun 19, 2026

Copy link
Copy Markdown
Member

@bors delegate=try

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

✌️ @bushrat011899, you can now perform try builds on this pull request!

You can now post @bors try to start a try build.

@bushrat011899

Copy link
Copy Markdown
Contributor Author

Thank you!

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 19, 2026
[Experiment]: Test EII for `RawOsError` in `core`
@mejrs

mejrs commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

If you turn this into an actual PR can you also ensure eii+stability attributes work properly? I think the implementation supports this but I'm glancing at the test suite and don't see any tests for it.

@bushrat011899

Copy link
Copy Markdown
Contributor Author

If you turn this into an actual PR can you also ensure eii+stability attributes work properly? I think the implementation supports this but I'm glancing at the test suite and don't see any tests for it.

Noted! I suspect this won't be an actual PR for a while. Mac OS and Windows not working isn't too bad since I can fallback to an atomic pointer. But the GCC compatibility isn't something I know how to work around.

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 52ab23a (52ab23a65bcf328fb0c88e0a9c4446d8a7b254de)
Base parent: 8e15021 (8e150217bafcaaaa0c45bf685c55fd56cec48598)

@bushrat011899

Copy link
Copy Markdown
Contributor Author

Linux seems to build fine (as expected). Gonna try Windows now, which will probably fail pretty quickly.

@bors try jobs=dist-x86_64-msvc

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 19, 2026
[Experiment]: Test EII for `RawOsError` in `core`


try-job: dist-x86_64-msvc
@Kobzol

Kobzol commented Jun 19, 2026

Copy link
Copy Markdown
Member

Just note that the dist- jobs generally don't run tests. If you want tests to run, you'll want e.g. x86_64-msvc-[1/2].

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@bors try cancel

Thanks for the pointer! Still getting the hang of things.

@bors try jobs=x86_64-msvc-1,x86_64-msvc-2

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@bors try cancel
@bors try jobs=x86_64-msvc-1,x86_64-msvc-2,aarch64-apple,x86_64-mingw-1,x86_64-mingw-2

@rust-bors

rust-bors Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 20, 2026
[Experiment]: Test EII for `RawOsError` in `core`


try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Comment thread tests/ui/eii/io_in_core_no_std.rs Outdated
Comment thread tests/ui/eii/io_in_core_no_std.rs
@bushrat011899

Copy link
Copy Markdown
Contributor Author

@bors try cancel
@bors try jobs=x86_64-msvc-1,x86_64-msvc-2,aarch64-apple,x86_64-mingw-1,x86_64-mingw-2

@rust-bors

rust-bors Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 20, 2026
[Experiment]: Test EII for `RawOsError` in `core`


try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
@rust-bors

rust-bors Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 44ae5f9 (44ae5f98c964e7b1b6d5fb3494e57a355ad7c805)
Base parent: 8c75e93 (8c75e93c5c7671c29f3e8c096b7acf56822ed23a)

@bushrat011899

Copy link
Copy Markdown
Contributor Author

Gonna try using linkage = "weak" directly for MinGW and Apple.

@bors try jobs=aarch64-apple,x86_64-mingw-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 20, 2026
[Experiment]: Test EII for `RawOsError` in `core`


try-job: aarch64-apple
try-job: x86_64-mingw-1
@rust-log-analyzer

This comment has been minimized.

Comment thread library/std/src/io/error.rs Outdated
@rust-bors

rust-bors Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 5b208ea failed: CI. Failed jobs:

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@bors try jobs=aarch64-apple,x86_64-mingw-1

@rust-bors

rust-bors Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

@bushrat011899: 🔑 Insufficient privileges: not in try users

@Kobzol

Kobzol commented Jun 20, 2026

Copy link
Copy Markdown
Member

Sorry, all delegation was reset today due to some bors implementation changes 😅

@bors delegate try

@rust-bors

rust-bors Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

✌️ @bushrat011899, you can now perform try builds on this pull request!

You can now post @bors try to start a try build.

@bushrat011899

Copy link
Copy Markdown
Contributor Author

All good, thanks for fixing it up! Was worried is hit some limit last night 😅

@bors try jobs=aarch64-apple,x86_64-mingw-1

@rust-bors

rust-bors Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 098045c with merge 9a73571

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/27883022688

rust-bors Bot pushed a commit that referenced this pull request Jun 20, 2026
[Experiment]: Test EII for `RawOsError` in `core`


try-job: aarch64-apple
try-job: x86_64-mingw-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. 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.

6 participants