rust-lang / rust-lang/rustc-perf

Consider passing -Awarnings (or similar) to avoid false alarms from lint *reporting*

Open
#1,819 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
733
Forks
189
Avg merge
10h 52m
Merged PRs (30d)
43

Description

See https://github.com/rust-lang/rust/pull/117772#issuecomment-1951430297, quoted here to sidestep github's collapsing of comments:

On a closer inspection, the results for ripgrep, regex and html5ever are quite misleading. Those crates actually have redundant imports, so the lint reporting machinery (lint level checking, diagnostic printing) is invoked now, and that's what is causing regressions, not the check_unused pass itself.

The unused-warnings regression is legitimate, but it's a stress test for imports specifically.

I think we can merge this after addressing #117772 (comment).

There were a number of benchmarks that starting hitting a lint and thus starting exercising lint reporting machinery that was previously uninvoked.

Now: If a lint check is expensive to exercise, then we should measure that as part of benchmarking.

But if a new lint fires and causes new diagnostic code paths to run, that sounds like noise to me.

It would be better, IMO, if we silenced the diagnostic machinery from running at all in such cases, except for isolated benchmarks that are themselves dedicated to exercising the efficiency of the diagnostic machinery.

What do others think?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked rust-lang/rust pull request and discussion, then inspect how rustc-perf invokes benchmarks and handles lint-triggering diagnostics. Done means ordinary benchmarks no longer exercise newly firing diagnostic reporting paths, while benchmarks dedicated to diagnostic efficiency still measure them.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.