Skip to content

python-sdk: remove loaded entrypoints with sdk-helpers - #90

Merged
eunomie merged 2 commits into
mainfrom
use-sdk-helpers-without-entrypoint
Nov 10, 2026
Merged

eunomie merged 2 commits into
mainfrom
use-sdk-helpers-without-entrypoint

Conversation

@eunomie

@eunomie eunomie commented Nov 10, 2026

Copy link
Copy Markdown
Member

Bumps sdk-helpers to v1.0.10 and uses its new ModuleManifest.withoutEntrypoint (dagger/sdk-helpers#16). The [entrypoint] table is no longer cut out of dagger-module.toml with the Go helper's remove-table before loading.

  • chore: use sdk-helpers v1.0.10 changes dagger-module.toml and dagger.lock only, like the v1.0.9 bump.
  • mod.dang staging and the move onto the SDK runtime now load the manifest and call .withoutEntrypoint.
  • withoutReplacedEntrypoint is removed, because it never changed the output:
    • In the branch that keeps the user's runtime, checkOneRunner already refuses any entrypoint.
    • In the last branch, a user's own Dang entrypoint is kept as loaded, and any other entrypoint is overwritten by withDangEntrypoint.
  • Removed as unused: ManifestToml.withoutEntrypoint, PyprojectHelper.withoutTable, and the Go remove-table command and its tests.

Generated manifests are unchanged for a regular [entrypoint] table. Two edge cases now behave differently:

  • An inline or dotted-key entrypoint, which the old text cut missed, is now removed too.
  • A malformed table, such as source = 123, now fails with load dagger-module.toml: ... instead of being dropped. The engine already rejects such a table in the version 2 manifest format.

Overlaps:

Checks, run one at a time with dagger check -m .dagger/modules/e2e <name> on CLI and engine v1.0.0-beta.25, all pass:
entrypoint-manifest-check, static-scope-init-check, static-types-load-check, linked-entrypoint-config-check, generate-scope-init-check, legacy-runtime-check.
Negative controls confirm the new code runs: without .withoutEntrypoint, static-types-load-check and legacy-runtime-check fail.
go vet and go test ./... pass in helpers/pyproject.

Signed-off-by: Yves Brissaud <yves@dagger.io>
sdk-helpers v1.0.10 adds ModuleManifest.withoutEntrypoint, which drops a
loaded entrypoint and keeps every other loaded field. Generation now
loads the manifest as written and removes the entrypoint there, instead
of cutting the [entrypoint] table out of the file first.

The two generation sites that used to cut a replaced entrypoint no
longer need to: a manifest with its own runtime and an entrypoint is
refused before loading, and every other entrypoint generation replaces
is overwritten by withDangEntrypoint. With no caller left, the
pyproject helper's remove-table command goes.

Signed-off-by: Yves Brissaud <yves@dagger.io>
@eunomie
eunomie marked this pull request as ready for review November 10, 2026 14:07
@eunomie
eunomie merged commit 1b60d4b into main Nov 10, 2026
68 checks passed
@eunomie
eunomie deleted the use-sdk-helpers-without-entrypoint branch November 10, 2026 14:08
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