Repository navigation
codegen: name identifiers through the engine - #90
Merged
Merged
Conversation
This was referenced Oct 29, 2026
vito
force-pushed
the
format-identifiers
branch
from
October 30, 2026 16:06
a8bb537 to
f035226
Compare
vito
force-pushed
the
format-identifiers
branch
from
October 30, 2026 17:53
f035226 to
70e7bf4
Compare
vito
force-pushed
the
format-identifiers
branch
from
October 30, 2026 19:53
70e7bf4 to
2a5b7b5
Compare
vito
force-pushed
the
format-identifiers
branch
2 times, most recently
from
October 30, 2026 22:39
5a98061 to
75c88e4
Compare
1 task
vito
force-pushed
the
format-identifiers
branch
from
November 4, 2026 16:58
98d1a34 to
cec7aaa
Compare
vito
force-pushed
the
format-identifiers
branch
from
November 5, 2026 22:50
9452919 to
d1b27f1
Compare
vito
force-pushed
the
format-identifiers
branch
from
November 6, 2026 17:59
d1b27f1 to
bf8ab34
Compare
eunomie
force-pushed
the
format-identifiers
branch
from
November 16, 2026 17:32
bf8ab34 to
e500df3
Compare
Add the package Go codegen uses to name identifiers by the engine's naming rules: it asks the engine with Query.formatIdentifiers instead of formatting names itself. A Connector applies the gate: names follow the rules only when both the generated schema's version and the engine's release (Query.version) are at or past v1.0.0-beta.22. Otherwise it returns nil Names, the legacy rules, without connecting when the schema alone rules it out. Older engines serve formatIdentifiers too, but name modules by strcase and report every v1.0.0 prerelease view as v1.0.0, so neither the field nor the schema version decides alone. Generators look names up while they render; Names.Run formats the names a render missed in one aliased GraphQL query per round, always passing the schema's version so the dictionary is that version's, and renders again until nothing is missing. Session is the nested client's GraphQL endpoint (DAGGER_SESSION_PORT and DAGGER_SESSION_TOKEN), and identifierstest a fake engine for generator tests. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
A module's bindings look Go identifiers up at the generated schema's version and the module's own schema names at its effective version. identifiers.Run formats what all of them miss in one round trip, each formatIdentifiers field at its own version variable. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Past identifiers.CasingVersion, the bindings' types, methods and option structs are the engine's PascalCase with uppercase acronyms, like dagger/dagger's in-repo Go generator: commitSha and commitSHA are both CommitSHA, ShortSha is ShortSHA. Parameters and enum constants keep their spelling; before the cut, the legacy lintName rules stay byte for byte. Generators prefetch the schema's names and render under Names.Run, so a render usually takes one formatIdentifiers round trip. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
The module's interface bindings and entrypoint constructor spell its declarations as the engine names them. Past the cut, moduleNamer mirrors the engine's core.Namer through formatIdentifiers: objects PascalCase with uppercase acronyms, fields and arguments camelCase, the module-name namespace prefix by words with a flat fallback, and the main object matched by name or flat spelling. With nil names the strcase rules stay byte for byte. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
client, core and normalize-source-links name identifiers through the codegen exec's nested session (or core's own connection) when the schema and engine are past the cut; older ones never connect. Tests run with the session environment unset and a pre-cut fake engine. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
A schema read from a file is taken to come from the session's engine, whose release is what tells an older engine's v1.0.0 from a schema past the cut; core's --introspection-json-path help says it still needs that session. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Generators format the names a schema declares in one formatIdentifiers query, kept in a map, and format a name they derive while rendering (FooID, a handle) with a direct call when first looked up, cached. This replaces the render-lookup-render loop: Names.Run, the pending names, maxRounds and the re-renders are gone, and a generator renders once. moduleNamer's lookups work the same way, without a prefetch: only names the module's declarations use reach the engine. Its main-object check compares flattened names first, since names the engine formats alike are alike once flattened, so a helper type, function or constant is never sent. Names are no longer screened with Valid before they're sent. A name the engine can't parse fails formatIdentifiers, and generation with it, instead of quietly keeping its legacy spelling: Prefetch returns the error, and a failed Lookup's is returned by the generator (Names.Err), ahead of any render error the fallback name may have caused. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Drop lintName: Go identifiers are the engine's formatIdentifiers styling at every schema version, pre-cut views included (ShortSha becomes ShortSHA), so the generator no longer carries a copy of naming rules. Only the prediction of a module's own schema names keeps the gate (Connector.ModuleNames): the engine names a module before the cut by strcase. On an engine released before the cut, a formatIdentifiers failure names the release generation needs. Source links match every spelling of a name, since the engine's built-in Go codegen still spells pre-cut schemas with golint initialisms. Unified bindings alias dagger.io/dagger/core, which a release before the cut spells with golint-style initialisms, so they can't target one: defaultTarget and sourcesFloor move to v1.0.0-beta.22, and module-codegen refuses a pre-cut target or replacement before it writes anything. dagger.io/dagger v1.0.0-beta.22 isn't published yet: TestSdkDefaultTargetIsPublished fails until it is, and the unified module-codegen tests skip unless GO_SDK_TEST_RUNTIME names a checkout to stand in for it. Tests style names with identifierstest.Recorded, engine/naming's formatting of every name they use; the core parity test respells the eight identifiers dagger/dagger's generator still spells by golint rules. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
The engine now answers the names it gives a module's own declarations: ModuleSource.naming (dagger/dagger#14996). The interface bindings take the schema names of the module's interfaces and their functions from typeNames and fieldNames, and the dispatcher and Dang entrypoint take the main object from mainObject, each asked with a direct, cached call when first needed. A failed answer fails generation. The engine answers by the rules of the version it names the module by, strcase before the cut, so the SDK no longer predicts any of them: moduleNamer's strcase and word-prefix mirrors, the Connector.ModuleNames gate and the --module-version plumbing are gone. go-sdk.dang passes module-codegen the ID of the final entrypoint module source in a file (--module-source-id-file), and module-codegen looks it up with node(id:); the source answers before its entrypoint is generated. The codegen execs no longer pass experimentalPrivilegedNesting: v1 views nest by default. The Connector refuses an engine before v1.0.0-beta.22, the release taken to carry the API. A test validates every query the identifiers package sends against #14996's schema (identifiers/testdata/engine.graphqls). Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Unified bindings no longer refuse a dagger.io/dagger, targeted or replaced, that spells its core identifiers by the rules before v1.0.0-beta.22. The go-sdk.dang targetVersion floor already keeps modules off those releases; a replaced library is a development exception, whose mismatched aliases fail to compile. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Trim the naming machinery to what generation needs: - identifiers is a Query func and the session's: Names formats the schema's names as Go identifiers in one formatIdentifiers query and calls directly on a miss; NameModule asks a module source's naming once, for the types, functions and arguments ModuleDeclarations lists from the parsed package, and the main object among its structs. An unasked name panics, an unparseable one fails the query. - No engine release check: an engine without ModuleSource.naming fails the query itself. No formats but Go names, no dedup, no lazy cache. - Tests use a small fake engine; the recorded tables, the replaying engine, the schema-validation test and its gqlparser dependency, and the GO_SDK_TEST_RUNTIME library stand-in are gone, with the tests that only ran under it. naming.dang asserts the module names end to end instead. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Self-review fixes on the trim: - ModuleDeclarations names an interface method's arguments as the parser does: an unnamed param by its type, a pointer to an inline struct by its fields, and no context. Codegen panicked on those signatures. - Prefetch skips names already formatted, so the bootstrap, unified and entrypoint generation sharing one Names query once, not three times. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
The SDK module declares the engine floor instead of checking it in code. It is a cut literal, like versions.toml's. Declaring it moves go-sdk onto the post-cut API view. Its own core calls use the Capitalized-acronym field spellings: introspectionSchemaJson, htmlRepoUrl, clientSchemaIntrospectionJson. The engine names its main type GoSDK, not GoSdk; the goSdk constructor and the function names don't change. Engines compare only base versions, so a v1.0.0-beta engine before the cut still loads the module and breaks on those fields. A v0.x engine refuses it. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
ModuleDeclarations asked for interface arguments by a copy of the parser's naming, and an unnamed param of a named primitive or alias type (Path, Label) was named differently, so codegen panicked. It now runs parseParamSpecs itself, and asks only about interfaces that embed DaggerObject: a helper interface such as Write(_ []byte) no longer reaches the engine, which can't parse _. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
A module API that uses a type ModuleDeclarations didn't list, such as an interface missing the DaggerObject embed or another package's struct, now fails generation with an error naming it instead of a stack trace. The declarations' parse also sees the package's objects, as the real parse does, so enum params are named alike. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
runtime-floor-check, entrypoint-floor-check, sources-guard-check and beta-16-migration-check ran the SDK on beta.12–beta.17 engines. With the SDK module declaring v1.0.0-beta.22 and generation asking ModuleSource.naming, those engines can't run it. The engine-dev pins only they used, runChecks, and the e2e beta16 migration checks and fixture go with them. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
engine-e2e's default engine and engine-dev move from v1.0.0-beta.18 to dagger/dagger naming/module-source-naming 017633c (dagger/dagger#14996), the first engine that runs the SDK at its floor. Two things it surfaced: - The entrypoint contract checked the generated entrypoint against the bindings' schema, the targeted release's. The entrypoint is served at its own source's view, which can spell an enum's members differently (FunctionCachePolicy.Never before the cut, NEVER after). It's now checked against the entrypoint source's schema. - dang-sdk at the nested lock's 207f22c doesn't load on this engine (cannot use JSON! as Dagger.JSON!); its main, 14ba9d3, does. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
v1.0.0-beta.22 through beta.24 ship without the engine's identifier-casing work and ModuleSource.naming, so the cut that carries them is beta.25. The SDK module declares engineVersion v1.0.0-beta.25, and defaultTarget, sourcesFloor, their docs, goldens, e2e literals and test cases follow; the refusal cases test beta.24, the last pre-cut release, and beta.26. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
dagger/dagger#14996 replaced Query.formatIdentifiers(version:) with Query.naming(version:), whose Naming formats the names. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
go-sdk.dang reads the served module source's naming (version, name, originalName) and passes the three to module-codegen as flags, which asks naming(version:).module(name:, originalName:) for the module's schema names. The module source ID file and its node(id:) lookup are gone, so the codegen exec's inputs are plain strings. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Beta.25 shipped without the naming APIs. Move the module floor, target, entrypoint goldens and boundary checks together, and pin engine-e2e to Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]> #14996's beta.26 restack. Keep historical library and fixture versions.
Preserve #89's generated dang.toml when integrating the naming port. Write it before reading ModuleSource.naming and the entrypoint schema, then carry that same file into the output instead of rewriting it after codegen. Align the merged target checks and docs with the beta.26 floor and beta.25 fallback. Cover new and upgraded imports in the naming fixture; generation now always writes the target, so an unpinned generated module is obsolete. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Preserve the pre-floor check deletion from the naming port after its rebase over main's edit to this file. Its fixture and caller are already gone, and the SDK no longer runs on that engine. Signed-off-by: Alex Suraci <[email protected]> Signed-off-by: Yves Brissaud <[email protected]>
Regenerating a daggerGo module loaded the existing entrypoint without its go dependency, so the engine failed to evaluate its sources. Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
At the beta.26 floor the fixtures build with dagger/go, which reports the missing package with Go's own diagnostic, without the go build dispatch's "run dagger generate" hint. Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
eunomie
force-pushed
the
format-identifiers
branch
from
November 19, 2026 18:16
64e4307 to
b7398ad
Compare
eunomie
marked this pull request as ready for review
November 20, 2026 06:34
eunomie
approved these changes
Nov 20, 2026
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.
What
Go codegen names identifiers by the engine's identifier naming rules (dagger/dagger
engine/naming, cut atv1.0.0-beta.26) instead of strcase/golint. Go identifiers are the engine's styling at every schema version, before the cut too: the SDK no longer carries golint rules (lintNameis gone). The schema names of the module's own declarations, which the SDK's code must spell, come from the engine itself: this builds on dagger/dagger#14996 (ModuleSource.naming, merged with #14959 and released inv1.0.0-beta.26), and nothing in the SDK predicts them any more.Gate
There is none left in the SDK. Go identifier styling goes through
formatIdentifiersat every schema version, passing the schema's version (the engine serves pre-cut views too). The module's own names come fromModuleSource.naming, which answers by the version the engine names the module by: the engine's rules from the cut on, strcase before it. There's no engine version check in code either. The SDK module declares the floor: itsdagger-module.tomlanddagger.jsonsetengineVersion = "v1.0.0-beta.26", the first release carrying #14996. A v0.x engine refuses the module ("module requires dagger …"). Engines compare base versions only, so an earlierv1.0.0-betaengine still loads it, and then fails on the first field it lacks (Cannot query field "naming", or a post-cut core field). That's accepted.Mechanism
No vendored naming tables and no names file. The generator binaries (
module-codegen,dagger-go-sdk-codegen client|core|normalize-source-links) query the engine over the codegen exec's nested session (DAGGER_SESSION_PORT/TOKEN; v1 views nest by default).cmd/dagger-go-sdk-codegen/identifiersholds the client: aQueryfunc (the session's,SessionQuery),NamesandNameModule. A generator formats every name the schema declares (types, fields, arguments, input fields) in onenaming(version:) { formatIdentifiers }query (PASCAL, UPPERCASE) and keeps the results in a map. A name it derives while rendering (typeName+"ID", a handle, a replacement) gets one directformatIdentifierscall when first looked up. The module's own names come from onenaming(version:) { module(name:, originalName:) }query (typeNames,fieldNames,mainObject), sent after the package is parsed. Its arguments are whattemplates.ModuleDeclarationslists: exported structs (also the main-object candidates), interfaces that embedDaggerObject, and their functions and arguments as the parser names them. If the API uses a type that wasn't listed, generation fails with an error naming it. Nothing is screened before it's sent: a name the engine can't parse fails the query, and codegen with it.Why not vendor: the rules are a versioned dictionary owned by the engine. A second copy in every SDK eventually disagrees with the engine, and a wrong prediction breaks modules at runtime (an interface binding selecting a type or field the schema lacks). Asking the engine at the version keeps the answer stable, since released dictionaries never change.
What follows which version
The module's own schema names are the engine's answer for the module source it serves; Go identifier style follows the generated schema.
With…Func) are the engine's PascalCase with uppercase acronyms at the generated schema's__schemaVersion, whichever side of the cut it is on. Parameters keep the schema's name; enum constants are unchanged. One exception: unified module bindings aliasdagger.io/dagger/coreof the runtime in go.mod, which spells those names by its own version, so they follow that runtime's version (areplaceto a module version uses that version; a local checkout uses the schema's).typeNames,fieldNames:... on MyModHTTPFetcher,e2eTest), and the main object the dispatcher and the Dang entrypoint's constructor expose (mainObject, given every exported struct of the package as candidates). A module calls itself through a client added withdagger module client add ., generated from the schema the engine serves, so nothing here needs its functions' references or enum members (enumMemberNamesis unused).For a Dang-entrypoint module, the engine names the module by the version the
dang.tomlgoverning its entrypoint declares (beta.25 is the engine's default without one), not the staged schema's version. This PR now includes merged #89's generateddang.tomlwriter/validation.go-sdk.dangbuildsentrypointModuleSourcein the engine from the final entrypoint manifest (name +[entrypoint]) and a copy of the entrypoint'sdang.tomlconfigured for the target exactly as generation publishes it, so it needs no generated entrypoint and uploads nothing from the client; the finaldang.tomlitself is written after code generation. It passes that source'snaming(version,name,originalName) tomodule-codegenas three string flags (--naming-version,--module-name,--module-original-name);module-codegenasksnaming(version:).module(name:, originalName:).Invariant: codegen queries the same final entrypoint configuration that the engine will serve. With the beta.26 target floor, generated Dang uses the post-cut
FunctionCachePolicy.NEVER,PER_SESSION, andDEFAULTmembers.Unified bindings need a post-cut runtime
Unified bindings alias the core types, option structs and
Withfunctions of the runtime'sdagger.io/dagger/core. A release before the cut spells about eight of them with golint initialisms (SshfsVolumeOpts,ShortSha), which this generator no longer produces. Soversions.tomlsourcesFloormoves tov1.0.0-beta.26(defaultTargetisv1.0.0-beta.27, from merged #105), andgo-sdk.dangrefuses a lowertargetVersion.module-codegenitself checks nothing: areplaceto a pre-cut library is a development exception, and its mismatched aliases fail to compile.The cut is
v1.0.0-beta.26. beta.25 shipped without the engine stack. The engine stack merged into dagger/dagger main as7e9eaacc376e5c3bed3efdca9e1ba750bc8d9233and shipped inv1.0.0-beta.26, anddagger.io/dagger v1.0.0-beta.26is published. engine-e2e runs its checks on thev1.0.0-beta.27release (400b82d6f3c09ef096d2f59b3e920267b5969bf4, the default target's engine, from #105), and its floor checks on thev1.0.0-beta.26release (9f15293b2d3960d9eeee567d2e50bd60dcf0df80).User-visible changes
ShortSha→ShortSHA,ParentShas→ParentSHAs,Sdks→SDKs,SshfsVolume→SSHFSVolume,WithGpu→WithGPU,VcsGeneratedPaths→VCSGeneratedPaths, and their option structs (GitCommitShortSHAOpts). Fields the engine renamed keep their Go spelling (commitSha/commitSHAare bothCommitSHA). Embedded and Go-runtime modules get these on their nextdagger generate;docs/outside-files.mdsays so under Migration.Github→GitHub,Cli→CLI,CreatePr→CreatePR,Ids→IDs.ModuleSource.naming), in interface bindings and the main-object lookup: past the cut,NamingAppHttpFetcher→NamingAppHTTPFetcher,e2Etest→e2eTest.v1.0.0-beta.27by default (merged feat(go): target v1.0.0-beta.27 #105);targetVersionacceptsv1.0.0-beta.26(the floor) throughv1.0.0-beta.28(the release after the default), for both unified and embedded Dang entrypoints. The generated entrypoint header requires beta.26 or later. The Go runtime still refusestargetVersionand follows its manifest; new manifests get the default target, while existing manifests retain their declared version.engineVersion = "v1.0.0-beta.26", so the engine names its declarations by the new rules. Its type isGoSDK(wasGoSdk). ThegoSdkconstructor and the function and argument names don't change, because fields use Capitalized acronyms. Only callers that spell the type change (the e2e module'sexpectRefusal(sdk: GoSDK!)). go-sdk's own core calls switch to the post-cut field spellings (introspectionSchemaJson,htmlRepoUrl,clientSchemaIntrospectionJson).3adb1f41(merged feat(go): target v1.0.0-beta.27 #105, whose beta.27 default target this branch keeps while raising the floor to beta.26). The actual fix(go): default new modules to a pre-cut target on every path #89 squash includes sdk-helpers v1.0.8 and generateddang.tomlwriting/validation, beyond its older PR description. Embedded entrypoints usetargetReleaseand allowtargetVersion; new Go-runtime manifests receive the default target only when no manifest existed. Existing runtime manifests—including the beta.20 preservation fixture—are not upgraded. Cut-sensitive target checks pin the beta.26 floor, accept up to beta.28, and refuse beta.25 below the floor and beta.29 above; the finaldang.tomlis written after code generation, and naming reads a separately configured copy.Also fixed along the way
Nullable-object and list-of-interface results loaded their node by the Go type name. Past the cut a Go name can differ from the schema's (a dependency's strcase
DepGpuThingbecomes GoDepGPUThing), so these now use the schema name.For the other SDKs
This PR is the template for the other SDK ports:
formatIdentifiers, passing the schema's version. Take the module's own schema names fromModuleSource.naming(typeNames,fieldNames,enumMemberNames,mainObject), which answers on both sides of the cut. Declare the floor as the SDK module'sengineVersioninstead of checking the engine's release in code. Never test forformatIdentifiersin the schema.naming(version:) { formatIdentifiers(names:, casing:, acronyms:) }query into a map, and format any other name with a direct call when first needed. Ask the module's naming once, for the names the parsed source declares. Let the engine's error for an unparseable name fail codegen. No session is an error, whatever the version. Generators written in Go can reuse this client.__schemaVersion, or the runtime library's version for bindings that alias a published core. Module names (schema names the engine assigned to the module's own declarations, which the SDK's code selects: interface types and their fields, the main object) come from thenamingof the module source the engine actually serves (with the generated entrypoint's manifest). How each SDK styles its own identifiers is its choice; this PR only fixes Go's.naming.dang) on an engine that carries the work. Unit tests unset the ambient session and use a small fake engine (identifierstest): PascalCase with a dozen acronyms, and strcase module naming keyed by the module's name. The golden parity test fakes the formatting from the goldens' own spellings, so it checks the bindings, not the engine's rules.If the cut moves
v1.0.0-beta.26ships the engine's identifier-casing work andModuleSource.naming(beta.22–beta.25 did not). To move the cut, bump every spot below to the new cut, and don't release before there's both an engine with the work and a publisheddagger.io/daggerat the cut.dagger-module.tomlanddagger.json: the SDK module'sengineVersionversions.toml:sourcesFloorcmd/dagger-go-sdk-codegen/generator/gogenerator/templates/v2.go:sourcesFloor(a test keeps it equal toversions.toml), and its entrypoint goldenstemplates/testdata/entrypoint*.golden(-test.update-fixtures)go-sdk.dang: thetargetVersionanddangEntrypointdocs and theVersionsdocdocs/outside-files.md: Engine versions, the targeted release, and the Migration note on renames.dagger/modules/e2e/naming.dang: the target-versiondang.tomland its doc; generated entrypoints now always receive that config.dagger/modules/e2e/target.dang(floor,sdkTarget, the pin and refusal cases; "below" uses the last pre-cut release, beta.25, "above" the release after the newest accepted target, beta.29),.dagger/modules/e2e/main.dang(the standalone client target),.dagger/modules/e2e/sources.dang(the entrypoint header), and cut-sensitiveentrypoint.dangconfig checks. Preserve historical existing-runtime pins.helpers/entrypoint-contract/sdk_target_test.go,helpers/module-codegen/gogenerator/roundtrip_test.go(the floor error)cmd/dagger-go-sdk-codegen/identifiers/identifierstest/fake.goand the tests that use beta.26 as "past the cut" (templates/naming_test.go,identifiers_test.go,generate_client_test.go)go-sdk.dang(codegenBuilder).dagger/modules/engine-e2e:sourcesFloorCommitand the sources-floor-engine-dev dependency (now thev1.0.0-beta.26release,9f15293b2d3960d9eeee567d2e50bd60dcf0df80), to the release at the new cutTests
Current stack (#92 on main
3adb1f41, after #105)Focused checks on the released
v1.0.0-beta.27engine, run one at a time; each line names the commit it ran on. Commits afterc5da4f71change only tests, docs or commit messages, and none of these checks was rerun on the final head64e4307c.c5da4f71: a client-backeddagger generate go-sdk -yof a new module (root module, anapp/module with a localreplace, Go code in a subdirectory), then generating again with no changes;target:default-check,target:code-subdirectory-checkandnaming calls-checkpass.48f7f427:target:refusals-checkpasses.4effe422:target:dependency-checkandentrypoint:go-build-cache-volumes-checkpass.906a04ac(4effe422plus a since-dropped sources fixture change):unified calls-checkwith legacyv0.16.0andv0.15.0passes (one500df3ait fails like CI,FunctionCachePolicy.NEVERnot found).290928b8: replayingsources-check's stale build on the generated fixture fails withno required module provides package example.com/lib/words.go vetandgo testpass incmd/dagger-go-sdk-codegen(including an offline test of the go build dispatch's "run dagger generate" hint) andhelpers/entrypoint-contracton5f91fa0e, which differs from64e4307conly in an e2e doc comment;helpers/module-codegenandhelpers/render-templatepass on7e1ee9e4, with the same code in those modules; the Dang sources parse on64e4307c.Pending: the engine-e2e checks (
dev-sdk-check,sources-check,ignored-*,integrated-*) run only in CI and have not run on the final head.Earlier beta.26 restack (before #105; not current results)
At
68acbabf355df1c7833d4156543659978ebe195e, based on #92b94fcc603e0d6998c2ed9b676ee66639677f870eand main/#898c1d739(targeted tests ran atcec7aaa; the final commit only removes an obsolete beta16 e2e file whose fixture and callers were already removed):helpers/entrypoint-contract: tests other than the publication-dependent check pass.TypeDefKindreferences were already UPPER_SNAKE; the threeFunctionCachePolicyreferences were corrected for beta.26.Historical validation (older heads and cut versions; not current results)
The results below are retained as history. References to unpublished beta.25, the former engine-e2e pin, and unpinned entrypoint generation describe those runs only; current targets/pins and the generated-dang.toml behavior are described above.
Run (30 commits, +1524/−715 against
remove-self-calls; production code, docs and manifests about +903/−262 as of e1232cd):cmd/dagger-go-sdk-codegen,helpers/module-codegen,helpers/entrypoint-contract:go test ./...andgo vet ./...pass. The unit tests are deliberately few, because the e2e checks cover naming. They unset the ambient session and use a small fake engine (identifiers/identifierstest), which styles names as PascalCase with a dozen acronyms and names a module by strcase, keyed by its name.identifiers: the schema's names go in one query, a miss gets a direct call, a formatted name is never sent again, and the first failure is kept.templates:ModuleDeclarationsnames arguments the way the parser does (unnamed params by type, pointer-to-inline-struct fields, aliases and named primitives), and skips interfaces that don't embedDaggerObject. Nullable objects load by schema name.TestGenerateCore_Paritycompares with dagger/dagger's generate-library goldens (beta.14 schema). The fake engine spells each name as the goldens do, so the test checks the bindings, not the engine's rules.naming/module-source-naming(9e25570, #14996, with the cut still at beta.22), at e1232cd, before the cut moved:.dagger/modules/e2e/naming.dang:dagger -m .dagger/modules/e2e call naming --cli <the engine's dagger CLI, as a workspace-relative path> calls-check --ws .. It generates an embedded entrypoint module twice. Without adang.tomlthe module is named by beta.20:NamingAppHttpFetcher,Select("e2Etest"),e2-etest,ARM_64. With adang.tomlpinning the cut (beta.22 in that run; the pin is beta.25 now) it getsNamingAppHTTPFetcher,Select("e2eTest"),e2e-test,ARM64. Each time it checks the interface binding's type name, function name and listInlineFragment, plusGitCommit.ShortSHA, and calls the module through a nested CLI. Passes.entrypoint module-init-check,entrypoint generate-check: pass, with go-sdk declaring beta.22 then (typeGoSDK, constructor stillgoSdk).Not run / known:
naming.dangyet. engine-e2e now pins an engine carrying #14996, but none of its checks callsnaming.target mismatch-checkchecks nothing while the SDK targets its own floor (it needs a release below the SDK's). The othertargetchecks run indev-sdk-check.runtime-floor-check,entrypoint-floor-check,sources-guard-check,beta-16-migration-check) are removed, along with the engine-dev pins only they used and the e2ebeta16migration checks and fixture. Those engines load the module, since only base versions are compared, but can't run it at this floor.engineCommitand the engine-dev dependency) is dagger/daggernaming/module-source-naming@ f921c4d (#14996 withQuery.naming/Naming.module; cut and engine VERSION at beta.25). On it, at 46bc3c9 (results identical to c8f0ab8 at f2da6d7):go test ./...andgo vet ./...pass in the three Go modules exceptTestSdkDefaultTargetIsPublished:dagger.io/dagger v1.0.0-beta.25is not published.integrated-legacy-clients-check: passes.dev-sdk-check: the e2e module and go-sdk (declaring beta.25) load; 11 of 31 e2e checks pass (target refusals-check, manifest and module clients, standalone compiles/preservation,sources refusals-check, …), and the standalone and module clients exercisenaming(version:) { formatIdentifiers }on the real engine. The other 20 fail only because generation can't resolve the unpublisheddagger.io/dagger v1.0.0-beta.25(helper-tests-checkis the test above), so the starter smoke runs don't run.go-sdk.dangreads the served source'snaming { version name originalName }on the real engine (e.g.--naming-version v1.0.0-beta.24 --module-original-name generate-appfor a module without an entrypointdang.toml), butmodule-codegenresolves the library before it asksNaming.module, so no e2e check reaches that query until beta.25 is published. Both queries validate against f921c4d'sschema.graphqls.sources-checkandintegrated-sdk-checkstop at their first generation for the same reason.dev-sdk-check: all 31 e2e checks pass (entrypoint, sources, target, manifest, standalone and module clients, helper tests), and so do the starter smoke runs. The e2e module loads.sources-check: passes.integrated-sdk-check: passes. That covers entrypoint module-init/generate/global-client, and unified calls/changed-target/stale-target/removed-client/git-calls/shortcut-calls atv0.21.7, pluscalls-checkatv0.20.8/v0.18.0/v0.16.0/v0.15.0and--package-main.integrated-legacy-clients-check: passes.go-sdk.dangtype-checks the generated entrypoint (entrypoint-contract) against the schema of the entrypoint's own source, the view it's served at. It used the bindings' schema, the targeted release's, which spellsFunctionCachePolicymembersNEVERinstead ofNever.dang-sdkat main 14ba9d3 (the older 207f22c didn't load on that engine); feat(go): target v1.0.0-beta.27 #105 has since removed dang-sdk and its pin.dagger.io/dagger v1.0.0-beta.22(the cut slipped), unified bindings that alias a renamed core identifier (SSHFSVolumeOpts) don't compile. The test that showed it,TestGenerateUnifiedFollowsRuntimeNames, was removed with the library stand-in.type Café struct{}) fails generation: every exported struct is amainObjectcandidate, and the engine refuses unparseable names everywhere.Follow-ups / open questions
ModuleSource.clientSchemaIntrospectionJson(clientVersion: <consumer>)(core: add clientVersion to client schemas dagger#14959) would serve core at the consumer's view. The engine names a dependency's own declarations by the dependency's version anyway, so only the dependency client's core part would change.dang.tomlwriting is included through merged fix(go): default new modules to a pre-cut target on every path #89 and aligned with naming/schema queries here.Queryby comparing the module's name and the field's once flattened (coreConstructorName):ModuleNaminghas no constructor name, and theclientsubcommand has no module source to ask.Depends on dagger/dagger#14996
The module's own names come from
ModuleSource.naming(dagger/dagger#14996, merged with #14959), which released engines serve fromv1.0.0-beta.26, the SDK module's declared floor.