Skip to content
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

Parse deprecated versions. #93

Merged
merged 1 commit into from
Oct 7, 2016
Merged

Parse deprecated versions. #93

merged 1 commit into from
Oct 7, 2016

Conversation

steveklabnik
Copy link
Contributor

Due to issues like rust-lang/cargo#3124, we've
found that the old parser was lenient in ways that the new parser isn't.
We've analyzed all the crates on crates.io, and found the patterns that
weren't working.

This commit adds support back for those versions, but marks them as
deprecated. Each of them had a different way in which they were
incorrect, but resolved to some kind of correct constraint. So the
deprecation strategy is this:

  1. If a version fails to parse, check if it matches the deprecated
    pattern.
  2. If it does, convert it to the real pattern.
  3. Return an error that it's deprecated, and the error will contain the
    fixed-up version constraint.

Due to issues like rust-lang/cargo#3124, we've
found that the old parser was lenient in ways that the new parser isn't.
We've analyzed all the crates on crates.io, and found the patterns that
weren't working.

This commit adds support back for those versions, but marks them as
deprecated. Each of them had a different way in which they were
incorrect, but resolved to some kind of correct constraint. So the
deprecation strategy is this:

1. If a version fails to parse, check if it matches the deprecated
pattern.
2. If it does, convert it to the real pattern.
3. Return an error that it's deprecated, and the error will contain the
fixed-up version constraint.
@steveklabnik steveklabnik merged commit ee2eef3 into master Oct 7, 2016
@steveklabnik steveklabnik deleted the deprecation branch October 7, 2016 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant