rust-lang / rust-lang/rust-analyzer

Diagnostics are very chatty

Open
#11,273 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-diagnostics A-perf
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

At https://github.com/rust-analyzer/rust-analyzer/blob/62a13cce9b6356af0dfeeeb6add3432f0e76a19f/crates/rust-analyzer/src/main_loop.rs#L462, we take the changed files, but don't clear the check diagnostics. If the diagnostics arrive one by one, we publish the first one, then the first two, then the first three and so on, which is quite unfortunate, but seems hard to avoid.

Contributor guide

Open the contributing guide

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 at crates/rust-analyzer/src/main_loop.rs around line 462, where changed files and check diagnostics are handled. Reproduce or trace incremental diagnostic arrivals to understand why successive publications accumulate earlier results. Done means check diagnostics are no longer published as an increasingly cumulative sequence when they arrive one by one.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.