Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for OpenOptions expansion #30014
Comments
alexcrichton
added
the
B-RFC-approved
label
Nov 23, 2015
pitdicker
added a commit
to pitdicker/rust
that referenced
this issue
Jan 13, 2016
pitdicker
referenced this issue
Jan 13, 2016
Merged
Implement RFC 1252 expanding the OpenOptions structure #30872
bors
added a commit
that referenced
this issue
Jan 20, 2016
mitaa
added a commit
to mitaa/rust
that referenced
this issue
Jan 21, 2016
rthomas
added a commit
to rthomas/rust
that referenced
this issue
Feb 1, 2016
alexcrichton
added
T-libs
B-unstable
and removed
B-RFC-approved
labels
Feb 18, 2016
alexcrichton
added
the
I-nominated
label
Mar 9, 2016
This comment has been minimized.
This comment has been minimized.
|
Some concerns the libs team has, however, about this API are:
|
alexcrichton
added
final-comment-period
and removed
I-nominated
labels
Mar 11, 2016
This comment has been minimized.
This comment has been minimized.
|
Ah and to clarify, we're just considering |
This comment has been minimized.
This comment has been minimized.
|
The combination of |
This comment has been minimized.
This comment has been minimized.
|
What is "tentative stabilization"? |
This comment has been minimized.
This comment has been minimized.
|
Ah just in the sense that we're leaning towards stabilization, but not necessarily fully committed to it. If there are arguments against stabilizing then we're willing to wait/postpone. |
This comment has been minimized.
This comment has been minimized.
d3zd3z
commented
Mar 28, 2016
|
A real example of where |
This comment has been minimized.
This comment has been minimized.
|
Regarding nonsensical combinations of options: we could consider panicking in such cases at the point that you attempt to open the file. (A panic because this is a contract violation, somewhat akin to passing a non-nonsensical memory ordering to an atomic operation.) I definitely don't think it's worth trying to rule this out statically (using typestate or something like that). |
This comment has been minimized.
This comment has been minimized.
|
@aturon I definitely agree with not trying to rule it out statically. What if we returned an error instead of panic'ing? I think we could reasonably call it a contract violation, but what are the downsides of returning an error? One potential use case where an error might be more helpful is if the open options were constructed based on some other input (perhaps it was provided by or derived from a user). If the final call panic'd when the options were nonsense, I'd feel obligated to implement my own logic to ensure the options weren't nonsense. If however it returned an error, I might just rely on that instead, which does seem a bit more convenient. |
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this during triage yesterday and the decision was to stabilize with errors returned at runtime for "weird" situations. |
This comment has been minimized.
This comment has been minimized.
|
Ok, rereading things and thinking more closely, as @pitdicker pointed out the behavior is already specified as ignoring create/truncate, so I've just left as is and stabilized without modifications. |
This comment has been minimized.
This comment has been minimized.
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Apr 7, 2016
alexcrichton
referenced this issue
Apr 7, 2016
Merged
std: Stabilize APIs for the 1.9 release #32804
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Apr 7, 2016
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Apr 8, 2016
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Apr 8, 2016
bors
added a commit
that referenced
this issue
Apr 9, 2016
bors
closed this
in
#32804
Apr 12, 2016
This comment has been minimized.
This comment has been minimized.
|
Oops there's still a few unstable APIs here |
alexcrichton
reopened this
Apr 12, 2016
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Apr 12, 2016
alexcrichton
removed
the
final-comment-period
label
Apr 13, 2016
This comment has been minimized.
This comment has been minimized.
|
The libs team basically feels the same way about this as #27720, we just want to make sure there's a comprehensive story here. |
alexcrichton
added
the
final-comment-period
label
Apr 29, 2016
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this during triage yesterday and the decision was to stabilize |
alexcrichton commentedNov 23, 2015
Tracking issue for rust-lang/rfcs#1252
Unstable APIs:
OpenOptions::create_newos::unix::fs::OpenOptionsExt::custom_flagsos::windows::fs::OpenOptionsExt::custom_flags