Skip to content

feat(rust) - Add "none" value for Rust feature "components" - #1725

Open
Venkumahanti Subhankar (V-Subhankar-infy) wants to merge 3 commits into
devcontainers:mainfrom
V-Subhankar-infy:patch-rust
Open

feat(rust) - Add "none" value for Rust feature "components"#1725
Venkumahanti Subhankar (V-Subhankar-infy) wants to merge 3 commits into
devcontainers:mainfrom
V-Subhankar-infy:patch-rust

Conversation

@V-Subhankar-infy

Copy link
Copy Markdown
Member

Issue

Resolves #1716 — no supported way to opt out of the default Rust components
(rust-analyzer, rust-src, rustfmt, clippy).

Solution

Add an explicit "none" value for the components option. When set to none,
the component-install loop is skipped. Unset, empty, and custom-list values keep
their existing behavior. Includes version bump (1.5.1 -> 1.6.0), updated
docs/proposals, and a new rust_with_none_components test scenario.

Impact

No breaking changes — only the previously-unhandled literal none changes
behavior. none skips components beyond the selected rustup profile; under the
default minimal profile this means none of the four defaults are installed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The current components="none" handling is brittle around whitespace/mixed values (can attempt to install a literal none component), and the new test script includes an unused helper that should be cleaned up.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds an explicit components: "none" option to the Rust feature so users can opt out of installing the default component set beyond the selected rustup profile, and updates metadata/docs/tests accordingly.

Changes:

  • Treat literal components="none" as a sentinel to skip the rustup component-install loop.
  • Bump Rust feature version to 1.6.0 and update feature docs/proposals to document/offer none.
  • Add a new rust test scenario validating that default components are not installed when components="none".
File summaries
File Description
test/rust/scenarios.json Adds a new rust_with_none_components test scenario entry.
test/rust/rust_with_none_components.sh Adds a new test script asserting default Rust components are not installed when components=none.
src/rust/README.md Documents components='none' behavior in the options table.
src/rust/install.sh Implements the none sentinel to skip component installation.
src/rust/devcontainer-feature.json Bumps feature version, updates components description, and adds none to proposals.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/rust/install.sh
Comment thread test/rust/rust_with_none_components.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation preserves existing behavior, validates conflicting values, and includes focused coverage and documentation.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust: Components field ignores intention of profile field

3 participants