microsoft / microsoft/winget-cli
Support alternative dependency
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
Some of the packages are known to be conflicted (eg. Microsoft.VC++2015-2022Redist-x64 and Microsoft.VC++2015-2019Redist-x64), but we can only specify one of them in the manifest, and users with another installed cannot successfully upgrade or install our package.
Proposed technical implementation details
We have several means of resolving this:
- One is to let the library specify its possible alternatives in its manifest, so
Microsoft.VC++2015-2019Redist-x64can indicate that it's replaceable byMicrosoft.VC++2015-2022Redist-x64. When the user try to install a package that depends onMicrosoft.VC++2015-2019Redist-x64,wingetscans if any of the alternatives is installed, and skip installingMicrosoft.VC++2015-2019Redist-x64accordingly. - A slightly different way is to let the package specify the package it can replace, so
Microsoft.VC++2015-2022Redist-x64can indicate that it's capable of replacingMicrosoft.VC++2015-2019Redist-x64.wingetwill regardMicrosoft.VC++2015-2019Redist-x64as installed as long asMicrosoft.VC++2015-2022Redist-x64is installed. - The safest solution is let the dependent application to specify a list of alternative. When the application is being installed,
wingetwill check the alternatives besides the default dependency. If none of them is installed,wingetwill kick off installing the default one.
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
No files, tests, or entry points are named in the issue. Start by clarifying which of the three alternative-dependency models should be pursued and then locate the manifest and dependency-resolution areas. Done means the selected model is specified and its behavior is covered for conflicting packages.
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
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100