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

Rust Style Team #3309

Merged
merged 6 commits into from
Sep 22, 2022
Merged

Rust Style Team #3309

merged 6 commits into from
Sep 22, 2022

Conversation

joshtriplett
Copy link
Member

@joshtriplett joshtriplett commented Aug 30, 2022

This RFC charters the Rust Style Team, responsible for evolving the Rust style over time. This includes styling for new Rust constructs, as well as the evolution of the existing style over the course of Rust editions (without breaking backwards compatibility).

RFC 1607 proposed and motivated a process for determining code formatting guidelines and producing a style guide, via a temporary style team. That style guide was published as RFC 2436, and the style team wound up its operation and no longer exists. However, Rust has multiple ongoing needs for new determinations regarding Rust style, such as determining the style of new Rust constructs, and evolving the Rust style over time. Thus, this RFC re-charters the Rust Style Team as a non-temporary subteam.

The renewed need for the Rust style team began to arise in discussions of language constructs such as let-chaining (RFC 2497) and let-else (RFC 3137). New constructs like these, by default, get ignored and not formatted by rustfmt, and subsequently need formatting added. The rustfmt team has expressed a preference to not make style determinations itself; the rustfmt team would prefer to implement style determinations made by another team.

This RFC proposes re-chartering the style team, as originally specified in RFC 1607, to determine the Rust style. This includes:

  • Making determinations about styling for new Rust constructs
  • Evolving the existing Rust style
  • Defining mechanisms to evolve the Rust style while taking backwards compatibility into account, such as via Rust editions or similar mechanisms

The initial members of the style team shall be:

Rendered

@joshtriplett joshtriplett added T-lang Relevant to the language team, which will review and decide on the RFC. A-formatting Proposals relating to formatting of Rust code. labels Aug 30, 2022
@thomcc
Copy link
Member

thomcc commented Aug 31, 2022

Strong +1 from me.

This lets us avoid the issue we've run into with let-else, and is a better solution than my suggestion here, which was essentially to make it the responsibility of t-lang when signing off on RFCs with new syntax, which is insufficient due to it not handling cases where the feature evolves between the RFC and stabilization.

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably goes without saying, but I'm highly supportive of this proposal as well. Couple minor inline items that I overlooked during pre-post reads

text/0000-style-team.md Outdated Show resolved Hide resolved
text/0000-style-team.md Outdated Show resolved Hide resolved
text/0000-style-team.md Outdated Show resolved Hide resolved
joshtriplett and others added 2 commits September 2, 2022 03:51
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
text/0000-style-team.md Outdated Show resolved Hide resolved
joshtriplett and others added 2 commits September 3, 2022 12:46
Co-authored-by: Yacin Tmimi <yacintmimi@gmail.com>
@joshtriplett
Copy link
Member Author

Multiple people have expressed a preference for the style team to have a single parent team, rather than two; in response, Caleb on behalf of rustfmt expressed a preference for the parent team to be lang. I've updated the RFC accordingly, and update the alternatives section to list the two-parent-team setup.

@joshtriplett
Copy link
Member Author

Doing this half by hand and half with rfcbot:

Lang team, shall we approve the creation of the Rust Style team?

@rfcbot merge

Even though per the previous commit rustfmt will no longer be a parent team of the style team, the style team will still have a close working relationship with the rustfmt team. So, rustfmt team (@calebcartwright and @ytmimi), do you also approve the creation of the Rust style team? (Please feel free to respond with either a comment confirming or a comment raising any concerns you may have.)

@rfcbot
Copy link
Collaborator

rfcbot commented Sep 3, 2022

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

No concerns currently listed.

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 Currently awaiting signoff of all team members in order to enter the final comment period. disposition-merge This RFC is in PFCP or FCP with a disposition to merge it. labels Sep 3, 2022
@joshtriplett joshtriplett added the I-lang-nominated Indicates that an issue has been nominated for prioritizing at the next lang team meeting. label Sep 3, 2022
@calebcartwright
Copy link
Member

So, rustfmt team (@calebcartwright and @ytmimi), do you also approve the creation of the Rust style team? (Please feel free to respond with either a comment confirming or a comment raising any concerns you may have.)

I approve the creation of the team

@ytmimi
Copy link
Contributor

ytmimi commented Sep 3, 2022

I also approve the creation of the team!

@nikomatsakis nikomatsakis removed the I-lang-nominated Indicates that an issue has been nominated for prioritizing at the next lang team meeting. label Sep 6, 2022
@nikomatsakis
Copy link
Contributor

@rfcbot reviewed

@rfcbot rfcbot added the final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. label Sep 8, 2022
@rfcbot
Copy link
Collaborator

rfcbot commented Sep 8, 2022

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

@rfcbot rfcbot removed the proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. label Sep 8, 2022
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this RFC. to-announce and removed final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. labels Sep 18, 2022
@rfcbot
Copy link
Collaborator

rfcbot commented Sep 18, 2022

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.

This will be merged soon.

@joshtriplett joshtriplett merged commit 50b1e7a into rust-lang:master Sep 22, 2022
@joshtriplett joshtriplett deleted the style-team branch September 22, 2022 13:06
@calebcartwright calebcartwright mentioned this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-formatting Proposals relating to formatting of Rust code. disposition-merge This RFC is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this RFC. T-lang Relevant to the language team, which will review and decide on the RFC. to-announce
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants