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

Tracking Issue for OpenOptionsExt::as_flags #76801

Open
2 tasks
FedericoPonzi opened this issue Sep 16, 2020 · 4 comments
Open
2 tasks

Tracking Issue for OpenOptionsExt::as_flags #76801

FedericoPonzi opened this issue Sep 16, 2020 · 4 comments
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC Libs-Tracked Libs issues that are tracked on the team's project board. O-unix Operating system: Unix-like T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@FedericoPonzi
Copy link
Contributor

FedericoPonzi commented Sep 16, 2020

This is a tracking issue for the OpenOptionsExt::as_flags method defined in #76110
The feature gate for the issue is #![feature(open_options_ext_as_flags)].

This feature was reverted in #77090

Steps

Implementation history

@FedericoPonzi FedericoPonzi added the C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC label Sep 16, 2020
@jonas-schievink jonas-schievink added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Sep 16, 2020
@ghost
Copy link

ghost commented Sep 23, 2020

Adding non-default items to public traits like this is a breaking change. In particular, async-fs (part of smol) now no longer compiles on nightly because it impls std::os::unix::fs::OpenOptionsExt on its local newtype of std::fs::OpenOptions.

async-std appears to use the same approach and would thus also be affected. tokio only dodges the bullet because it defines its own tokio::fs::os::unix::OpenOptionsExt rather than use std.

It's hard to see how this could ever be stabilised in its current form.

@Darksonn
Copy link
Contributor

We actually discussed this in Tokio on the PR for our OpenOptionsExt. tokio-rs/tokio#2515 (comment)

@ghost
Copy link

ghost commented Oct 4, 2020

Update: async-fs (part of smol) now defines its own extension traits rather than implementing those from std.

@KodrAus KodrAus added the Libs-Tracked Libs issues that are tracked on the team's project board. label Nov 6, 2020
@KodrAus KodrAus added A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` O-unix Operating system: Unix-like labels Jan 6, 2021
@joshtriplett
Copy link
Member

Attempting to revive this:

If we haven't already, we should make an attempt to seal OpenOptionsExt, assuming we can do so without widespread breakage.

If we can seal it, we can then add this method. If we can't, we'll have to add a new sealed trait for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC Libs-Tracked Libs issues that are tracked on the team's project board. O-unix Operating system: Unix-like T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants