Skip to content

Support for "or" dependencies. #1789

Open

Description

Description of the new feature / enhancement

I would like to be able to express that multiple different packages could be used to fufill a dependency. If an application relies on the OpenJDK, it is unlikely that it would rely on a specific vendor's implementation, and we shouldn't install a different version if the user already has one. Similarly, ReSharper (and other developer tools) rely on any version of Visual Studio being installed, but under the current system we could only express a single version and edition combination.

Proposed technical implementation details

One implementation could be that the dependencies key in the manifest could accept arrays of package id/version combinations in addition to single dependencies, where any value in the array would satisfy the dependency. For example:

# ...
Dependencies:
  PackageDependencies:
  - PackageIdentifier: Microsoft.VC++2013Redist-x64
    MinimumVersion: 12.0.30501.0
  - PackageIdentifier: Microsoft.VC++2013Redist-x86
    MinimumVersion: 12.0.30501.0
  - 
    - PackageIdentifier: Microsoft.VisualStudio.2019.Community
    - PackageIdentifier: Microsoft.VisualStudio.2019.Professional
    - PackageIdentifier: Microsoft.VisualStudio.2019.Enterprise
    - PackageIdentifier: Microsoft.VisualStudio.2022.Community
    - PackageIdentifier: Microsoft.VisualStudio.2022.Professional
    - PackageIdentifier: Microsoft.VisualStudio.2022.Enterprise

The YAML "array of arrays" syntax isn't awesome, so maybe this isn't the best method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Area-ManifestThis may require a change to the manifestDependenciesRelated to package level dependenciesIssue-FeatureThis is a feature request for the Windows Package Manager client.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions