rust-lang / rust-lang/rust-analyzer

Add named configuration overrides for vscode extension

Open
#15,545 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently there a handful of Rust/Cargo issues surrounding feature selection in workspaces, e.g., https://github.com/rust-lang/cargo/issues/4463. I think the missing possible key in the whole thing, ignoring ideas like changing the features model itself, is that there is no concept similar to a "Solution" like in an IDE like Visual Studio, e.g., a named configuration that binds target/package/features for easy switching. The parts are all here, but it requires manually swapping the analyzer settings in settings.json and the default-members in the workspace Cargo.yaml.

So what about adding functionality to the vscode extension like that in the Python one where different environments can be set up? For me the use case is reproducibly swapping between working on a static library package for embedding into mobile, and a Linux-based server binary, both of which have different feature flags. And those feature flags expand/propagate into the library dependencies in the workspace/monorepo which conditionally include code.

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 reviewing how the VS Code extension currently reads analyzer settings from settings.json and how workspace Cargo.yaml uses default-members. Compare the requested named configurations with the linked Python extension environments. Done should allow switching reproducible target, package, and feature selections without manually editing those settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.