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 std::fs::read, read_string, and write #46588
Comments
SimonSapin
referenced this issue
Dec 8, 2017
Merged
Add read, read_string, and write functions to std::fs #45837
This comment has been minimized.
This comment has been minimized.
|
Implemented, so shouldn't this be closed? |
This comment has been minimized.
This comment has been minimized.
|
@JordiPolo this issue is tracking their stabilization, not their implementation. |
This comment has been minimized.
This comment has been minimized.
|
By the way, is there a delay before we should start FCP for stabilization? This is niche enough that I don’t expect to get more feedback just by waiting. I’m not planning to use these functions myself until they’re stable. |
sfackler
added
B-unstable
T-libs
labels
Dec 14, 2017
This comment has been minimized.
This comment has been minimized.
leonardo-m
commented
Dec 23, 2017
|
Is also adding a lazy iterator on lines a good idea? |
This comment has been minimized.
This comment has been minimized.
|
@leonardo-m https://doc.rust-lang.org/std/io/trait.BufRead.html#method.lines already exists. Or do you mean adding a convenience function that calls it from a filename? I personally feel less need for that function, but feel free to open a new PR for it. |
This comment has been minimized.
This comment has been minimized.
leonardo-m
commented
Dec 23, 2017
|
I meant a convenience function. It's often useful for small script-like programs, tests, benchmarks, online code competitions and games, etc. |
This comment has been minimized.
This comment has been minimized.
|
@aturon Let’s stabilize? |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp merge |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jan 30, 2018
•
|
Team member @sfackler has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once a majority of reviewers approve (and none object), 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. |
rfcbot
added
the
proposed-final-comment-period
label
Jan 30, 2018
This comment has been minimized.
This comment has been minimized.
|
This landed less than a month ago, right? Is that a bit rapid for stabilization? |
This comment has been minimized.
This comment has been minimized.
|
Why |
This comment has been minimized.
This comment has been minimized.
|
I would expect something named |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton assuming we don't land a PR for this cycle, it's another 3 months away from hitting stable. |
This comment has been minimized.
This comment has been minimized.
|
@aturon that's true yeah, if we land on the next nightly (which branches Feb 15) I think that's an ok length of time. |
This comment has been minimized.
This comment has been minimized.
|
@dtolnay That's interesting. I don't think that is connected to to because To me, |
This comment has been minimized.
This comment has been minimized.
|
Previous discussion on the naming of |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Feb 16, 2018
|
|
rfcbot
added
final-comment-period
and removed
proposed-final-comment-period
labels
Feb 16, 2018
This comment has been minimized.
This comment has been minimized.
|
It seems like there was a lot of discussion about
Is there any chance of changing the function to |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot concern read_string Registering that I meant to be blocking on the name I'd really like this to be stabilized. I think |
This comment has been minimized.
This comment has been minimized.
|
I don’t have a strong opinion for the name of this function, but the |
This comment has been minimized.
This comment has been minimized.
I think if they were differentiating themselves from some other "default" read mode, then those would be reasonable names. Since we default to bytes, I'd say they don't need to differentiate? I'm not sure I think
|
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Feb 26, 2018
|
The final comment period is now complete. |
This comment has been minimized.
This comment has been minimized.
|
I would be happy with The one issue with |
This comment has been minimized.
This comment has been minimized.
angusholder
commented
Mar 15, 2018
|
How about |
This comment has been minimized.
This comment has been minimized.
|
In |
This comment has been minimized.
This comment has been minimized.
|
It seems like the naming for the string-returning function isn't super resolved, so how about stabilizing just |
This comment has been minimized.
This comment has been minimized.
|
@sfackler sounds good to me :) |
This comment has been minimized.
This comment has been minimized.
angusholder
commented
Mar 17, 2018
|
|
This comment has been minimized.
This comment has been minimized.
|
@angusholder There is no deadline for stabilizations. The only thing time-based things are release trains, https://forge.rust-lang.org/#release_info shows some dates. When a version reaches Stable, the next one graduates from Nightly to Beta at the same time and then reaches Stable 6 weeks later. At this point I have no opinion about naming for this function. I’ll let @withoutboats pick one and resolve their concern with rfcbot. |
This comment has been minimized.
This comment has been minimized.
|
looking forward to this being stabilized :) |
XAMPPRocky
added
the
C-tracking-issue
label
Mar 26, 2018
bors
added a commit
that referenced
this issue
Mar 29, 2018
bors
added a commit
that referenced
this issue
Mar 30, 2018
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this today and the consensus is to stabilize with the |
SimonSapin commentedDec 8, 2017
Implemented in #45837
New APIs in
std::fs:(
read_stringis based onread_to_stringand so returns an error on non-UTF-8 content.)Before:
After: