Skip to content

Improvements to the version parsing functionality #204

@chalmerlowe

Description

@chalmerlowe

Is your feature request related to a problem? Please describe.
It would be useful to apply the lower-bounds-checker across more of Google's googleapis repositories. This is not currently possible, as there is a limitation such that the version parsing functionality does not cover a common use case and thus can't be used for a number of repositories.

Namely: version bounds of the following format cannot currently be parsed correctly, where != indicates a specific version(s) that should not be used:

protobuf>=3.20.2,<6.0.0dev,!=4.21.0,!=4.21.2

The code indicates these limitations:

foo==1.2.0
foo>=1.2.0
foo>=1.2.0, <2.0.0dev
foo<2.0.0dev, >=1.2.0

A search across all our googleapis repos shows that the offending format shows up across many repos and often multiple times in any given repo. So this is not a minor one-off problem.

Describe the solution you'd like
A more robust version parsing capability would be useful.
Would your team be amenable to a PR to support this capability?

Describe alternatives you've considered

  • Have all googleapis repositories simplify their required version definitions to only include upper and lower bounds. This is not feasible. There are many cases of broken dependencies that need to be avoided.
  • Monkey patch the checker in my repository. This is not feasible as it means others don't benefit my checker's ability to parse such version definitions and I would need to keep my monkeypatch in sync with possible changes upstream.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions