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

Don't panic if the new version constraint parser is stricter than the old one #25223

Merged
merged 2 commits into from
Jun 12, 2020

Commits on Jun 11, 2020

  1. configs: Don't panic if new version constraint parser raises an error

    The new provider installer code is using a new version constraint parser
    because it produces better error messages than the one we were using
    before. However, it has some cases where it returns errors that the old
    parser (which was entirely regex-match-based) didn't catch.
    
    In the long run we should consistently use the new parser everywhere, but
    until then we'll avoid panicking then the two disagree, by returning
    diagnostic messages instead of using MustParseVersionConstraints.
    
    For now, we only hit these error cases if the user enters something that
    the old parser allows but the new parser does not.
    apparentlymart committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    921a33a View commit details
    Browse the repository at this point in the history
  2. vendor: go get github.com/apparentlymart/go-versions@v1.0.0

    This new version permits omitting the space between the operator and the
    boundary in a ruby-style version constraint, like ">1.0.0" instead of
    "> 1.0.0".
    apparentlymart committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    8cc26d2 View commit details
    Browse the repository at this point in the history