-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Tracking Issue for #![feature(unix_chown)] #88989
Comments
I think as part of stabilizing, we'll want to chat about what the end game is here. Does cc @the8472 |
@dtolnay For my part, I'm not necessarily looking to take on all of So, for instance, I wouldn't want to add something at the level of One other component of this policy: I think we should only add things that represent well-established interfaces that won't need to change in the future. POSIX functions are fairly safe in that regard, as are some long-established and widely used target-specific functions, but we shouldn't be exposing the forefront of target-specific functionality. |
Just a drive-by comment, but names for these functions seem to not follow the broader conventions used within the standard library (e.g. |
Do we need them on the standard library though when alternatives exist? For example the pidfd extensions to
This is still nebulous. Shell scripts will often glue things together you can't find in the rust standard library. Even something as simple as decompressing a stream gzip (included in busybox or the python and java standard libraries) will require an external library. Ditto regular expressions. So "minimal" sounds more like a toy program if you eschew external libraries. Or at least a very peculiar, tiny scope that just happens to almost exactly match what the standard library currently offers. |
@nagisa I agree, and under other circumstances, we'd probably call it something a little less abbreviated like If we're adding a function that's likely to run on any target supporting However, the user and ownership model is so incredibly different between Windows and UNIX that I don't think such an abstraction layer makes sense in the standard library. I think we should build abstraction layers when platforms work more-or-less the same way ("make a directory"), not when we'd have to introduce a fair amount of opinionated policy to have any hope of a useful abstraction. Given that, I think it makes sense to have a UNIX-specific function exposing the UNIX I think that justification holds for Does that seem reasonable, regarding naming? |
The same argument applies to many things in the standard library. I'm in favor of caution; we don't want to add interfaces that we may regret later, because we can't remove them. But if we're confident that the interface will stand the test of time without needing to change, then I do think there's value in having a |
The current definition of Alternatively, #93869 proposes to change |
Good catch. I've marked that as blocking in the top comment; we shouldn't stabilize Further discussion in #93869. |
I think all the issues with this have been resolved, and I'd like to propose stabilizing it. @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
Stabilize chown functions (`unix_chown`) Closes #88989 FCP is complete here: rust-lang/rust#88989 (comment)
Stabilize chown functions (`unix_chown`) Closes #88989 FCP is complete here: rust-lang/rust#88989 (comment)
Stabilize chown functions (`unix_chown`) Closes #88989 FCP is complete here: rust-lang/rust#88989 (comment)
Stabilize chown functions (`unix_chown`) Closes #88989 FCP is complete here: rust-lang/rust#88989 (comment)
Feature gate:
#![feature(unix_chown)]
This is a tracking issue for the
chown
family of functions. These functions change the UNIX owner and group of a file or file descriptor.Public API
Steps / History
fchown
takes anAsFd
by value, which prevents passing a reference.The text was updated successfully, but these errors were encountered: