You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating this issue to discuss about for PartialVersion parsing. Currently Version::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? This would involve adding a new struct PartialVersion, that supports parsing incomplete versions, and implementing impl From<semver::PartialVersion> for Version
I'd be happy to submit a PR to add the struct & parsing if there's interest.
The text was updated successfully, but these errors were encountered:
I am open to it, but I have seen different projects expect different semantics from a "partial version". I would need to be shown that the behavior you want in this crate is widely applicable. For example I am not sure there is consensus about whether a partial version is supposed to represent build metadata.
I'd propose following the implementation in Cargo, where if a PartialVersion can be completely parsed as a Version then it can contain build metadata, e.g., 0.1.0+build parses into a PartialVersion which contains build metadata, but 0.1+build would fail with a build metadata error.
Creating this issue to discuss about for PartialVersion parsing. Currently
Version::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? This would involve adding a new struct PartialVersion, that supports parsing incomplete versions, and implementing
impl From<semver::PartialVersion> for Version
I'd be happy to submit a PR to add the struct & parsing if there's interest.
The text was updated successfully, but these errors were encountered: