Skip to content

Features: install features reachable only through dependsOn #147

Closed

Description

@bilby91

Gap

The spec says dependsOn is a hard dependency: a feature's dependsOn entries must be installed even if devcontainer.json doesn't declare them. They are fetched recursively, the declared options apply, and duplicates are identified by ref and options. The reference CLI does this in computeDependsOnInstallationOrder, and it also locks those features in devcontainer-lock.json.

The engine only ever installs what devcontainer.json declares:

  • feature/graph.go uses Metadata.DependsOn only as an ordering edge between features that are both declared. An undeclared dependency is silently skipped (continue // unrelated).
  • No code path fetches a dependsOn reference. A feature that relies on one fails at install time, or quietly runs without it.

The README marks dependsOn ✅, which overstates this. design/features.md §5 already describes dependsOn as "recursive (transitively pulls in unlisted features)", but the code doesn't do that.

Expected

  • layerFeatures resolves dependsOn transitively: fetch, apply options, and dedupe against declared features by the spec's identity rules.
  • Ordering uses the full set.
  • Pulled-in features are recorded in the lockfile (feat(features): write and honor devcontainer-lock.json #146) the way the CLI records them.
  • Base-image (AlreadyInstalled) matching and the compose inputs hash take pulled-in features into account.

Follow-up to #26 / #146.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions