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

Stabilize Seek::stream_position (feature seek_convenience) #70904

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

LukasKalbertodt
Copy link
Member

Tracking issue: #59359

Unresolved questions from tracking issue:

  • "Override stream_len for File?" → we can do that in the future, this does not block stabilization.
  • "Rename to len and position?" → as noted in the tracking issue, both of these shorter names have problems (len is usually a cheap getter, position clashes with Cursor). I do think the current names are perfectly fine.
  • "Rename stream_position to tell?" → as mentioned in the comment bringing this up, stream_position is more descriptive. I don't think tell would be a good name.

What remains to decide, is whether or not adding these methods is worth it.

@LukasKalbertodt LukasKalbertodt added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. relnotes Marks issues that should be documented in the release notes of the next release. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. labels Apr 7, 2020
@rust-highfive

This comment has been minimized.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 7, 2020
@LukasKalbertodt

This comment has been minimized.

@LukasKalbertodt
Copy link
Member Author

FYI: a new discussion potentially arguing against stabilization just emerged in the tracking issue.

@SimonSapin
Copy link
Contributor

Highfive is configured in https://github.com/rust-lang/highfive/blob/master/highfive/configs/rust-lang/rust.json#L6, and this list (in particular my absence from it ;)) is deliberate.

r? @kennytm

In general though the right time for a stabilization is after FCP has happened, because of cases like this:

a new discussion potentially arguing against stabilization just emerged

@rust-highfive rust-highfive assigned kennytm and unassigned SimonSapin Apr 9, 2020
@LukasKalbertodt
Copy link
Member Author

Highfive is configured in https://github.com/rust-lang/highfive/blob/master/highfive/configs/rust-lang/rust.json#L6, and this list (in particular my absence from it ;)) is deliberate.

Oh, oops. I simply checked https://www.rust-lang.org/governance/teams/library to see if kennytm is in the libs team, didn't see them listed there and assumed this was a highfive bug. Sorry!

In general though the right time for a stabilization is after FCP has happened, because of cases like this:

I assumed that FCPs mostly happen on the PR and not the tracking issue. At least I think that that's mostly what I saw so far. I even considered asking for FCP on the tracking issues instead of creating a PR but decided against it because I thought FCP on PR is the "proper" way to do it. If you want, I can close this PR until FCP is complete.

@Dylan-DPC-zz Dylan-DPC-zz modified the milestones: 1.44, 1.45 Apr 21, 2020
@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2020
@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 15, 2020
@Dylan-DPC-zz
Copy link

r? @dtolnay

@rust-highfive rust-highfive assigned dtolnay and unassigned kennytm May 15, 2020
@dtolnay
Copy link
Member

dtolnay commented May 28, 2020

@rust-lang/libs:
I don't have a strong opinion either way on this one, but I am open to accepting these methods. I would be interested what you all think. Some of us weighed in previously in #58422 (comment) when these were originally implemented.

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented May 28, 2020

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

Concerns:

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.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels May 28, 2020
@sfackler
Copy link
Member

@rfcbot concern non-atomic-tell

stream_position seems totally reasonable to me (maybe modulo a rename), but I'm not really a huge fan of stream_position being implemented by 3 seeks. It's unfortunately non-atomic and (almost?) every seekable construct of finite length should have a more "proper" method to return its length.

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Jan 17, 2021
@rfcbot
Copy link

rfcbot commented Jan 17, 2021

🔔 This is now entering its final comment period, as per the review above. 🔔

@pthariensflame
Copy link
Contributor

since attribute needs updating.

@rfcbot rfcbot added the finished-final-comment-period The final comment period is finished for this PR / Issue. label Jan 27, 2021
@rfcbot
Copy link

rfcbot commented Jan 27, 2021

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.

The RFC will be merged soon.

@rfcbot rfcbot added to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Jan 27, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Jan 27, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 27, 2021

📌 Commit 8a18fb0 has been approved by m-ou-se

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 27, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 28, 2021
Rollup of 13 pull requests

Successful merges:

 - rust-lang#70904 (Stabilize `Seek::stream_position` (feature `seek_convenience`))
 - rust-lang#79951 (Refractor a few more types to `rustc_type_ir` )
 - rust-lang#80868 (Print failure message on all tests that should panic, but don't)
 - rust-lang#81062 (Improve diagnostics for Precise Capture)
 - rust-lang#81277 (Make more traits of the From/Into family diagnostic items)
 - rust-lang#81284 (Make `-Z time-passes` less noisy)
 - rust-lang#81379 (Improve URLs handling)
 - rust-lang#81416 (Tweak suggestion for missing field in patterns)
 - rust-lang#81426 (const_evaluatable: expand abstract consts in try_unify)
 - rust-lang#81428 (compiletest: Add two more unit tests)
 - rust-lang#81430 (add const_evaluatable_checked test)
 - rust-lang#81433 (const_evaluatable: stop looking into type aliases)
 - rust-lang#81445 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 025a850 into rust-lang:master Jan 28, 2021
@rustbot rustbot modified the milestones: 1.48.0, 1.51.0 Jan 28, 2021
@LukasKalbertodt LukasKalbertodt deleted the stabilize-seek-convenience branch January 28, 2021 12:13
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jan 28, 2021
sunfishcode added a commit to bytecodealliance/cap-std that referenced this pull request Feb 4, 2021
Most of the `seek_convenience` feature was stablized, but `stream_len`
was not [0]. To minimize version incompatibilities here, just remove
our `stream_len` functions for now and rely on the defaults.

[0]: rust-lang/rust#70904
snev68 added a commit to snev68/cap-std that referenced this pull request Aug 5, 2024
Most of the `seek_convenience` feature was stablized, but `stream_len`
was not [0]. To minimize version incompatibilities here, just remove
our `stream_len` functions for now and rely on the defaults.

[0]: rust-lang/rust#70904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.