microsoft / microsoft/winget-cli
Installers should be able to inherit and merge dependencies from 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
This is an excerpt from a package I am about to submit - as you can see, 2 out of 3 dependencies are the same for both installers:
PackageIdentifier: OpenBoxLab.RaiDrive
PackageVersion: 2023.9.32
# ...
Installers:
- InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x64.msi
Architecture: x64
InstallerSha256: B486683E0C223A1FF7D0251A050DF80A649D09F47F7026A5197D79F1E11281A5
Dependencies:
PackageDependencies:
- PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
- PackageIdentifier: Microsoft.EdgeWebView2Runtime
- PackageIdentifier: Microsoft.VCRedist.2015+.x64
- InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x86.msi
Architecture: x86
InstallerSha256: 32D174DDF313150E125BB020DC9CC79CDF5EF5C7D4842E831A7F65B970004F95
Dependencies:
PackageDependencies:
- PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
- PackageIdentifier: Microsoft.EdgeWebView2Runtime
- PackageIdentifier: Microsoft.VCRedist.2015+.x86
ManifestType: installer
ManifestVersion: 1.5.0
It seems sensible to refactor to:
PackageIdentifier: OpenBoxLab.RaiDrive
PackageVersion: 2023.9.32
# ...
Dependencies:
PackageDependencies:
- PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
- PackageIdentifier: Microsoft.EdgeWebView2Runtime
Installers:
- InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x64.msi
Architecture: x64
InstallerSha256: B486683E0C223A1FF7D0251A050DF80A649D09F47F7026A5197D79F1E11281A5
Dependencies:
PackageDependencies:
- PackageIdentifier: Microsoft.VCRedist.2015+.x64
- InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x86.msi
Architecture: x86
InstallerSha256: 32D174DDF313150E125BB020DC9CC79CDF5EF5C7D4842E831A7F65B970004F95
Dependencies:
PackageDependencies:
- PackageIdentifier: Microsoft.VCRedist.2015+.x86
ManifestType: installer
ManifestVersion: 1.5.0
Surprisingly, this doesn't work, as the installers' dependencies (or at least the package dependencies) will be overridden. I would have found it more intuitive if they would have been inherited and merged by default, but for the sake of backwards compatibility, I'd suggest a boolean option inherit:
PackageIdentifier: OpenBoxLab.RaiDrive
PackageVersion: 2023.9.32
# ...
Dependencies:
PackageDependencies:
- PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
- PackageIdentifier: Microsoft.EdgeWebView2Runtime
Installers:
- InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x64.msi
Architecture: x64
InstallerSha256: B486683E0C223A1FF7D0251A050DF80A649D09F47F7026A5197D79F1E11281A5
Dependencies:
Inherit: true
PackageDependencies:
- PackageIdentifier: Microsoft.VCRedist.2015+.x64
- InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x86.msi
Architecture: x86
InstallerSha256: 32D174DDF313150E125BB020DC9CC79CDF5EF5C7D4842E831A7F65B970004F95
Dependencies:
Inherit: true
PackageDependencies:
- PackageIdentifier: Microsoft.VCRedist.2015+.x86
ManifestType: installer
ManifestVersion: 1.5.0
Since most of the time that this feature would be handy is probably within the context of architecture-specific packages, it may become obsolete if #1665 got implemented. I imagine then we could write someting like this:
PackageIdentifier: OpenBoxLab.RaiDrive
PackageVersion: 2023.9.32
# ...
Dependencies:
PackageDependencies:
- PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
- PackageIdentifier: Microsoft.EdgeWebView2Runtime
- PackageIdentifier: Microsoft.VCRedist.2015+.{$architecture}
Installers:
- InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x64.msi
Architecture: x64
InstallerSha256: B486683E0C223A1FF7D0251A050DF80A649D09F47F7026A5197D79F1E11281A5
- InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x86.msi
Architecture: x86
InstallerSha256: 32D174DDF313150E125BB020DC9CC79CDF5EF5C7D4842E831A7F65B970004F95
ManifestType: installer
ManifestVersion: 1.5.0
Proposed technical implementation details
No response
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. Start by reviewing how package-level and installer-level Dependencies are represented and merged, then compare the proposed inheritance behavior with the possible architecture-specific approach in issue #1665. Done means an agreed, backward-compatible dependency inheritance design with validation coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100