Skip to content

blang/semver ParseRange fails to handle prereleases containing x #123

@danielhelfand

Description

@danielhelfand

What steps did you take:

Run vendir tools sort-semver -v '1.1.0 1.1.1' --constraint '1.1.0-fox'

What happened:

vendir: Error: Parsing version constraint '1.1.0-fox':
  Could not get version from string: "<"

What did you expect:

The version 1.1.0-fox should be a valid semver version and not result in the error above.

Anything else you would like to add:

This error can be traced back to the blang/semver library used by vendir: https://github.com/vmware-tanzu/carvel-vendir/blob/7a076ecfdfcfc6c2cac23e1b439829da1727369f/pkg/vendir/versions/semvers.go#L76

An issue/pr to the library has been made to blang/semver. If the response to the pr moves slow, we can add the fix to the k14s/semver fork.

Environment:

  • vendir version (execute vendir --version): v0.23.0
  • OS (e.g. from /etc/os-release): N/A

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue describes a defect or unexpected behaviorcarvel-acceptedThis issue should be considered for future work and that the triage process has been completedpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions