Feature installation order · Issue #43 · devcontainers/spec (original) (raw)
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:
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