microsoft / microsoft/winget-cli
Use installed version for package disambiguation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Description of the new feature / enhancement
I'm not sure if this is a bug or a new feature, since I see some stuff happening with versions in the logs. I'm marking it as a feature for now, under the presumption that providing the user expectation of how it functions will lead to more meaningful triage and discussion.
There are times when multiple matching packages are found, especially during upgrade or export.
One of the best examples of this is OBSProject.OBSStudio and OBSProject.OBSStudio.Pre-release
I've captured the logs of upgrade and export here
While we are waiting for #147 OBS Studio has been split into these separate packages, as have many others. The key factor here is that there are no matching versions in these two packages.

I currently have version 27.1.3 installed on my system. Given that this version does not exist in OBSProject.OBSStudio.Pre-release, this should be a disambiguating factor which clearly points to which of the two packages I have installed
Proposed technical implementation details
If multiple matches are found for a package, get the current version the user has installed. I'll refer to this as INSALLED_VERSION for clarity.
- If
INSTALLED_VERSIONis unknown, do not disambiguate by version - If
INSTALLED_VERSIONdoes not exist for any matching package identifier, do not disambiguate by version - If
INSTALLED_VERSIONexists in more than one matching package identifier, do not disambiguate by version - If
INSTALLED_VERSIONexists in exactly one package identifier, ensure that the disambiguation is valid, and then select the matching package identifier as correct; A warning to the user may be appropriate, to cover the edge case where the source may be missing a version
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 reviewing the linked upgrade and export logs and tracing where multiple matching package identifiers are disambiguated. Use the proposed installed-version cases as acceptance criteria: select an identifier only when the installed version exists in exactly one match and otherwise leave disambiguation unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100