Skip to content

Make the generic legacy runtime setter public - #8

Merged
eunomie merged 3 commits into
mainfrom
public-legacy-runtime
Oct 7, 2026
Merged

eunomie merged 3 commits into
mainfrom
public-legacy-runtime

Conversation

@eunomie

@eunomie eunomie commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Expose ModuleManifest.withLegacyRuntime(runtime, moduleSource, engineVersion) so an SDK can select a runtime that is not built in.

The runtime source is a built-in name, a path relative to the manifest directory, or a module reference such as github.com/dagger/python-sdk/runtime@v1. It resolves like a dependency source in the engine.

  • The private setter moves next to its siblings with a docstring; the seven named setters behave as before.
  • validate no longer rejects a non-built-in runtime when no manifest was loaded. The source goes through the same relative-path rule as dependency sources, so an absolute path still raises. A typo such as pyhton now fails in the engine rather than in the helper.
  • No pin is resolved for the runtime: with lock: true only a pin already carried by a loaded manifest for the same source is kept. Put @<commit> in the source to lock it.
  • README: new "Select the legacy runtime" section.
  • Three new checks: writesCustomLegacyRuntime, composesCustomLegacyRuntime, keepsLoadedCustomLegacyRuntime.

Needed by dagger/python-sdk#33 for --legacy-runtime. A v1.0.6 tag is needed after merge.

An SDK can then select a runtime that is not built in, such as its own
runtime directory given as a path or a module reference.

Signed-off-by: Yves Brissaud <[email protected]>
A typo such as "pyhton" has no "/" and no ".", so the engine looked for
a local directory of that name and failed on a missing path instead of
an unknown runtime.

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
eunomie merged commit 16e5bf2 into main Oct 7, 2026
eunomie added a commit to eunomie/python-sdk that referenced this pull request Oct 7, 2026
Writing `[runtime] source` needs ModuleManifest.withLegacyRuntime, public since
dagger/sdk-helpers#8, which v1.0.6 carries: its tag peels to 16e5bf2, the merge
of that pull request. The dependency names the tag, and dagger.lock records the
commit behind it in place of the entries of the pin it replaces.

A bare single-word runtime source is the name of a runtime built into the engine
there, so what this SDK writes for its own runtime is a module reference.

Signed-off-by: Yves Brissaud <[email protected]>
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.

2 participants