killercup / killercup/cargo-edit

Updating package rust-version to the latest version

Open
#917 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cargo-upgrade
Dominant language
Rust
Stars
3.5k
Forks
166
PR merge metrics
No merged PRs in 30d

Description

TL;DR: Is upgrading package.rust-version within the scope of this project?

As a beginner in rust I like enabling lints to get used to idioms and avoid anti-patterns. Recently while working on a project (binary, not lib), I happened upon the use Trait as _ idiom which I decided to enforce. However the corresponding lint was only added in v1.83.

I have a function in my shell config that uses cargo-edit to upgrade all dependency crates in the current project to their latest versions. I decided to add a step to that function for upgrading the package.rust-version property to the latest stable version of rust. Looking at the help output of cargo-edit, it seemed like --rust-version was exactly what I was looking for, but looks like that's not the case:

# Update package.rust-version to latest stable version of rust
rustup update && cargo upgrade --rust-version `{rustc --version | cut -d " " -f2}` --compatible ignore # Doesn't modify cargo.toml

So I want to initiate a discussion on whether that's something this project would consider supporting.

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 the cargo upgrade --rust-version help output and the reported command behavior in cargo-edit. No implementation file or test is named in the issue, so first determine where package.rust-version handling belongs. Done would require a project decision on whether this capability is supported and a defined behavior if it is.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.