Skip to content

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.

2 participants