rust-lang / rust-lang/rust

x.py setup configures rust-analyzer to analyze the whole project, causing it to consume much more resources than needed

Open
#154,597 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug needs-triage T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Summary

Currently, x.py setup configures rust-analyzer.linkedProjects to all the projects on the rust repo. This causes a long startup and an absurd memory usage. It will be much more efficient to only link to the projects the contributor want to work on, for example linking to compiler/rustc/Cargo.toml for people working on the compiler or library/std/Cargo.toml for people working on the standard library (note: this depends on the projects not using workspace dependencies, which is the situation currently).

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 with the x.py setup entry point that configures rust-analyzer.linkedProjects, then trace how contributor work areas are selected. Compare the current whole-repository project list with the compiler/rustc/Cargo.toml and library/std/Cargo.toml examples. Done means setup links only the projects relevant to the contributor while preserving valid rust-analyzer configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.