Skip to content

Feature installation order #43

@chrmarti

Description

@chrmarti

As we are preparing to open up features to community contributions, we found that some features need to install after other features. This issue proposes to add support for soft-dependencies to arrive at a reproducible ordering following these ordering requirements:

A feature can declare a list of other features that should be installed first if they are configured to be installed. (The soft-dependency itself does not add another feature to the list of features to be installed.)

E.g., the NodeJS feature would list the Python feature because it has to install a system version of Python if no version of Python is already installed:

{
    "id": "node",
    "installAfter": [ "devcontainers/features/python" ],
    // ...
}

Features that an install in any order will be installed in a fixed order (e.g., ordered by id) to ensure the result is always the same.

The "features" map in the devcontainer.json will remain a map. See https://github.com/devcontainers/spec/pull/27/files#r869018039 for a discussion.

To allow for progress on user contributable features, we can use a stop-gap measure like an ordered list of features that depend on a specific installation order and either bake that into the CLI at build time or fetch it at runtime. This list will be temporary and documented as such.

/cc @Chuxel @jkeech @edgonmsft @joshspicer @bamurtaugh @alexdima

Metadata

Metadata

Assignees

Labels

proposalStill under discussion, collecting feedback

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions