Skip to content

Version comparison is naive #160

@scop

Description

@scop

gup version**

v0.27.1

Description (About the problem)

gup's version comparison is using a simple lexicographic string comparison. This does not work properly e.g. when the number of digits in a version changes.

Steps to reproduce

Example case added in #159 -- 1.2.0 is treated as newer than 1.11.5.

Expected behavior

1.2.0 is older than 1.11.5.

Additional details**

I don't know if the version comparison implementation used by go mod is exposed somewhere. But that would be a good one to use for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions