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

Lint large assignments and locals #420

Closed
2 of 3 tasks
oli-obk opened this issue Mar 22, 2021 · 4 comments
Closed
2 of 3 tasks

Lint large assignments and locals #420

oli-obk opened this issue Mar 22, 2021 · 4 comments
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Mar 22, 2021

Proposal

Add two new lints to the compiler that are run during collection (so post-monomorphization). One that reports large MIR locals (with a crate-wide attribute to configure the size at which linting starts) and one that reports large assignments (with a separate crate-wide attribute for configuring the size).

The idea of these two lints is to quickly give users the ability to start debugging async/await performance issues that can occur when large async blocks are moved around directly (instead of behind a box). While there may be better or more powerful schemes available, this solution is easy to implement and gives an immediate benefit.

Mentors or Reviewers

@pnkfelix who came up with the idea

Process

The main points of the Major Change Process are as follows:

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

@oli-obk oli-obk added T-compiler Add this label so rfcbot knows to poll the compiler team major-change A proposal to make a major change to rustc labels Mar 22, 2021
@rustbot
Copy link
Collaborator

rustbot commented Mar 22, 2021

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/compiler @rust-lang/compiler-contributors

@rustbot rustbot added the to-announce Announce this issue on triage meeting label Mar 22, 2021
@pnkfelix
Copy link
Member

@rustbot second

@rustbot rustbot added the final-comment-period The FCP has started, most (if not all) team members are in agreement label Mar 25, 2021
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Mar 25, 2021
@apiraino
Copy link
Contributor

apiraino commented Apr 8, 2021

@rustbot label -final-comment-period +major-change-accepted

@apiraino apiraino closed this as completed Apr 8, 2021
@rustbot
Copy link
Collaborator

rustbot commented Apr 8, 2021

Error: The feature relabel is not enabled in this repository.
To enable it add its section in the triagebot.toml in the root of the repository.

Please let @rust-lang/release know if you're having trouble with this bot.

@apiraino apiraino added major-change-accepted A major change proposal that was accepted and removed final-comment-period The FCP has started, most (if not all) team members are in agreement labels Apr 8, 2021
@rustbot rustbot added the to-announce Announce this issue on triage meeting label Apr 8, 2021
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Apr 15, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Apr 20, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? `@pnkfelix`

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? `@pnkfelix`

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? ``@pnkfelix``

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? ```@pnkfelix```

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? ``@pnkfelix``

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? ```@pnkfelix```

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team
Projects
None yet
Development

No branches or pull requests

4 participants