rust-lang / rust-lang/rust-analyzer

Deduplicate diagnostics across `linkedProjects`

Open
#13,858 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In some cases, for compilation-related reasons (different target triples or compilation flags), it may be desirable to keep some parts of a single developer workspace/project not part of a single Cargo workspace (so that they do not share a target directory, or do not participate in workspace-wide build commands). If this is done, the option rust-analyzer.linkedProjects can be used to tell rust-analyzer about all of the Cargo workspaces within the project.

Currently, if a crate in one such workspace has a path dependency on a crate in another such workspace, the result will be that any warnings occurring in the latter are duplicated.

Feature request: Deduplicate warnings which are identical except for arising from distinct linkedProjects.

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 by reproducing the duplicated warnings with multiple Cargo workspaces configured through rust-analyzer.linkedProjects, using a path dependency between them. Trace how diagnostics from the linked projects are collected and identify when warnings are identical except for their originating project. Done means each identical warning is reported only once while distinct diagnostics remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
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.