rust-lang / rust-lang/rust-analyzer
Single-package mode
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Today rust-analyzer unconditionally operates on the whole workspace, even if you open a subfolder of the workspace with a single package. It might be reasonable to scope the work to a single package in such cases.
The tradeoff here is:
- when you open a single package, refactors don't work across the workspace
- but ra needs to
cargo checka single package only, which is especially helpful if the overall build is broken
I haven't thought too deeply how this all should work exactly.
related user request: https://github.com/rust-analyzer/rust-analyzer/issues/10730
Relevant code:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked sections of crates/project_model/src/workspace.rs and crates/project_model/src/lib.rs to understand how workspace scope is selected. Clarify the intended behavior for opening a single package, including the refactoring tradeoff and single-package cargo check, then identify how completion can be verified against the related user request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100