-
-
Notifications
You must be signed in to change notification settings - Fork 21
Bump semver to 0.2, remove version_matches() #5
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
Conversation
semver 0.2 was the first to include a fix to how `VersionReq` comparisons work with pre-release identifiers. The fix results in, eg, version_matches(">= 1.4.0") not matching for a compiler version `1.8.0-nightly`. For more details, see dtolnay/semver#54. This makes `version_matches()` far less useful, and so it is removed. It's still possible to get the original intent by using the `Ord` impl on `semver::Version`. To make this more convenient, `semver::Version` is exported from this crate. This is a breaking change.
This pulls in nom, what's the impact on compile time? |
On my machine, wall time goes from 1.96s to 3.84s (median over 10 runs):
|
That's pretty quick for nom, didn't expect that! Still, a build script should be as lean as possible in my wishlist. |
Agreed. For background on this change, I want the bump to get at |
Realistically, a build script is compiled once per development session since it should rarely change. I don't think it's too bad to increase that by a second or two. |
Newest semver unfortunately requires building this list. Most of them small, but it's still.. not ideal 😄
|
Indeed! I filed steveklabnik/semver-parser#7 to see if a non-regex approach would be welcome. |
This should probably be going to v.5.0 now 😄 |
clippy uses semver==0.2.x rustc-version uses semver==0.1.x djc/rustc-version-rs#5
@Kimundi what's the status here? |
Update: i've merged in a PR for semver-parser that removes the regex dependency; I'm going to cut new versions of both it and semver soon, which have no breaking interface changes, just the dependnecy changes. |
@steveklabnik thanks for the ping! |
Hi, I'm sincerely sorry for taking so long to respond. Thanks for the PR! I'll merge this and #4, then will update the semver dep to the current version |
semver 0.2 was the first to include a fix to how
VersionReq
comparisons work with pre-release identifiers. The fix results in, eg,
not matching for a compiler version
1.8.0-nightly
. For more details,see dtolnay/semver#54.
This makes
version_matches()
far less useful, and so it is removed.It's still possible to get the original intent by using the
Ord
implon
semver::Version
. To make this more convenient,semver::Version
isexported from this crate.
This is a breaking change.