rust-lang / rust-lang/rust-analyzer

Assist to convert dependency from version only to version+feature

Open
#10,117 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-needs-toml S-unactionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

In cargo.toml you can specify dependencies in two different syntaxes. The first is

package="x.x.x"

The second, necessary if you need features, is

package={version="x.x.x", features=[]}

It would be convenient if we had an assist that would let us switch from the former to the latter, placing the cursor in the features array for immediate editing.

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 cargo.toml dependency handling and the existing assist entry points in rust-analyzer. Look for tests covering dependency syntax transformations. Done means converting a version-only dependency to the version-plus-features form and placing the cursor in the features array.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.