killercup / killercup/cargo-edit

Enhance `cargo set-command` to support custom pre-release identifiers

Open
#929 1 comment 0 reactions 0 assignees View on GitHub
cargo-set-version
Dominant language
Rust
Stars
3.5k
Forks
166
PR merge metrics
No merged PRs in 30d

Description

The `cargo set-command` currently supports bumping pre-releases but is limited to specific values (rc, beta, alpha). However, the SemVer specification does not restrict pre-release identifiers to these specific values.

When using `cargo set-command` to bump pre-releases, only "rc", "beta", and "alpha" are accepted as valid identifiers.

I would like to propose allowing of custom pre-release identifiers beyond the current hardcoded set, making the command fully compliant with the [SemVer specification](https://semver.org/#spec-item-9) which allows any valid alphanumeric identifier. I am working on a project where `dev` is used as an identifier i.e `x.x.x-dev.x`

What do you think?

Contributor guide

Open the contributing guide

Research direction

Start at the cargo set-command implementation and trace how pre-release identifiers are validated and passed to the version bump. Check the existing tests for rc, beta, and alpha behavior, then add coverage showing that a valid custom identifier such as dev is accepted while the command remains compliant with SemVer.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.