microsoft / microsoft/winget-cli
Dependencies should have an option to match the architecture of the package.
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 just noticed a bug on the community repo (https://github.com/microsoft/winget-pkgs/issues/33583) where the user can't install EarTrumpet due to missing dependencies. After a little digging, I found that they are missing the x86 VCLibs (they of course have the x64 VCLibs because winget requires those).
The way dependencies find their installer entry is the same way that any manifest does, via GetPreferredInstaller, which returns a installer entry that matches the system's architecture. In 90% of cases that's what we want, however, there are some cases (a lot of times with redists) where we want a specific architecture for the dependency. In the current case, EarTrumpet would require the VCLibs, then winget would install the x64 version, not the x86 version that satisfies the dependency.
I am aware that some contributors have worked around this by adding different PackageIdentifiers for different architectures, although I think (maybe not) we all figured that was a workaround until #906 was completed.
There should be a way to specify the architecture (and scope, maybe?) of a dependency so that we can get this right.
Proposed technical implementation details
Some new schema entries, I suppose. We could just force all packages to ask for dependencies that match their own architecture, although in many cases that is not desired behavior (if it's a x86 package that can use x64 Java somehow, I want x64 Java).
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 tracing dependency installer selection through GetPreferredInstaller and review how dependency schema entries are represented. Define how a dependency requests an architecture, and determine whether scope is also needed. Done means dependency resolution can select the requested architecture without breaking cases where a different architecture is intentionally required.
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
- Needs clarification
- Newbie friendliness
- 35/100