Skip to content

core: name modules with engine/naming from v1.0.0-beta.21 - #14669

Closed
vito wants to merge 12 commits into
mainfrom
naming/4-module-naming
Closed

vito wants to merge 12 commits into
mainfrom
naming/4-module-naming

Conversation

@vito

@vito vito commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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 on naming/4-module-naming-aliases (3c3a690).

The behaviour change

Modules that declare engineVersion v1.0.0-beta.21 (core.IdentifierNamingVersion = engine.IdentifierCasingVersion) or later now get their schema names from engine/naming instead 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-0 to v1.0.0-beta.20) shares the v1.0.0-beta.20 view and keeps strcase, byte for byte, and so does a module declaring exactly v1.0.0 while the engine is a prerelease. Dev builds and latest get 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 whether formatIdentifiers is in the schema: it lines up exactly with when the engine names modules the new way.

declared as strcase (before) engine/naming (now)
type HTTPClient in module my-mod MyModHttpclient MyModHTTPClient
field BaseURL baseUrl baseURL
argument e2eTest e2ETest e2eTest
enum member arm64 / IPv6 ARM_64 / I_PV_6 ARM64 / IPV6
module dagger-cli constructor daggerCli daggerCLI

No 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.

  • Cache: every typedef constructor that normalizes a name is view-scoped (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).
  • CLI (CLI-side only): old flag/command/enum spellings it printed before are still resolved and sent as the canonical name.

Compared with the previous revision, this drops core.NameAliases/ModuleNameAliases and all their uses, the persisted EnumMemberTypeDef.LegacyName and ModuleEnum enum aliases, the Dang schema JSON aliases (SchemaIntrospectionJSONFileForDang), and TestModuleEntrypointLegacyNameAliases.

What's in it

  • Core (core/gqlformat.go, core/module*.go, core/typedef.go, core/object.go, core/interface.go, ...):
    • Gate: core.Namer (legacy strcase, or engine/naming with the dictionary for the view), with IdentifierNamingView, NamerForView, NamerForEngineVersion and ModuleSource.Namer/NamingView (via engine.ModuleAPIViewVersion).
    • Typedef constructors: function, withArg, withObject, withField, withEnumMember, withCollection* and the rest now record the caller's view (View(AllVersion)) and name with NamerFromContext. So a module's runtime names its typedefs by the version the module declares, and the cache keeps the results apart.
    • Dang: the in-engine Dang runtime stamps that view on the selectors it makes (dangshared.NamingSelectors / WithModuleNaming).
    • Follow the owning module's Namer: namespacing, constructors (incl. sdkmodule ConstructorName), CLI paths and include patterns, artifact paths, and lookups by name.
    • Lookups of names a user typed (addresses, patterns, module:function refs, the lazy workspace loader's root fields) try both spellings.
    • References to a dependency's types: when the two modules' rules spell a type differently, these fall back to the dependency's type (depTypeReference; skipped when every module involved is legacy).
    • Main type spelled otherwise (K8STools in module k8s-tools, My2Go/my2go, Sha256Sum, Go1Password, E2Eapi): on the new rules, Namer.SameDeclaredName also accepts names equal once flattened. Main-object lookups take a normalized match first and a flat one only if unique (ambiguous → none); NamespaceObject treats words flattening to the module name, on a word boundary, as its prefix. Legacy comparisons unchanged.
  • CLI (internal/cmd/dagger/naming.go):
    • Naming: commands, flags and type names follow the rules of the engine version the CLI ships with (--e2e-test).
    • Flags: old spellings are normalized to the new ones (--e-2-e-test).
    • Commands: old spellings are cobra aliases, and the shell and sibling-main lookups accept them too; a legacy module's constructor still roots its command paths.
    • Enum flags and collection keys: these match a member in any case, or else the single member that matches once _/- are ignored (ARM_64 → ARM64). The CLI always sends the canonical name.
  • Design doc (hack/designs/identifier-casing.md): the gate, entrypoint and module-author sections follow the beta.21 cut without aliases; "Transition aliases" is marked superseded.
  • Dictionary (engine/naming): K8s and K3s are terms with a fixed spelling, so K8STools, K8sTools, k8s-tools and K8S_TOOLS all parse as *K8s · tools (K8sTools / k8sTools / k8s_tools / K8S_TOOLS). They're in Initial: 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 experimental formatIdentifiers, which no SDK calls, and no engine names modules with it before the beta.21 cut. k0s, i18n, l10n, a11y are 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

  • Go module codegen, moved to the Go SDK port (github.com/dagger/go-sdk): in-repo SDKs (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 the go-client-dev workspace 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. TestGoAcronyms no longer references those core types; TestSameTypeDefsAcrossVersions covers the engine side with Dang.
  • Python "keep dependency enum values" (f28c41e) is deferred to the Python SDK PR (5c). It only matters once that PR's engine-formatted ValueEnums exist.
  • The @cache(policy:) enum lookup in the Dang helpers is deferred to PR 6, which renames FunctionCachePolicy's values.
  • defaultSchemaBuilderForEngineVersion stays as main has it. ModuleSource.NamingView() is the view of the declared engine version, so no wrapper is needed.
  • Reading a declared version for manifest v2 entrypoints is separate work; this PR just names them by whatever version their ModuleSource has.
  • SDK runtimes stay on their current versions. The Python and TypeScript runtimes ask formatIdentifiers for 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-existing lostcancel reports in engine/engineutil and engine/server/session_attachables.go)
  • Unit tests:
    • 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, and TestTypeDefNamingCacheIdentity (every naming constructor is view-scoped; interleaved beta.20/beta.21 selects get their own names from one cache; fails if withObject loses 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 paths
  • Integration tests:
    • TestModuleNaming (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-tools with main type K8STools, matched by normalization, and sha256sum with Sha256Sum, matched by flat spelling; dagger call greet works and the main and prefixed types get the module's names; fails without the fix)
    • TestIdentifier incl. TestViews: formatIdentifiers present at current and beta.21, absent at beta.20, v1.0.0-0 and v0.21.0
    • Regression sweep (126 passed): TestModule/(TestDangModuleEntrypoint*|TestModuleEntrypoint*|TestConflictingSameName*|TestUseLocalDependency*|TestSelfCalls*), TestDang/, TestCLI/TestModuleFunctions; plus TestPython/TestDocs (8 passed)
  • Checks: golangci-lint/lint-all.

vito added 4 commits October 22, 2026 13:59
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
vito added 3 commits October 22, 2026 14:42
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]>
vito added 2 commits October 22, 2026 15:29
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
vito force-pushed the naming/4-module-naming branch from 3c3a690 to 0a53dcd Compare October 22, 2026 15:40
@vito vito changed the title core: name modules with engine/naming from v1 core: name modules with engine/naming from v1.0.0-beta.21 Oct 22, 2026
vito added 2 commits October 22, 2026 16:09
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
vito removed this pull request from stack #14670 October 22, 2026 18:34
@vito
vito changed the base branch from naming/3-dagql-aliases to naming/view-prerelease-gate October 22, 2026 18:34
@vito
vito added this pull request to stack #14820 October 22, 2026 18:35
@vito
vito force-pushed the naming/view-prerelease-gate branch from 2873e64 to 94fdbda Compare October 27, 2026 20:05
@vito
vito removed this pull request from stack #14820 October 28, 2026 01:02
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
vito force-pushed the naming/view-prerelease-gate branch from e65f47e to b4aa8d8 Compare October 28, 2026 16:11
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
vito force-pushed the naming/view-prerelease-gate branch from 7cbf566 to 4979152 Compare October 29, 2026 01:18
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]>
Base automatically changed from naming/view-prerelease-gate to main October 29, 2026 02:06
@vito vito closed this Oct 29, 2026
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]>
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