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

Create read-only file fails on nightly #31453

Closed
danburkert opened this Issue Feb 6, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@danburkert
Copy link
Contributor

danburkert commented Feb 6, 2016

cc @alexcrichton

There has recently been a regression introduced to std::fs. The following line results in Ok on stable and Err on nightly:

std::fs::OpenOptions::new().read(true).create(true).open("some-file")

This regression is affecting Linux, Windows, and OS X. You can see it in action in recent fs2 CI builds.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Feb 6, 2016

This is a known change in behavior implemented in #30872 as proposed in RFC 1252. This case was specifically disallowed due to its inconsistent behavior across platforms. Adding write(true) should guarantee it works on all platforms and on all versions.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Feb 6, 2016

nominating for discussion of the fallout, however

@pitdicker

This comment has been minimized.

Copy link
Contributor

pitdicker commented Feb 6, 2016

A link in the RFC is broken, but this is from the OpenBSD mailing list. It says it does not work on OpenBSD and Solaris

@danburkert

This comment has been minimized.

Copy link
Contributor Author

danburkert commented Feb 6, 2016

Ok sounds good. I didn't realize it wasn't available everywhere. I'll
update my code accordingly.

On Saturday, February 6, 2016, pitdicker notifications@github.com wrote:

A link in the RFC is broken, but this is from the OpenBSD mailing list
http://marc.info/?l=openbsd-tech&m=96976914719648. It says it does not
work on OpenBSD and Solaris


Reply to this email directly or view it on GitHub
#31453 (comment).

@pitdicker

This comment has been minimized.

Copy link
Contributor

pitdicker commented Feb 6, 2016

But sorry for the breakage anyway

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Feb 11, 2016

The libs team discussed this during triage today and decided that the fallout here is acceptable under the API evolution RFC, so closing.

Thanks again for the report though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.