microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.35k stars 1.45k forks source link

Index V2 does not properly handle versions of `<part>.0` or `<part>.###0` #4928

Open Trenly opened 3 weeks ago

Trenly commented 3 weeks ago

When moving from IndexV1 to IndexV2 the code which builds up the index was heavily modified to optimize the size of the index. This has resulted in a parsing error, where versions such as 128.0 or 132.0 do not have the trailing .0 mapped into their version. When the version is more than two parts, or does not end in 0, the version is parsed properly. This only affects IndexV2.

This seems to affect latest_version, arp_min_version, and arp_max_version

For example -

Image Image

My best guess is that the version information isn't being handled explicitly as a string. When there is only a single decimal point, it then gets parsed as a number