Skip to content

Bug: Version comparison breaks when version segment exceeds 9 (string comparison instead of System.Version) #153

@HeyItsGilbert

Description

@HeyItsGilbert

Problem

Version strings are compared lexicographically rather than as [System.Version] objects.
This means 10.0.0 sorts before 9.0.0, breaking "latest" resolution for modules on newer versions.

Related

Likely connected to #135 (Cannot convert PSDepend.Format.ps1xml to System.Version).
Fix both together.

Repro

Any module with a version segment > 9 will resolve incorrectly when using Version = 'latest'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Up Next

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions