Skip to content

Partition codegen by @sourceMap - #25

Draft
eunomie wants to merge 1 commit into
entrypoint-seed-composerfrom
codegen-partition
Draft

eunomie wants to merge 1 commit into
entrypoint-seed-composerfrom
codegen-partition

Conversation

@eunomie

@eunomie eunomie commented Nov 11, 2026

Copy link
Copy Markdown
Member

First part of the unified-clients work (design: row 6 part 1; no user-visible change). The codegen reads @sourceMap(module:) on types and fields: --core (the default) generates the types no module owns, exactly as today; --client <module> generates only that module's types into generated/Clients/<Name>/ in the namespace Dagger\\Clients\\<Name>, naming core types under \\Dagger\\. Refusals: a client name equal to another client's ignoring case (an ownership marker file lets the same client regenerate), a field contributed to a type other than Query, a name PHP reserves. Four vendored codegen files change; sdk/VENDOR.md lists them.

Checks, on the beta.27 engine and CLI: new sdk-codegen-unit-check passed (27 tests, 93 assertions, no engine needed); sdk-unit-check passed with a temporary wider filter (201 tests). Locally in a throwaway container, --core and the default path on a real 149-type engine schema produced the same 136 files, byte for byte, as main's codegen on that schema with its one module removed.

Not proved: that the engine serves such a schema, that a client call works, or that Composer loads the generated client (later parts).

The engine attributes client types with `@sourceMap(module:)`. Core generation
skips them, and each client generates into `Dagger\Clients\<Name>`. A client can
only add fields to `Query`. `.client-module` lets regeneration tell the same
client from a case variant; the caller may replace it with a list check later.

Signed-off-by: Yves Brissaud <yves@dagger.io>
@eunomie
eunomie changed the base branch from main to entrypoint-seed-composer November 11, 2026 14:32
@eunomie
eunomie added this pull request to stack #32 November 11, 2026 14:32
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