Repository navigation
Conversation
This was referenced Oct 14, 2026
vito
force-pushed
the
naming/4-module-naming
branch
from
October 14, 2026 23:28
d7ecd2b to
3c3a690
Compare
vito
force-pushed
the
naming/3-dagql-aliases
branch
from
October 15, 2026 20:39
0b3be7b to
dae8ed4
Compare
APIViewVersion now keeps a declared prerelease from PrereleaseViewsVersion (v1.0.0-beta.21) on, so a view gate can separate v1.0.0 betas. Dev builds still drop their prerelease and share the release's view. Every earlier v1.0.0 prerelease, from v1.0.0-0 to v1.0.0-beta.20, shares the v1.0.0-beta.20 view: it sorts above every gate set while views were base-granular, so those callers keep exactly the API they had. Add IdentifierCasingVersion, the cut for the identifier casing changes, and APIVersionAtLeast, the same gate for a declared version outside a call. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
Prove that a field gated at engine.IdentifierCasingVersion is visible to beta.21+, dev builds and v1.0.0, and hidden from beta.20 and earlier, including v1.0.0-0, while gates set before views kept prereleases keep applying to every v1.0.0 prerelease. Pin that view-scoped calls are cached per view and unscoped ones are not, and that every pre-cut v1.0.0 prerelease gets one core schema. Update the version-gating doc and the comments that said views drop prereleases. Signed-off-by: Alex Suraci <[email protected]>
While the engine is a v1.0.0 prerelease or dev build, a module declaring exactly v1.0.0 gets the shared pre-cut view (v1.0.0-beta.20) instead of the release's. Every sdk-helpers tag and go-sdk declare v1.0.0 and are locked by SDKs and users; on a beta.21 engine they would otherwise see the renamed API and break with no way to re-pin a locked tag. The clamp moves that break to v1.0.0 GA. ModuleAPIViewVersion maps module engineVersions to views (module client sessions, default schema builders) and backs APIVersionAtLeast. Client versions keep APIViewVersion. Proposal pending maintainer sign-off; this commit drops cleanly. Signed-off-by: Alex Suraci <[email protected]>
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), and exactly v1.0.0 while the engine is a prerelease (engine.ModuleAPIViewVersion), keep the strcase rules byte for byte. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView, the same view filter as the identifier API. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Refs #13668
Say which mapping applies to modules (ModuleAPIViewVersion) and clients (APIViewVersion), that fixtures testing API past the cut must declare a prerelease from the cut on, and that a client's view follows the CLI that starts its session, not the SDK release it was generated with. Signed-off-by: Alex Suraci <[email protected]>
Stores written before prerelease-granular views recorded "v1.0.0" as the view of every v1.0.0 prerelease caller. That view is now the release's, past every prerelease gate, so a GA or dev-build caller would hit pre-cut results, and IDs naming fields gated before the cut would stop loading once such gates exist. Bump the persistence schema so they are wiped on import. Signed-off-by: Alex Suraci <[email protected]>
IdentifierNamingVersion moves from v1.0.0-0 to engine.IdentifierCasingVersion (v1.0.0-beta.21): beta.20 is already released, and every earlier v1.0.0 prerelease now shares beta.20's view, so they keep the API and names they shipped with. The identifier API (Query.formatIdentifiers, identifier, namingDictionary) is installed on the new IdentifierNamingView, the same filter that will gate module naming. SDK generators pick their naming rules by whether formatIdentifiers is in the schema, so the two must never drift apart. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
This was referenced Oct 22, 2026
The CLI derives command, flag and type names from schema names. It now spells them by the naming rules of the engine version it ships with (e2eTest is --e2e-test, not --e-2-e-test): the typedefs it loads don't say which engine version each module declares, and a client follows the version it connects with. What users type still resolves by the legacy rules too, on the CLI side only: legacy flag spellings normalize to the current ones, legacy command spellings are cobra aliases and are matched by the shell and sibling-main lookups (fn-2 for fn2), and module constructors and type names match either spelling, so a legacy module's constructor (myLlmMod) still roots its command paths. Enum flags and collection keys take a member in any case, or else the single member that matches once '_' and '-' are ignored (ARM_64 for ARM64); the CLI always sends the canonical name, so the engine needs no aliases. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
ModuleNamingSuite covers a Go module at the current (dev) engine version: acronym types, fields, arguments and enum members keep their casing, the legacy spellings are not in the schema, and the CLI still resolves legacy enum member spellings. The same module at v1.0.0-beta.21 gets the new names, and at v1.0.0-beta.20, v1.0.0-beta.19, v1.0.0-0 and v0.21.9 the strcase names, byte for byte. A Python module names its types like the Go one, and the CLI flag for an E2E-style argument works under both rules. TestSameTypeDefsAcrossVersions serves two Dang modules side by side, at beta.20 and beta.21, whose runtimes make the same typedef constructor calls: each must get its own rules' names, with no cache cross-talk. The beta.21 one also checks that a reference to JSONValue resolves to the core type. The Go module no longer references JSONValue/LLMMessage/LLMTokenUsage: the in-repo Go SDK's codegen still names a module's self-binding schema by strcase, so such a module on the new rules doesn't build. That fix moves to the Go SDK repository. Existing expectations follow the new names: comURL for a Python com_url argument, and the dagger functions table padded to experimental-with-all-gpus. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/4-module-naming
branch
from
October 22, 2026 15:40
3c3a690 to
0a53dcd
Compare
A module's main type is the one its name designates. With the strcase rules both spellings usually normalized alike, but engine/naming cuts words around digits and acronyms by spelling, so an SDK or template spelling the class K8STools for module k8s-tools (or My2Go/my2go, Sha256Sum/sha256sum, Go1Password/go-1password, E2Eapi/e2eapi) normalized differently: no main object, no constructor, and the first dagger call failed with "no main object". On the new rules, Namer.SameDeclaredName also accepts names that are the same once flattened (lowercased, no word boundaries). Main object lookups (Module.MainObject, ObjectByOriginalName, isMainObject, the SDK module's main object) take a normalized match first and a flat one only when it's the only one, so ambiguous spellings match nothing rather than the wrong type. NamespaceObject treats words that flatten to the module's name, on a word boundary, as its prefix, so K8STools is the module's K8sTools and K8SToolsClient is K8sToolsClient. The legacy rules compare exactly as before. Also name entrypoint resources by the module's rules: EntrypointSources built its dangModule without a Namer, which meant the legacy rules. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
K8s and K3s are product names, not acronyms: K8STools kept its author's K8S, so it disagreed with K8sTools and k8s-tools, and a module k8s-tools whose class an SDK spells K8STools didn't name its main type K8sTools. As terms with a fixed spelling, K8STools, K8sTools, k8s-tools and K8S_TOOLS all parse as K8s · tools (PASCAL K8sTools, CAMEL k8sTools, SNAKE k8s_tools, SCREAMING_SNAKE K8S_TOOLS). They go into the Initial dictionary rather than a new one. It shipped in v1.0.0-beta.20, but only behind the experimental Query.formatIdentifiers, which no SDK calls yet, and no released engine names modules with it: that starts at the v1.0.0-beta.21 cut. Other numeronyms (k0s, i18n, l10n, a11y) are left out: they already parse as one word unless written all-caps, and no spelling of them is clearly canonical. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
K8STools now matches k8s-tools by its normalized name, since K8s is a dictionary term, so the flat-match fallback is tested with pairs that still normalize differently (My2Go, Sha256Sum, Go1Password, E2Eapi), and TestMainTypeSpelling covers both: k8s-tools by normalization, sha256sum (Sha256Sum is SHA256Sum, the module SHA256sum) by flat spelling. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
to dagger/go-sdk
that referenced
this pull request
Oct 22, 2026
Re-vendor engine/naming from dagger/dagger#14669's naming/4-module-naming at 3bae26f, whose dictionary spells K8s and K3s as terms, with its regenerated test vectors. That branch isn't merged: re-pin to the commit that merges. Signed-off-by: Alex Suraci <[email protected]>
vito
changed the base branch from
naming/3-dagql-aliases
to
naming/view-prerelease-gate
October 22, 2026 18:34
vito
force-pushed
the
naming/view-prerelease-gate
branch
from
October 27, 2026 20:05
2873e64 to
94fdbda
Compare
vito
added a commit
that referenced
this pull request
Oct 28, 2026
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), keep the strcase rules byte for byte. A module's view is engine.APIViewVersion of its engineVersion, as for clients; prerelease engines refuse modules past their own view, so exactly v1.0.0 needs a v1.0.0 engine. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Cherry-picked from 6a61bfc (#14669), resolved against the removal of engine.ModuleAPIViewVersion. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 28, 2026
#14669 moved Query.identifier, formatIdentifiers, namingDictionary and their types to the views that name modules by engine/naming (beta.21+), so SDK codegen could gate on the field's presence. SDKs will instead gate on the version the target module declares plus the engine's version, and call formatIdentifiers themselves from their generator execs, which may run at a pre-cut view. So restore the visibility #14667 shipped: from v1.0.0-0 on. formatIdentifiers' version argument still selects the dictionary, and module naming keeps its own gate (core.IdentifierNamingView, beta.21). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/view-prerelease-gate
branch
from
October 28, 2026 16:11
e65f47e to
b4aa8d8
Compare
vito
added a commit
that referenced
this pull request
Oct 28, 2026
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), keep the strcase rules byte for byte. A module's view is engine.APIViewVersion of its engineVersion, as for clients; prerelease engines refuse modules past their own view, so exactly v1.0.0 needs a v1.0.0 engine. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Cherry-picked from 6a61bfc (#14669), resolved against the removal of engine.ModuleAPIViewVersion. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 28, 2026
#14669 moved Query.identifier, formatIdentifiers, namingDictionary and their types to the views that name modules by engine/naming (beta.21+), so SDK codegen could gate on the field's presence. SDKs will instead gate on the version the target module declares plus the engine's version, and call formatIdentifiers themselves from their generator execs, which may run at a pre-cut view. So restore the visibility #14667 shipped: from v1.0.0-0 on. formatIdentifiers' version argument still selects the dictionary, and module naming keeps its own gate (core.IdentifierNamingView, beta.21). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 28, 2026
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), keep the strcase rules byte for byte. A module's view is engine.APIViewVersion of its engineVersion, as for clients; prerelease engines refuse modules past their own view, so exactly v1.0.0 needs a v1.0.0 engine. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Cherry-picked from 6a61bfc (#14669), resolved against the removal of engine.ModuleAPIViewVersion. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 28, 2026
#14669 moved Query.identifier, formatIdentifiers, namingDictionary and their types to the views that name modules by engine/naming (beta.21+), so SDK codegen could gate on the field's presence. SDKs will instead gate on the version the target module declares plus the engine's version, and call formatIdentifiers themselves from their generator execs, which may run at a pre-cut view. So restore the visibility #14667 shipped: from v1.0.0-0 on. formatIdentifiers' version argument still selects the dictionary, and module naming keeps its own gate (core.IdentifierNamingView, beta.21). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/view-prerelease-gate
branch
from
October 29, 2026 01:18
7cbf566 to
4979152
Compare
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), keep the strcase rules byte for byte. A module's view is engine.APIViewVersion of its engineVersion, as for clients; prerelease engines refuse modules past their own view, so exactly v1.0.0 needs a v1.0.0 engine. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Cherry-picked from 6a61bfc (#14669), resolved against the removal of engine.ModuleAPIViewVersion. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 29, 2026
#14669 moved Query.identifier, formatIdentifiers, namingDictionary and their types to the views that name modules by engine/naming (beta.21+), so SDK codegen could gate on the field's presence. SDKs will instead gate on the version the target module declares plus the engine's version, and call formatIdentifiers themselves from their generator execs, which may run at a pre-cut view. So restore the visibility #14667 shipped: from v1.0.0-0 on. formatIdentifiers' version argument still selects the dictionary, and module naming keeps its own gate (core.IdentifierNamingView, beta.21). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), keep the strcase rules byte for byte. A module's view is engine.APIViewVersion of its engineVersion, as for clients; prerelease engines refuse modules past their own view, so exactly v1.0.0 needs a v1.0.0 engine. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Cherry-picked from 6a61bfc (#14669), resolved against the removal of engine.ModuleAPIViewVersion. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 29, 2026
#14669 moved Query.identifier, formatIdentifiers, namingDictionary and their types to the views that name modules by engine/naming (beta.21+), so SDK codegen could gate on the field's presence. SDKs will instead gate on the version the target module declares plus the engine's version, and call formatIdentifiers themselves from their generator execs, which may run at a pre-cut view. So restore the visibility #14667 shipped: from v1.0.0-0 on. formatIdentifiers' version argument still selects the dictionary, and module naming keeps its own gate (core.IdentifierNamingView, beta.21). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
eunomie
pushed a commit
to eunomie/go-sdk
that referenced
this pull request
Oct 30, 2026
Dagger is moving the identifier naming rules and some core API renames behind a cut at v1.0.0-beta.21 (dagger/dagger#14669, #14681), with views for v1.0.0 prereleases becoming prerelease-granular. A bare "v1.0.0" lands after the cut, so on a beta.21+ engine go-sdk's own API would be renamed (GoSdk -> GoSDK, constructor goSdk -> goSDK), breaking the e2e module's goSdk(...) calls and every caller, while go-sdk's codegen is still strcase-based. beta.20 is the last pre-cut version and satisfies every existing v1 gate (the newest is beta.17), so the API go-sdk sees today is unchanged. Engines check a module's version against their own by base version, so beta.12-beta.19 engines still load a module declaring beta.20. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 2, 2026
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), keep the strcase rules byte for byte. A module's view is engine.APIViewVersion of its engineVersion, as for clients; prerelease engines refuse modules past their own view, so exactly v1.0.0 needs a v1.0.0 engine. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Cherry-picked from 6a61bfc (#14669), resolved against the removal of engine.ModuleAPIViewVersion. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 2, 2026
#14669 moved Query.identifier, formatIdentifiers, namingDictionary and their types to the views that name modules by engine/naming (beta.21+), so SDK codegen could gate on the field's presence. SDKs will instead gate on the version the target module declares plus the engine's version, and call formatIdentifiers themselves from their generator execs, which may run at a pre-cut view. So restore the visibility #14667 shipped: from v1.0.0-0 on. formatIdentifiers' version argument still selects the dictionary, and module naming keeps its own gate (core.IdentifierNamingView, beta.21). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 4, 2026
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), keep the strcase rules byte for byte. A module's view is engine.APIViewVersion of its engineVersion, as for clients; prerelease engines refuse modules past their own view, so exactly v1.0.0 needs a v1.0.0 engine. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Cherry-picked from 6a61bfc (#14669), resolved against the removal of engine.ModuleAPIViewVersion. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 4, 2026
#14669 moved Query.identifier, formatIdentifiers, namingDictionary and their types to the views that name modules by engine/naming (beta.21+), so SDK codegen could gate on the field's presence. SDKs will instead gate on the version the target module declares plus the engine's version, and call formatIdentifiers themselves from their generator execs, which may run at a pre-cut view. So restore the visibility #14667 shipped: from v1.0.0-0 on. formatIdentifiers' version argument still selects the dictionary, and module naming keeps its own gate (core.IdentifierNamingView, beta.21). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Modules that declare engine version v1.0.0-beta.21 (IdentifierNamingVersion) or later get their schema names from engine/naming instead of strcase: HTTPClient stays HTTPClient instead of Httpclient, e2eTest is no longer E_2_E_TEST, and so on. Modules that declare anything older, including every earlier v1.0.0 prerelease and v1.0.0-0 (which share the v1.0.0-beta.20 view), keep the strcase rules byte for byte. A module's view is engine.APIViewVersion of its engineVersion, as for clients; prerelease engines refuse modules past their own view, so exactly v1.0.0 needs a v1.0.0 engine. Workspace main modules (manifest v2) are named by whatever engine version their ModuleSource has, like any other module. core.Namer carries the choice, gated on IdentifierNamingView. The typedef constructors (function, withArg, withObject, withField, withEnumMember, ...) are view-scoped (View(AllVersion)), so their calls record the caller's view and normalize with NamerFromContext: a module's runtime names by the version it declares, and modules on either side of the cut never share a cached typedef (TestTypeDefNamingCacheIdentity). The in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors). Constructors, namespacing, CLI paths, include patterns and artifact paths follow the owning module's Namer, and lookups of user-typed names (addresses, patterns, the lazy workspace loader's root fields) try both spellings. There are no aliases for the old spellings: a module's schema has exactly the names of its own rules, and moving a module past the cut is an opt-in rename. The design doc's gate sections follow. Cherry-picked from 6a61bfc (#14669), resolved against the removal of engine.ModuleAPIViewVersion. Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
#14669 moved Query.identifier, formatIdentifiers, namingDictionary and their types to the views that name modules by engine/naming (beta.21+), so SDK codegen could gate on the field's presence. SDKs will instead gate on the version the target module declares plus the engine's version, and call formatIdentifiers themselves from their generator execs, which may run at a pre-cut view. So restore the visibility #14667 shipped: from v1.0.0-0 on. formatIdentifiers' version argument still selects the dictionary, and module naming keeps its own gate (core.IdentifierNamingView, beta.21). Refs #13668 Signed-off-by: Alex Suraci <[email protected]>
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.
Part 4/N of the stack splitting #14501 (identifier casing). Plan: #14501 (comment)
Refs #13668
Stacked on #14810 (
naming/view-prerelease-gate: prerelease-granular API views,engine.IdentifierCasingVersion). No longer stacked on #14668, which is abandoned: this PR adds no aliases. The previous alias-based revision of this branch is preserved onnaming/4-module-naming-aliases(3c3a690).The behaviour change
Modules that declare
engineVersionv1.0.0-beta.21 (core.IdentifierNamingVersion=engine.IdentifierCasingVersion) or later now get their schema names fromengine/naminginstead of strcase. The gate is the module's API view (engine.ModuleAPIViewVersion, from #14810), which keeps prereleases from beta.21 on: every earlier v1.0.0 prerelease (v1.0.0-0tov1.0.0-beta.20) shares thev1.0.0-beta.20view and keeps strcase, byte for byte, and so does a module declaring exactlyv1.0.0while the engine is a prerelease. Dev builds andlatestget the new rules. Manifest v2 entrypoints are named by whatever engine version their ModuleSource ends up with (today the engine's own), with no special path.Query.formatIdentifiers/identifier/namingDictionary(#14667) move to the same cut (core.IdentifierNamingView), because SDK generators pick their naming rules by whetherformatIdentifiersis in the schema: it lines up exactly with when the engine names modules the new way.HTTPClientin modulemy-modMyModHttpclientMyModHTTPClientBaseURLbaseUrlbaseURLe2eTeste2ETeste2eTestarm64/IPv6ARM_64/I_PV_6ARM64/IPV6dagger-cliconstructordaggerClidaggerCLINo aliases
Bumping a module past the cut is an opt-in rename: its schema has exactly the names of its own rules, and the old strcase spellings are not accepted. Since modules released against the betas stay on strcase, nothing already released is renamed under it.
View(AllVersion)), so its call records the caller's view and a beta.20 module and a beta.21 module declaring identical typedefs never share a cached result (TestTypeDefNamingCacheIdentity,TestSameTypeDefsAcrossVersions).Compared with the previous revision, this drops
core.NameAliases/ModuleNameAliasesand all their uses, the persistedEnumMemberTypeDef.LegacyNameandModuleEnumenum aliases, the Dang schema JSON aliases (SchemaIntrospectionJSONFileForDang), andTestModuleEntrypointLegacyNameAliases.What's in it
core/gqlformat.go,core/module*.go,core/typedef.go,core/object.go,core/interface.go, ...):core.Namer(legacy strcase, orengine/namingwith the dictionary for the view), withIdentifierNamingView,NamerForView,NamerForEngineVersionandModuleSource.Namer/NamingView(viaengine.ModuleAPIViewVersion).function,withArg,withObject,withField,withEnumMember,withCollection*and the rest now record the caller's view (View(AllVersion)) and name withNamerFromContext. So a module's runtime names its typedefs by the version the module declares, and the cache keeps the results apart.dangshared.NamingSelectors/WithModuleNaming).Namer: namespacing, constructors (incl.sdkmoduleConstructorName), CLI paths and include patterns, artifact paths, and lookups by name.module:functionrefs, the lazy workspace loader's root fields) try both spellings.depTypeReference; skipped when every module involved is legacy).K8SToolsin modulek8s-tools,My2Go/my2go,Sha256Sum,Go1Password,E2Eapi): on the new rules,Namer.SameDeclaredNamealso accepts names equal once flattened. Main-object lookups take a normalized match first and a flat one only if unique (ambiguous → none);NamespaceObjecttreats words flattening to the module name, on a word boundary, as its prefix. Legacy comparisons unchanged.internal/cmd/dagger/naming.go):--e2e-test).--e-2-e-test)._/-are ignored (ARM_64→ARM64). The CLI always sends the canonical name.hack/designs/identifier-casing.md): the gate, entrypoint and module-author sections follow the beta.21 cut without aliases; "Transition aliases" is marked superseded.engine/naming):K8sandK3sare terms with a fixed spelling, soK8STools,K8sTools,k8s-toolsandK8S_TOOLSall parse as *K8s · tools (K8sTools/k8sTools/k8s_tools/K8S_TOOLS). They're inInitial: it shipped in beta.20 (engine/naming: add identifier case conversion #14659/core: add formatIdentifiers naming API #14667 are in the tag) but only behind the experimentalformatIdentifiers, which no SDK calls, and no engine names modules with it before the beta.21 cut.k0s,i18n,l10n,a11yare left out (they parse as one word unless written all-caps, and no spelling is clearly canonical). Vectors and the doc's table are updated.Not in it
sdk/*,cmd/codegen) are legacy now. Dropped from this PR:codegen: name Go module types like the engine(module_naming.go,moduleNamer),codegen: keep renamed Go names of dependencies(legacy Go wrappers/aliases), and thego-client-devworkspace tweak that only existed for them. Consequence: a Go module on the built-in Go SDK that declares beta.21+ and references a core type starting with an acronym (JSONValue,LLMMessage) fails to build (its self-binding schema is still strcase-named), as would self-calls/interfaces on renamed types.TestGoAcronymsno longer references those core types;TestSameTypeDefsAcrossVersionscovers the engine side with Dang.f28c41e) is deferred to the Python SDK PR (5c). It only matters once that PR's engine-formattedValueEnums exist.@cache(policy:)enum lookup in the Dang helpers is deferred to PR 6, which renamesFunctionCachePolicy's values.defaultSchemaBuilderForEngineVersionstays as main has it.ModuleSource.NamingView()is the view of the declared engine version, so no wrapper is needed.formatIdentifiersfor names, so they must ship with or after this, never before.Release ordering
This depends on #14667 (merged) and #14810 shipping in the same engine release or an earlier one, and must ship in v1.0.0-beta.21: the cut is that version.
Testing
go build,go vet(only pre-existinglostcancelreports inengine/engineutilandengine/server/session_attachables.go)go test ./core/ ./core/schema/ ./core/sdk/... ./engine/ ./engine/naming/...: Namer gate at the cut (beta.19/beta.20/v1.0.0-0 legacy, beta.21/dev/latest new, v1.0.0 clamped while pre-GA), identifier API on the same view, names, namespacing, CLI-name patterns,NamingSelectors, andTestTypeDefNamingCacheIdentity(every naming constructor is view-scoped; interleaved beta.20/beta.21 selects get their own names from one cache; fails ifwithObjectloses its view filter)./engine/server/: lazy workspace loading matches a constructor by either spelling./internal/cmd/dagger/: CLI naming, flags, legacy command lookup, enum flags, constructor command pathsTestModuleNaming(21 passed): Go at latest; Go at beta.21 (new) and beta.20, beta.19, v1.0.0-0, v0.21.9 (strcase);TestSameTypeDefsAcrossVersions(two Dang modules at beta.20 and beta.21 declaring identical typedefs, served side by side and one at a time: each gets its own names); Python; CLI flags;TestMainTypeSpelling(Dang modules at beta.21:k8s-toolswith main typeK8STools, matched by normalization, andsha256sumwithSha256Sum, matched by flat spelling;dagger call greetworks and the main and prefixed types get the module's names; fails without the fix)TestIdentifierincl.TestViews:formatIdentifierspresent at current and beta.21, absent at beta.20, v1.0.0-0 and v0.21.0TestModule/(TestDangModuleEntrypoint*|TestModuleEntrypoint*|TestConflictingSameName*|TestUseLocalDependency*|TestSelfCalls*),TestDang/,TestCLI/TestModuleFunctions; plusTestPython/TestDocs(8 passed)golangci-lint/lint-all.