microsoft / microsoft/winget-cli
Version number sorting
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
If version number of package contains dashes, winget will sort it incorrectly and will think that for example older version is latest instead of latest version.
This is issue with temporal version according to @stephengillie in this PR https://github.com/microsoft/winget-pkgs/pull/93519#issuecomment-1379382571
FontForge.FontForge package is affected by this issue because it's versions are looking like this (08-03-2022, 01-01-2023, etc.) This can be seen in this snapshot of repo https://github.com/microsoft/winget-pkgs/tree/473159531f3618f21a7b89151fb181d0632c59df/manifests/f/FontForge/FontForge
Steps to reproduce
Install latest fontforge.
List update using winget upgrade
It'll show version 08-03-2022 as latest despite having version 01-01-2023.
Expected behavior
Running winget upgrade should not show that update is available if version 01-01-2023 is already installed
Actual behavior
Running winget upgrade shows that upgrade is available as version 08-03-2022.

Environment
Windows: Windows.Desktop v10.0.22621.1105
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.101.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the FontForge case with versions 08-03-2022 and 01-01-2023 using the listed winget upgrade steps, then trace the package version comparison path in the C++ CLI. Done means an installed 01-01-2023 version is not offered an upgrade to 08-03-2022, with coverage for dashed temporal versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100