Repository navigation
Conversation
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]>
Contributor
Author
|
Folded into #15080, the one engine PR for this work: its four commits are there, with this description as their section. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
dagger-module.tomlwith 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 asourcesmember 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 asourcesmember. Both cases fail without this change. Without only the second commit, only thesourcescase fails.dagger check -lon github.com/dagger/dagger lists the same checks on main and on this branch, fresh, after main moves and unchanged.