microsoft / microsoft/winget-cli

Virtual Packages

Open
#4,074 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dependencies Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

For example, there are many OpenJDK flavors:

  • Oracle.JDK.21
  • EclipseAdoptium.Temurin.21.JDK
  • Microsoft.OpenJDK.21
  • Azul.Zulu.21.JDK
  • BellSoft.LibericaJDK.21
  • BellSoft.LibericaJDK.21.Full
  • Amazon.Corretto.21

For packages that depend on OpenJDK 21, they do not have to tell the identity of the JDK that has already been installed in the system.
Winget packages that depend on OpenJDK try to install Microsoft.OpenJDK even though another JDK has already been installed.
We have to make them depend on another package that does not depend on a specific OpenJDK flavor instead of Microsoft.OpenJDK.

Proposed technical implementation details
  • Provides a package named VirtualPackage.OpenJDK.21.SDK as an example
  • Let the above packages provide it.
  • If the user tries to install another package that depends on VirtualPackage.OpenJDK.21.SDK and has installed at least one of OpenJDK 21 flavors before, no additional packages are installed.
  • If not installed yet, the one most recommended by the virtual package definition (Microsoft.OpenJDK.21?) will be installed.

A similar system has been available in Ubuntu. (no most recommended package feature is not implemented)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the existing package dependency and resolution behavior, then review how package metadata could represent virtual packages and providers. Done means packages can depend on the virtual OpenJDK 21 SDK, an installed compatible flavor satisfies that dependency, and a recommended flavor is selected when none is installed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.