-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support version numbers lacking minor or patch parts #219
Comments
This would be great. Could be hidden behind a feature EDIT: There's the
|
I forked this crate with just one change - support for versions |
A feature flag is not the right way to do it, since features are unified across a build graph and other dependencies might expect strict version parsing. (I don't think |
I agree with #219 (comment) — I would prefer that these not parse. I've updated the readme to indicate that if you are dealing with version numbers that are different from how Cargo interprets the SemVer spec, then this is not the crate you should be using. |
This is unfortunate, as I am writing a package manager for my linux distribution and it seems like the alternative you mentioned is not maintained 😕 It seems like forgiving-semver isn't maintained either.... |
I'm interacting with an external system that returns version numbers lacking a patch part (like
2.1
). I think it'd be fair to parse this as2.1.0
. Currently it rejects parsing with "expected more input". I'd similarly think that2
could be parsed as2.0.0
.I'm happy to take a stab at this in a PR, but wanted to get confirmation first given there are tests that are explicitly rejecting versions lacking minor or patch versions:
https://github.com/steveklabnik/semver/blob/051c39c50d565c597be65c4496597c7d16a514d9/src/version.rs#L399-L401
The text was updated successfully, but these errors were encountered: