rust-lang / rust-lang/rust-analyzer
Support for separate .cargo/config.toml files in different projects in a workspace.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
The problem is if you have a workspace with subprojects that have different targets, they are not handled separately.
I created a reposity demonstrating the problem - https://github.com/ryankopf/testconfig
This is a problem because if you have a project, such as a video game, where you have two different targets (in my case one is wasm and one is linux/windows), Rust-Analyzer will die when it encounters a "compile_error!" macro in one of the projects, because the .cargo/config.toml file is not read for that project, and so Rust-Analyzer is not appropriately including the proper target in its checks.
This may be related to this issue - https://github.com/rust-lang/rust-analyzer/issues/13529 - but I think support for config.toml files is a separate issue that should be included.
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 with the linked reproduction repository to observe how separate workspace subprojects use different targets, then trace rust-analyzer's workspace and .cargo/config.toml handling. Done means each subproject's configuration is read independently so its target-specific checks no longer produce an incorrect compile_error!.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100