Repository navigation
dang: bump vito/dang to v2.4.1 - #15128
Merged
Merged
Conversation
vito
force-pushed
the
dang-v2.4.0
branch
4 times, most recently
from
November 10, 2026 16:16
1b86e0e to
fb60e73
Compare
eunomie
pushed a commit
to eunomie/go-sdk
that referenced
this pull request
Nov 10, 2026
sdk-helpers v1.0.11 (dagger/sdk-helpers#17) declares Dang 2.1 in dang.toml. Earlier tags carry no Dang version, so an engine with Dang 2.4 (dagger/dagger#15128) reads them as 2.4 and rejects their bare `error: Error =>` rescue patterns. Point the dependency at v1.0.11 and move the lock's floating v1 entry (which the dang SDK's helpers@v1 dependency resolves through) and the nested floor-engine lock to it as well. Signed-off-by: Alex Suraci <[email protected]>
Dang 2.4 requires `!` on type patterns, drops dang.DefaultVersion (a dang.toml without a `dang` key now means the current version), keeps data as Decoded with the builtin codec namespaces as automatic imports, restores builtin `JSON`/`YAML`/`TOML` scalar types (vito/dang#295), scopes DeclareDir's imports per file and displays GraphQL objects as their pending query. The following commits adapt the Dang SDK. The pin is vito/dang#295's head, ahead of v2.4.1; retarget it to the tag once released. Signed-off-by: Alex Suraci <[email protected]>
vito/dang v2.4.0 drops dang.DefaultVersion: source whose version no dang.toml declares, with or without a dang.toml, is Dang's current version, now 2.4, whose type patterns need a `!`. The engine pins every such module instead, so it keeps meaning what it meant: engineVersion Dang < v0.21.5 1.0 v0.21.5 ... < v1.0.0-beta.26 2.1 >= v1.0.0-beta.26 2.4 v1.0.0-beta.26 (Dang24ModuleVersion) is the first engine that embeds Dang 2.4. A manifest v2 entrypoint that declares no Dang version stays Dang 2.1 whatever its engine version, as it was. A declared `dang` version always wins. Signed-off-by: Alex Suraci <[email protected]>
DeclareDir's imports are file-local from vito/dang v2.4.0 on, so the module scope alone no longer resolves an import an interface method's directive argument names. Evaluate them in dang.DeclarationScope, the scope of the file declaring the interface, as object methods already are through their constructor's closure. Signed-off-by: Alex Suraci <[email protected]>
The Dang module skill gives the engine-version table for the Dang language, type patterns written `T!`, bare `JSON` as Dang's builtin JSON-text scalar beside Dagger's `Dagger.JSON` (converted with a cast), Dang's `JSON` codec and `Decoded` data, and how a Dagger object displays. The Dang SDK reference renders interpolated values as Dang literals and objects as their lazy query. Signed-off-by: Alex Suraci <[email protected]>
A Dang SDK module that declares no Dang version is Dang 2.1 before engineVersion v1.0.0-beta.26, where a type pattern may leave out its `!`, and Dang 2.4 from it on, where it must not; a declared version wins. Signed-off-by: Alex Suraci <[email protected]>
The engine's version pin covers only what Dang gates on its language version. From vito/dang v2.4.1 bare `JSON` in a type is Dang's builtin JSON-text scalar in every version, not Dagger's scalar (`Dagger.JSON`), and values display as Dang literals, Dagger objects as their lazy query. Signed-off-by: Alex Suraci <[email protected]>
Record the Dang version pins and the changes that reach every Dang version, for the release notes. Signed-off-by: Alex Suraci <[email protected]>
v1.0.0-beta.26 shipped with Dang 2.1 (vito/dang 00dc380), and v1.0.0-beta.27 will too, so modules declaring either were written for 2.1 and must keep it. Move Dang24ModuleVersion to v1.0.0-beta.28. An engine caps a module's view at its own version, so an engine built before the cut serves even a module declaring v1.0.0-beta.28 Dang 2.1. The tests that expect Dang 2.4 now run as an engine of the cut: the unit tests set engine.Version (as core/schema's view tests do), and TestDangTomlTypePatternVersion runs its modules on a nested dev engine reporting v1.0.0-beta.28 (as futureClient does). Signed-off-by: Alex Suraci <[email protected]>
sdk-helpers v1.0.11 (3be7456) pins its Dang modules to Dang 2.1, so they keep working now that modules without a `dang` version can default to Dang 2.4. Also record the tag's sha, as v1.0.8's is. Signed-off-by: Alex Suraci <[email protected]>
go-sdk 9f90a58 (dagger/go-sdk#104) depends on sdk-helpers v1.0.11, which pins `dang = "2.1"`. Earlier sdk-helpers tags declare engineVersion v1.0.0 without a Dang version, so this engine evaluates them as Dang 2.4, which rejects their bare type patterns (`err: Error =>`). bb23e8d..9f90a58 only bumps sdk-helpers; dagger/go stays at b0476af, as sdk/go/runtime pins it. dagger.lock gains sdk-helpers `version v1.0.11`; its tag commit was already locked for `v1`. To be replaced by the go-sdk v1.6.0 tag. Signed-off-by: Alex Suraci <[email protected]>
go-sdk v1.6.0 tags 9f90a58, the commit the Go SDK module already pinned, so the module's tree is unchanged. dagger.lock gains go-sdk `version v1.6.0` and the tag's commit. The unversioned go-sdk entry, which `workspace migrate`'s unversioned references resolve through, moves from v1.1.0 to v1.6.0; nothing else in the repo referenced v1.1.0, so its commit entry goes. Signed-off-by: Alex Suraci <[email protected]>
Retarget from the v2.4.1-0.20261110161231-fcb24298b2d7 pseudo-version to the v2.4.1 tag (247f410, the merge of vito/dang#295). It adds, past fcb2429: rejected scalar/enum literals at returns reported as the literal's own error rather than `return type mismatch`, YAML.decode ignoring empty trailing documents, and dang's own CLI querying `introspectionSchemaJson`, which this engine serves in every view. go.sum now verifies against sum.golang.org. Signed-off-by: Alex Suraci <[email protected]>
Keep what a user acts on (which modules get Dang 2.4, how to pin or migrate, the every-version display and JSON changes) and link the v2.4.1 release notes for the rest. Signed-off-by: Alex Suraci <[email protected]>
tiborvass
approved these changes
Nov 11, 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.
Bumps
github.com/vito/dang/v2fromv2.3.1-0.20261103042248-00dc3801b409tov2.4.1(which restores builtinJSON/YAML/TOMLscalar types, vito/dang#295) and adapts the Dang SDK. The rootgo.modis the only module that depends on vito/dang.Changes
1.
dang.DefaultVersionis gone: undeclared Dang versions are pinned by engine versionvito/dang#287: a
dang.tomlwithout adangkey now meansCurrentVersion(2.4), the same as nodang.tomlat all. Without a pin, every existing keyless module would jump from 2.1 to 2.4 and break on bare type patterns. The engine now pins every module that declares nodangversion, usingdang.ContextWithVersion. The pin depends on the module'sengineVersion(fromdagger.json/dagger-module.toml, or fromdang.toml's[imports.Dagger] dagger):dangkey, or nodang.toml)< v0.21.5(engine.MinimumDangV2ModuleVersion)v0.21.5…< v1.0.0-beta.28>= v1.0.0-beta.28(dangv2.Dang24ModuleVersion, the first engine embedding Dang 2.4)DefaultEntrypointDangVersion, unchanged)A declared
dang = "X.Y"always wins. The comparison usesengine.APIVersionAtLeast, so prereleases compare correctly and dev builds count as the release. Future language bumps add a row toDefaultModuleDangVersion, as the README now says. This follows "roll forward aggressively, pin as needed": new modules get the current language, and existing ones keep theirs.2. Type patterns need
!from Dang 2.4None of the repo's Dang modules, toolchains or fixtures is governed by 2.4: they all declare an
engineVersionbelow v1.0.0-beta.28, or pindang = "2.1"(the generated entrypoints). So no source neededdang migrate. A new integration test,TestDang/TestDangTomlTypePatternVersion, covers the gate: baree: Error =>works at beta.27, keyless or not, and fails at beta.28 with "writee: Error! =>".T!works at both, anddang = "2.1"at beta.28 accepts bare patterns. An engine caps a module's view at its own version, so until a release reaches the cut, only an engine of that version serves Dang 2.4: the test runs its modules on a nested dev engine reporting v1.0.0-beta.28 (_EXPERIMENTAL_DAGGER_VERSION, asfutureClientdoes), and the unit tests that expect 2.4 setengine.Versionto the cut.3.
JSON: bareJSONis Dang's builtin scalar; Dagger's isDagger.JSONFrom vito/dang v2.4.1, bare
JSONin a type is Dang's builtin JSON-text scalar at every language version (beside theJSON.encode/JSON.decodecodec andDecodeddata). In a Dagger module it is not Dagger'sscalar JSON, which staysDagger.JSON(as the generateddefaultValue: (… :: Dagger.JSON!)arguments already spell it); convert between them with a cast. The engine's entrypoint contract interfaces (core/sdk/dang/v2/entrypoint.go), the generated entrypoints of the repo's own Go modules and the Dang fixtures keep bareJSON, unchanged frommain. The engine passesreceiverValue/fnArgsas JSON text and reads back a scalar namedJSON, which the builtin scalar satisfies.Bare
JSONhas to keep working: released engines (≤ v1.0.0-beta.26) declare the contract with it, and so does every entrypointgithub.com/dagger/go-sdkgenerates. dang v2.4.0 had dropped the builtinJSONtype, and spelling theseDagger.JSONfails on those engines. v2.4.1 restores the builtin scalar instead.4.
createInterfaceTypeDefevaluates directives indang.DeclarationScopevito/dang#292 makes DeclareDir's imports file-local. Interface-method directive arguments are now evaluated in
dang.DeclarationScope(env, name), the declaring file's scope. Object methods already used their constructor's closure.5. Display: GraphQL objects show as their lazy query (intentional, not version-gated)
vito/dang#289 (and #283/#284):
toString, string interpolation,List.joinandprintrender values as Dang literals at every language version, pinned ones included. This is by design and covered by release notes rather than a gate:<Container: container.from(address: …)>, not its ID. Select.idwhere an ID is wanted.{{a: 1}},["x", "y"]), floats as1.0. Build JSON text withJSON.encode, nottoString/interpolation.I audited every
toString/${…}/print/JSON.encodein the repo's Dang sources and inline Go fixtures. All of them render strings, ints, enums, scalars or IDs (toString(x.id)), and the JSON-asserting tests useJSONEq, so nothing in the repo needed migrating.6. Other API changes
Only
dang.DefaultVersionbroke compilation. One unit test (TestDeclaresEntrypointPrebuildParsesOncePerContent) now checks at the entrypoint's Dang version: the syntax cache is keyed by version, and 2.1 is no longer the current version.The Go SDK module (
[modules.go-sdk]indagger.toml) is pinned to the go-sdk v1.6.0 tag (9f90a58, dagger/go-sdk#104), which depends on sdk-helpers v1.0.11. Earlier sdk-helpers tags declare engineVersion v1.0.0 with no Dang version, so Dang 2.4 rejects their bare type patterns. v1.0.11 pinsdang = "2.1".7. Docs and skills
core/skills/dang-dagger-modules/SKILL.md(engine-version table,T!patterns, bareJSONas the builtin scalar vsDagger.JSON, theJSONcodec andDecoded, display form, pitfalls),core/sdk/dang/README.md(version table, the new-language-version procedure, which changes reach every version), anddocs/current_docs/reference/sdks/dang.mdx(interpolation renders Dang literals and objects as lazy queries). The Dang language skill itself comes embedded from vito/dang.Tests run
On vito/dang v2.4.1:
go test ./core/sdk/dang/...,go test ./core/schema -run 'DangSourceVersion|DangSDKVersion'andgo test ./core -run Skillpass, and core/integration compiles. The other results below come from runs on vito/dang#295 before its final review fixes. Those fixes change only the error reported for a rejected literal at a return, YAML.decode of empty trailing documents, and dang's own CLI. No test here expectsreturn type mismatch.go test ./core/sdk/dang/...: pass.TestEntrypointContractConformanceruns bare-JSONentrypoints against the bare-JSONcontract with Dagger'sscalar JSONauto-imported.go test ./core/schema/: pass (TestDangSourceVersionMutations, run as a beta.28 engine, expects 2.1 for a beta.27 override and 2.4 for a beta.28 one)go test ./core/ -run Skill: passcallDangFunction→entrypointJSONResultthrough a bare-JSONcall.receiverValue/fnArgsarrive asScalarValues of the builtinJSONtype. ReturningfnArgs,text :: JSON!,JSON.encode(…) :: JSON!and("{}" :: Dagger.JSON!) :: JSON!all yield a scalar namedJSONwith valid JSON text. So do the literal casts the repo's fixtures use:"{}","\"hello\"", thefnArgs != ("{\"status\":\"Ready\"}" :: JSON!)comparison and the triple-quotedllm_tool_statedocument, as well as backtick literals (an interpolated`{"t": "${receiverType}"}` :: JSON!and a comparison with a backtick literal). Invalid literals, quoted or backtick, cast or compared, are rejected withinvalid JSONwhen the source is checked, even in a branch that never runs.JSON.encodeof a record embedsJSONvalues as strings, which the generated Go dispatcher accepts.JSON!/YAML!/TOML!or compared with one, in the repo's.dangfiles and the Dang fixtures inlined in Go tests: all valid JSON. No backtick literal is cast or compared, and noYAML/TOMLcasts exist.TestDang/TestDangTomlTypePatternVersion: pass. Other integration tests (TestDang/TestDangToml…,TestModule/TestDangModuleEntrypoint…): not run yet.Follow-ups outside this repo
JSON: with dang v2.4.1, go-sdk's generated entrypoints keep bareJSONand need no change.