Repository navigation
Conversation
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
October 28, 2026 16:35
825a060 to
2a84d67
Compare
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
October 28, 2026 17:08
2a84d67 to
909d499
Compare
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
October 29, 2026 01:21
efeeed8 to
b941d4c
Compare
vito
marked this pull request as ready for review
October 29, 2026 01:24
Contributor
Author
|
🤖 (posted on behalf of @vito) @eunomie @TomChv, following up on your discussion with Solomon: "dang.toml's How the engine reads it
Proposal for the SDK side
Gaps for beta.22 (the identifier-casing cut)
Happy to adjust any of the engine-side rules if they don't fit what you had in mind. |
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
October 29, 2026 02:06
b941d4c to
27f40d2
Compare
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
This was referenced Oct 29, 2026
vito
added a commit
that referenced
this pull request
Oct 29, 2026
The comment added before PrerequisiteSHAs splits the struct's alignment block, so gofmt realigns the fields above it. golangci-lint reported it on #14902's CI; #14895's own lint run was OOM-killed before reporting. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
October 29, 2026 03:05
1c7c7b2 to
acf75d4
Compare
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
This was referenced Oct 29, 2026
vito
added a commit
that referenced
this pull request
Oct 29, 2026
The comment added before PrerequisiteSHAs splits the struct's alignment block, so gofmt realigns the fields above it. golangci-lint reported it on #14902's CI; #14895's own lint run was OOM-killed before reporting. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 29, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Oct 29, 2026
A Dang SDK module's dang.toml was ignored: the runtime presets its Dagger import, so Dang never reads the file, and its `dagger` and `dang` keys did nothing. Its engine version came only from dagger.json, and its Dang version only from that engine version. The engine now reads the dang.toml governing a Dang SDK module, as #14902 does for entrypoints, with the same resolution code (dangv2.ResolveModuleVersions beside ResolveEntrypointVersions): the nearest one walking up from the source directory to the module directory, never above it, as for an entrypoint. - `[imports.Dagger] dagger` wins over dagger.json's engineVersion: view, naming, default caching, compat checks. The engine warns, in its log and on a span of its own, when the two disagree. `dagger = true` keeps the engineVersion, as the Dang CLI reads it. - `dang` is the Dang version. Without one, a module before v0.21.5 is Dang 1.0 and a later one is left to Dang, as before; the Dang major is now picked by that version rather than by the engine version. - Both key SourceImplementationDigest for every Dang module (the resolved Dang version can follow the engine's Dang, whatever the source), and the engine's own parses of the source (declared type names, object directives) parse it as its version. - A `dang` version newer than the engine's Dang says to upgrade Dagger, not Dang. ModuleSource.EntrypointDangVersion becomes DangVersion. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
October 29, 2026 19:11
acf75d4 to
3e318dd
Compare
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
November 5, 2026 00:04
e209877 to
e1da14e
Compare
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
A Dang SDK module's dang.toml was ignored: the runtime presets its Dagger import, so Dang never reads the file, and its `dagger` and `dang` keys did nothing. Its engine version came only from dagger.json, and its Dang version only from that engine version. The engine now reads the dang.toml governing a Dang SDK module, as #14902 does for entrypoints, with the same resolution code (dangv2.ResolveModuleVersions beside ResolveEntrypointVersions): the nearest one walking up from the source directory to the module directory, never above it, as for an entrypoint. - `[imports.Dagger] dagger` wins over dagger.json's engineVersion: view, naming, default caching, compat checks. The engine warns, in its log and on a span of its own, when the two disagree. `dagger = true` keeps the engineVersion, as the Dang CLI reads it. - `dang` is the Dang version. Without one, a module before v0.21.5 is Dang 1.0 and a later one is left to Dang, as before; the Dang major is now picked by that version rather than by the engine version. - Both key SourceImplementationDigest for every Dang module (the resolved Dang version can follow the engine's Dang, whatever the source), and the engine's own parses of the source (declared type names, object directives) parse it as its version. - A `dang` version newer than the engine's Dang says to upgrade Dagger, not Dang. ModuleSource.EntrypointDangVersion becomes DangVersion. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
The comment added before PrerequisiteSHAs splits the struct's alignment block, so gofmt realigns the fields above it. golangci-lint reported it on #14902's CI; #14895's own lint run was OOM-killed before reporting. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
November 5, 2026 00:13
e1da14e to
f34ecfe
Compare
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
A Dang SDK module's dang.toml was ignored: the runtime presets its Dagger import, so Dang never reads the file, and its `dagger` and `dang` keys did nothing. Its engine version came only from dagger.json, and its Dang version only from that engine version. The engine now reads the dang.toml governing a Dang SDK module, as #14902 does for entrypoints, with the same resolution code (dangv2.ResolveModuleVersions beside ResolveEntrypointVersions): the nearest one walking up from the source directory to the module directory, never above it, as for an entrypoint. - `[imports.Dagger] dagger` wins over dagger.json's engineVersion: view, naming, default caching, compat checks. The engine warns, in its log and on a span of its own, when the two disagree. `dagger = true` keeps the engineVersion, as the Dang CLI reads it. - `dang` is the Dang version. Without one, a module before v0.21.5 is Dang 1.0 and a later one is left to Dang, as before; the Dang major is now picked by that version rather than by the engine version. - Both key SourceImplementationDigest for every Dang module (the resolved Dang version can follow the engine's Dang, whatever the source), and the engine's own parses of the source (declared type names, object directives) parse it as its version. - A `dang` version newer than the engine's Dang says to upgrade Dagger, not Dang. ModuleSource.EntrypointDangVersion becomes DangVersion. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
November 5, 2026 03:36
f34ecfe to
8fbb750
Compare
vito
added a commit
that referenced
this pull request
Nov 5, 2026
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Nov 5, 2026
A Dang SDK module's dang.toml was ignored: the runtime presets its Dagger import, so Dang never reads the file, and its `dagger` and `dang` keys did nothing. Its engine version came only from dagger.json, and its Dang version only from that engine version. The engine now reads the dang.toml governing a Dang SDK module, as #14902 does for entrypoints, with the same resolution code (dangv2.ResolveModuleVersions beside ResolveEntrypointVersions): the nearest one walking up from the source directory to the module directory, never above it, as for an entrypoint. - `[imports.Dagger] dagger` wins over dagger.json's engineVersion: view, naming, default caching, compat checks. The engine warns, in its log and on a span of its own, when the two disagree. `dagger = true` keeps the engineVersion, as the Dang CLI reads it. - `dang` is the Dang version. Without one, a module before v0.21.5 is Dang 1.0 and a later one is left to Dang, as before; the Dang major is now picked by that version rather than by the engine version. - Both key SourceImplementationDigest for every Dang module (the resolved Dang version can follow the engine's Dang, whatever the source), and the engine's own parses of the source (declared type names, object directives) parse it as its version. - A `dang` version newer than the engine's Dang says to upgrade Dagger, not Dang. ModuleSource.EntrypointDangVersion becomes DangVersion. Signed-off-by: Alex Suraci <[email protected]>
A manifest v2 module had no engine version: it was served at the running engine's own version and always parsed as the latest Dang, with the minimum and maximum version checks skipped. Core API view changes, Dang language changes and the naming cut would all reach existing entrypoints silently. The engine now reads the dang.toml governing the entrypoint, with Dang's own types: the nearest one walking up from the entrypoint directory to the module directory (never above it, so the result does not depend on how the module was loaded), or the named directory's own for a module reference or address. - `[imports.Dagger] dagger = "vX.Y.Z"` is the module's engine version: its API view (through engine.ModuleAPIViewVersion, like a dagger.json engineVersion), naming rules, default caching and dependency schema. It gets the same minimum and maximum checks as an engineVersion, at load and in loadModuleSourceConfig. The sources member, which runs before the module exists, is served at that view too, as types and call are. - `dang = "X.Y"` is the Dang version the entrypoint is parsed as, set with dang.ContextWithVersion (and when scanning for a sources member). With no Dagger version declared, the engine version is v1.0.0-beta.20, the last release before the naming cut and the shared pre-cut view, which existing entrypoints were written against; with no Dang version, Dang's DefaultVersion (2.1). Both are pinned so an entrypoint that declares nothing keeps its meaning across engine releases. Both versions key SourceImplementationDigest, so results such as the persisted _moduleTypesDefinition built under one version never answer for another, even when the dang.toml lies outside the module context. Signed-off-by: Alex Suraci <[email protected]>
Covers the default (v1.0.0-beta.20 with no dang.toml, no Dagger import or `dagger = true`), a version or prerelease declared in or above the entrypoint directory and in a module reference, a dang.toml above the module directory ignored however the module is loaded, the declared API view gating Workspace.resolve and serving sources, a too-new version refused with "module requires dagger ...", the declared Dang version, and a versionless entrypoint that spells the pre-cut FunctionCachePolicy values. Signed-off-by: Alex Suraci <[email protected]>
The manifest v2 spec gains a Versions section: the dang.toml keys, which dang.toml the engine reads, the defaults and why they are pinned. The identifier casing design records that entrypoints pin their naming through it. Signed-off-by: Alex Suraci <[email protected]>
The pre-cut view moved: the naming cut is now v1.0.0-beta.22, and every v1.0.0 prerelease before it, beta.21 included, shares one view. The v1.0.0-beta.20 default still lands on it. A declared version past the engine's own is served the engine's view (engine.ModuleAPIViewVersion caps it), so say that, and check it, instead of implying it is refused. Signed-off-by: Alex Suraci <[email protected]>
The Dang entrypoint fixtures that declare no version are served the shared pre-cut view now, like the generated entrypoints they stand for, so they spell the cache policies Never, PerSession and Default again. TestDangModuleEntrypointNamingCut checks both sides of the cut: a versionless entrypoint gets the old FunctionCachePolicy members and the legacy naming (TinyHttpClient), one whose dang.toml declares engine.IdentifierCasingVersion gets the new members and naming (TinyHTTPClient), and neither accepts the other's spelling. Signed-off-by: Alex Suraci <[email protected]>
The manifest v2 spec's Versions section names the beta.22 cut and the cap on views past the engine's; the identifier-casing plan lists entrypoint versioning as a step and drops it from what is not done; the version-gating notes say where a manifest v2 module's version comes from. Signed-off-by: Alex Suraci <[email protected]>
From review: the identifier-casing doc still recommended an [entrypoint] key and argued a remote entrypoint can only pin through the module's manifest, against the outcome below it. Say what the outcome means for a module using a shared remote entrypoint: its author picks the version. The manifest v2 spec now says a withEngineVersion override of an entrypoint module is not written back, and that Dang's tooling type checks `dagger = true` against the CLI's API while the engine serves the pinned pre-cut view. Signed-off-by: Alex Suraci <[email protected]>
Changie fragments for the identifier-casing stack: prerelease-granular API views (#14810), module naming by GraphQL casing (#14891), the core API renames (#14895, breaking), and entrypoint engine versions from dang.toml (#14902). Signed-off-by: Alex Suraci <[email protected]>
Follow the identifier casing cut to v1.0.0-beta.25 in the entrypoint version docs, the Dang SDK's version tests and the changelog fragments. The releases undeclared entrypoints ran on now reach v1.0.0-beta.24. Signed-off-by: Alex Suraci <[email protected]>
An entrypoint whose dang.toml declares no Dagger version was pinned to v1.0.0-beta.20, the view every v1.0.0 prerelease before prerelease views shares. Entrypoints written while v1.0.0-beta.22 to beta.24 were current ran at those releases' own views, past the gates main shipped in them (such as Container's sourceDateEpoch and collection item checks), which the pinned default hid. Pin them to v1.0.0-beta.24 instead, the last release before the casing cut: it keeps that API and still has the old core names and naming rules. Signed-off-by: Alex Suraci <[email protected]>
Move entrypoint defaults and cut documentation forward after beta.25 shipped. Keep main's Dang pin: 00dc380 contains v2.3.0 and its versioned grammar along with main's prepared compilation changes. Signed-off-by: Alex Suraci <[email protected]>
Keep the version-gating guide's default consistent with the entrypoint resolver and manifest specification. Signed-off-by: Alex Suraci <[email protected]>
Exercise Dang 2.0 sources through the module loader and inspect the returned context file so silently skipping the scan cannot pass. Keep the existing API view assertion and drop two parser unit cases already covered by the declared and undeclared language-version integration tests. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
naming/entrypoint-dang-toml-version
branch
from
November 5, 2026 16:28
8fbb750 to
e7ce834
Compare
grouville
approved these changes
Nov 5, 2026
1 task
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.
Manifest-v2 entrypoint modules declare their Dagger API version and Dang language version in
dang.toml. Undeclared entrypoints default to v1.0.0-beta.25, preserving their pre-cut naming and API view when the beta.26 casing changes ship.What it does
A manifest-v2 module (
dagger-module.tomlwith an[entrypoint]table) has no manifestengineVersion. Previously its entrypoint followed the running engine's version, so an engine upgrade could change the API names expected by existing generated source. This PR gives the entrypoint an explicit version source and a stable pre-cut default.The engine reads the governing
dang.toml:[imports.Dagger] daggerbecomesModuleSource.EngineVersion: API view, naming (NamingView()), default function caching, dependency/core schema view, min/max checks. Thesourcesmember, which runs before the module exists, is served at the same view.dangpicks the Dang language version (dang.ContextWithVersion, also for thesourcesscan).dang.toml, no Dagger import, ordagger = true) getv1.0.0-beta.25, the last release before the cut. They keep the old core names and the strcase naming, so beta.26 can ship the renames without breaking existing entrypoints, and they keep the API main shipped from v1.0.0-beta.22 on. Dang defaults toDefaultVersion(2.1).dang.toml: for a local entrypoint, the nearest one from the entrypoint directory up to the module directory (never above it); for a module reference/address, the named directory's own.SourceImplementationDigestfor entrypoints, so cached typedefs built under one version never answer for another.withEngineVersionis an in-memory API-version override; it does not write a new value todang.tomlor the manifest.A declared version newer than the running engine uses the engine's available API view. Base-version compatibility checks still apply, as for legacy module manifests; this does not promise support for a newer engine release's features.
Boundaries and known limitations
dang.tomlcontrols the entrypoint's API/language versions. Changing that file on a moving remote ref can change consuming modules' names. This PR does not add a separate version pin in the consuming manifest; whether to add one is a separate design question.dagger = truecan disagree with standalone tooling. The engine uses the pinned beta.25 default, while Dang CLI/LSP tooling without an explicit version can use the running CLI's API. Explicit version strings avoid that ambiguity. This PR documents the difference rather than rejectingtrue.dang.tomlbeside the entrypoint. The engine reads it; it does not generate that file. Undeclared entrypoints remain on the pre-cut default.Validation
Existing integration coverage includes:
TestModule/TestDangModuleEntrypointEngineVersion: defaults, nearest config, module-directory boundaries, Directory sources and module-reference entrypoints.TestModule/TestDangModuleEntrypointDeclaredAPIView: declared API views during module loading.TestModule/TestDangModuleEntrypointSourcesAtDeclaredView: declared API and language versions during sources scanning; default and Dang 2.0 cases read the generated context file to prove the scan actually ran.TestModule/TestDangModuleEntrypointDangVersion: declared, undeclared and unsupported Dang language versions through the real loader.TestModule/TestDangModuleEntrypointNamingCutandTestModule/TestDangModuleEntrypointVersionlessCachePolicies: naming/API cut and versionless cache-policy compatibility.Minimum-version rejection, future same-base view capping, import conflicts/aliases and implementation-digest isolation have focused unit coverage rather than dedicated entrypoint integration cases.
Fresh targeted validation passed all five subcases of
TestModule/TestDangModuleEntrypoint(SourcesAtDeclaredView|DangVersion)$, plus retained parser/scanner units. Forcing the scanner to use the default grammar made only the declared Dang 2.0 case fail; restoring the implementation passed again. Two equivalent syntax unit cases were removed in favor of real-loader coverage.Earlier revisions reported passing unit packages, build/vet and targeted development-engine integrations (77 entrypoint cases and 58 naming/loading/check cases). The beta.26 restack checked build, vet with pre-existing
lostcancelwarnings disabled, and schema regeneration. These are historical results, not a claim that all suites were rerun on the current head.API changes
go -C hack/sdl-diff run . 3f7f7fa2f515812cc011ff73e41ae06550cd92f2:docs/docs-graphql/schema.graphqls 8fbb7504a2c34632efdaf2a4b5a7a6fcc3d712e8:docs/docs-graphql/schema.graphqlsNo semantic API changes.