dtolnay / dtolnay/semver

PartialVersion parsing support

Open
#325 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
669
Forks
144
PR merge metrics
No merged PRs in 30d

Description

Creating this issue to discuss about for PartialVersion parsing. Currently [`Version::parse`](https://docs.rs/semver/latest/semver/struct.Version.html#method.parse) only supports parsing full versions (i.e., with at least a major, minor, and a patch).

Would you be against adding support for PartialVersion parsing, e.g., in the same manner that [Cargo handles partial versions](https://github.com/rust-lang/cargo/blob/92f94a54ac8c25aff5f1051ebe59d8760539eac9/crates/cargo-util-schemas/src/core/partial_version.rs#L7)? This would involve adding a new struct PartialVersion, that supports parsing incomplete versions, and implementing `impl From for Version`

I'd be happy to submit a PR to add the struct & parsing if there's interest.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.