Skip to content

core: version 2 module manifests list an entrypoint's dependencies - #15071

Closed
sipsma wants to merge 4 commits into
mainfrom
sipsma/manifest-entrypoint-dependencies
Closed

sipsma wants to merge 4 commits into
mainfrom
sipsma/manifest-entrypoint-dependencies

Conversation

@sipsma

@sipsma sipsma commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

A dagger-module.toml with an [entrypoint] table and [[dependencies]] but no [runtime] was an error: "manifest version 2 has no dependency list". Such a manifest now loads as version 2. The engine loads the listed modules and installs them into the entrypoint's schema, so the entrypoint can call them, and a sources member is type-checked against that schema too. Writing the manifest keeps the dependencies.

This is for a generated entrypoint that calls a module the module's own code doesn't use. The Go SDK's entrypoint will build a module's process with dagger/go this way, so runtimes get dagger/go's per-package builds and their cache.

Every other manifest loads as before. A module with a runtime and dependencies stays on the pre-v2 format, which engines that predate entrypoints still load. A manifest with an entrypoint and no dependencies is unchanged.

Testing:

  • core/modules: parsing, validation and round-trip of the new manifest shape.
  • TestModule/TestDangModuleEntrypointDependencies: an entrypoint's call reaches a dependency, with and without a sources member. Both cases fail without this change. Without only the second commit, only the sources case fails.
  • No timing series: no existing manifest takes the new path, since it was an error until now. dagger check -l on github.com/dagger/dagger lists the same checks on main and on this branch, fresh, after main moves and unchanged.

A dagger-module.toml with an entrypoint and dependencies but no runtime
was an error: manifest version 2 had no dependency list, so a Dang
entrypoint saw only the core API. It now loads as version 2 with those
dependencies, which the module loads and the entrypoint's schema holds,
as a Go module's generated entrypoint needs for dagger/go, and writing it
keeps them.

Signed-off-by: Erik Sipsma <[email protected]>
Evaluating sources type-checks the whole Dang entrypoint, but against
the default schema, so an entrypoint whose call reaches a dependency
failed to load: the dependency was not found. The schema now holds the
entrypoint's dependencies, loaded as modules.

Signed-off-by: Erik Sipsma <[email protected]>
…st lists

A version 2 manifest's dependencies are installed in the entrypoint's
schema: a call reaches them, and so do the sources a sources member
returns, which the engine evaluates with them.

Signed-off-by: Erik Sipsma <[email protected]>
With version 2 manifests listing an entrypoint's dependencies, no
combination of tables is an error any more, so the selection returns the
format alone.

Signed-off-by: Erik Sipsma <[email protected]>
@sipsma

sipsma commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #15080, the one engine PR for this work: its four commits are there, with this description as their section.

@sipsma sipsma closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant