microsoft / microsoft/winget-cli
Define source priority behavior for package resolution
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Relevant area(s)
WinGet CLI
Description of the new feature / enhancement
WinGet supports source priority, but the feature remains experimental and its role in package resolution needs to be explicitly defined.
Source priority should provide simple and predictable behavior when multiple configured sources contain eligible candidates. After user-supplied filters are enforced, priority should act as a hard boundary rather than as one signal in a cross-source scoring mechanism.
This work is a sub-issue of https://github.com/microsoft/winget-cli/issues/6435.
Proposed technical implementation details
Define and document:
- how user-supplied
--source,--id,--name,--moniker,--exact, and version filters determine candidate eligibility before priority is applied - how the highest-priority source or sources containing eligible results are selected
- that lower-priority sources do not participate once eligible results exist at a higher priority
- how sources configured with the same priority are handled
- that cross-source package correlation is attempted only when every source at the highest applicable priority has exactly one eligible result
- that multiple results within an individual source remain ambiguous and are not resolved through cross-source correlation
- how source priority behaves across
install,show,upgrade, anduninstall - how installed-package source information constrains the applicable sources for
upgradeanduninstall - how interactive, non-interactive, COM API, and PowerShell callers observe unresolved ambiguity
- what diagnostic output explains that source priority determined the selected package
- whether the current implementation is ready to graduate from experimental status
An explicit --source argument should constrain the applicable sources before priority is evaluated.
Installed-package source selection is tracked by https://github.com/microsoft/winget-cli/issues/4347.
The original configurable multi-source behavior request is tracked historically at https://github.com/microsoft/winget-cli/issues/1488.
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 reading the linked parent issue #6435 and the current WinGet source-priority implementation. Use the related issue #4347 to understand installed-package source constraints. Done means the priority, filtering, ambiguity, diagnostics, caller behavior, command coverage, and experimental-status decision are explicitly defined and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100