Skip to content

Delegate version number comparisons to language agents #685

@mscottford

Description

@mscottford

Different language ecosystems have different rules about version number formatting, valid syntax, sorting, and equivalence. It's unrealistic to expect the core CLI to correctly handle all of these differences.

A new gRPC method should be added to the language agent specification that can be used to compare two version strings, CompareVersions(string, string). This will behave similarly to typical compare functions:

  • If the two values are equivalent, then the result will be 0.
    • The strings do not need to be equal to be equivalent. 1.0 is likely equivalent to 1.0.0.0, but ecosystem rules should be used to make that determination.
  • If the first value is less than the second value, then the result will be less than 0.
  • If the first value is greater than the second value, then the result will be greater than 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions