Port lint attributes to attribute parser#152369
Port lint attributes to attribute parser#152369rust-bors[bot] merged 11 commits intorust-lang:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in compiler/rustc_hir/src/attrs cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_passes/src/check_attr.rs cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_attr_parsing |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Port lint attributes to attribute parser
e70b414 to
d9434c9
Compare
|
@bors r=JonathanBrouwer,jdonszelmann |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing f908263 (parent) -> 2972b5e (this PR) Test differencesShow 108 test diffsStage 1
Stage 2
Additionally, 104 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 2972b5e59f1c5529b6ba770437812fd83ab4ebd4 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (2972b5e): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.6%, secondary 2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.2%, secondary 3.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 491.353s -> 489.759s (-0.32%) |
|
Perf wins significantly outweigh the regressions |
|
Ooh interesting, walltime numbers are usually super noisy so I tend to ignore them, but this does indeed look kinda real
|
I think some walltime increase can be expected due to: https://github.com/rust-lang/rust/pull/152369/changes#diff-f108051d119300655064d5988094ba485d04880e8669944bbc484f35c49b6743R126 |
|
I don't really believe that sort could cause such a major change, given how small the list it is sorting is, though perf is always a surprise so it always could be... Am I reading the summary charts correctly when I say the walltime regressions only persists in doc builds? |
|
hey @Bryntet @JonathanBrouwer @jdonszelmann 👋 I notice a number of issues popping up linked to this PR. Tomorrow a beta branching is scheduled and a crater run will soon run on it. My vague feeling is that we might get a number of regressions and then we need to fix and backport them. So, what is your gut feeling about #154906? Would it solve all/most of the issues I see linked to this PR? And what do you think about temporarily reverting this PR to give us a bit more time before the beta cut? Leaving a note here as today we have the weekly compiler triage (on Zulip), so possibly also include your opinion first (feel free to stop by if you want). and thanks :) |
|
I think temporarily reverting this PR may be wise. I think #154906 fixes most problems from this PR (especially those that would commonly be stumbled upon by end users), but the way it does so is not so idiomatic, and preferably still needs some work I don't know what the process for reverting/not including a PR in beta, but I'd love to help in anyway I can |
|
I'll take a look later today at what the best option is here, this will be a painful revert because of the large amount of changes since this pr, but it might be needed |
|
Right, didn't think of that. This could indeed be quite painful to revert. |
|
To summarize, we currently have the following regressions:
Because of this, I believe the best decision is to revert. Note that I still believe this PR to be awesome and I think we will re-land it with the fixes on top in the near future, but I have limited time and I don't want to cause time pressure on a project that we're all contributing to for fun, because that is a path doomed to burnout <3 Because quite a few PRs already landed on top of this one reverting will be painful. I will see if I can get a revert up before the beta cutoff, but no promises. Otherwise we can beta-nominate the revert. |
|
Revert was surprisingly painless, there were quite a few conflicts but they solved relatively easy |
| bug!("tools required while parsing attributes"); | ||
| }; | ||
|
|
||
| let tools = tools.iter().map(|tool| tool.name).collect::<Vec<_>>(); |
There was a problem hiding this comment.
Do we really need to collect here, or could we change the tools.contains check below to use cx.tools directly?
| if !skip_reason_check && !errored && lint_instances.is_empty() { | ||
| cx.warn_empty_attribute(cx.attr_span); | ||
| } | ||
|
|
||
| (!errored).then_some(LintAttribute { | ||
| reason, | ||
| lint_instances, | ||
| attr_span: cx.attr_span, | ||
| attr_style: cx.attr_style, | ||
| attr_id: HashIgnoredAttrId { attr_id: cx.attr_id }, | ||
| attr_index, | ||
| }) |
There was a problem hiding this comment.
| if !skip_reason_check && !errored && lint_instances.is_empty() { | |
| cx.warn_empty_attribute(cx.attr_span); | |
| } | |
| (!errored).then_some(LintAttribute { | |
| reason, | |
| lint_instances, | |
| attr_span: cx.attr_span, | |
| attr_style: cx.attr_style, | |
| attr_id: HashIgnoredAttrId { attr_id: cx.attr_id }, | |
| attr_index, | |
| }) | |
| if errored { | |
| return None; | |
| } | |
| if !skip_reason_check && lint_instances.is_empty() { | |
| cx.warn_empty_attribute(cx.attr_span); | |
| } | |
| Some(LintAttribute { | |
| reason, | |
| lint_instances, | |
| attr_span: cx.attr_span, | |
| attr_style: cx.attr_style, | |
| attr_id: HashIgnoredAttrId { attr_id: cx.attr_id }, | |
| attr_index, | |
| }) |





View all comments
Tracking issue: #131229
Ports
#[allow],#[deny],#[expect],#[forbid], and#[warn]to being parsed attrsI tried my best to make this PR as small as possible, it was difficult. I hope it isn't too difficult to review
r? @JonathanBrouwer
r? @jdonszelmann