-
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
Move all sys::ext
modules to os
#84200
Conversation
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
#[cfg(not(doc))] | ||
#[stable(feature = "os", since = "1.0.0")] | ||
pub use imp::*; |
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.
The stability attributes on these re-exports don't affect the stability of the exported items.
This comment has been minimized.
This comment has been minimized.
Not really sure about the error, building for |
It only works if the directory |
(You can add |
Oh I didn't know that could be done, thanks for the suggestion! |
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.
This took some time to review, mostly because the current code (before this change) is a bit hard to follow, which this PR nicely cleans up. Thanks for doing this!
I only have one question:
library/std/src/os/hermit/mod.rs
Outdated
#![allow(missing_docs)] | ||
#![unstable(feature = "hermit_platform", issue = "none")] |
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.
Why did this change?
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.
Oh good catch, that is separate change I was working on that should be excluded from this PR.
(I noticed that hermit
currently exports its extensions as unix
, even though it is not target_os = "unix"
and only contains OsStringExt
(which might be confusing for users expecting e.g. sys::os::unix::fs::FileExt
). I spoke with someone working on Hermit about whether this was intentional; and he said that currently there is no way for hermit
to fully replicate everything in os::unix
and that the plan is to instead move to os::hermit
.)
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.
Excluded 👍🏻
Fully agreed that the code was hard to follow, it took quite some time untangling it all. |
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.
This will fail to merge once your other PR (#84119) is merged into thet main branch, which should happen soon. So I'm waiting with the r+
until the rebase of this one.
☔ The latest upstream changes (presumably #84411) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased and resolved the merge conflicts |
@bors r+ rollup=iffy |
📌 Commit 76e03ac8fdc1b9840e0dc906f9d7c10b2a99bb8e has been approved by |
⌛ Testing commit 76e03ac8fdc1b9840e0dc906f9d7c10b2a99bb8e with merge 694f1b7949b1bb1edb51e84f939aac981ad85326... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #84842) made this pull request unmergeable. Please resolve the merge conflicts. |
…os::imp::unix::fs::PermissionsExt::from_mode` in Clippy
Thanks again :) @bors r+ |
📌 Commit 2173d8d has been approved by |
☀️ Test successful - checks-actions |
Move all `sys::ext` modules to `os` This PR moves all `sys::ext` modules to `os`, centralizing the location of all `os` code and simplifying the dependencies between `os` and `sys`. Because this also removes all uses `cfg_if!` on publicly exported items, where after rust-lang#81969 there were still a few left, this should properly work around rust-lang/rust-analyzer#6038. `@rustbot` label: +T-libs-impl
This PR moves all
sys::ext
modules toos
, centralizing the location of allos
code and simplifying the dependencies betweenos
andsys
.Because this also removes all uses
cfg_if!
on publicly exported items, where after #81969 there were still a few left, this should properly work around rust-lang/rust-analyzer#6038.@rustbot label: +T-libs-impl