Repository navigation
dang: support v1 and v2, routed by module engineVersion - #13388
Merged
Merged
Conversation
Routine bump of vito/dang, pulling in dot-block application and `.{{ }}`
selection, an optional `pub` keyword, a postfix `!` non-null assertion, a
Map collection type, List.find, plain GraphQL introspection, and support
for the new Dagger module config, along with assorted docs and fixes.
Signed-off-by: Alex Suraci <[email protected]>
Dang v2 changed the meaning of `.{ }` from GraphQL selection to
dot-block application, with selection moving to `.{{ }}`. Both forms
parse under either version, so modules written against v1 would
silently change behavior if evaluated with v2.
Import both github.com/vito/dang majors and route each module to the
version matching its engineVersion: modules pinned before v0.21.5 keep
v1 semantics, v0.21.5+ gets v2. dangSDK becomes a thin dispatcher over
a per-major implementation package: core/sdk/dang/v2 is the living
copy, core/sdk/dang/v1 a frozen snapshot (identical except import
paths and doc comments), and core/sdk/dang/shared holds the dang-free
plumbing so a future major is a pure copy plus import rewrite. See
core/sdk/dang/README.md for the maintenance recipe.
Signed-off-by: Alex Suraci <[email protected]>
Dang modules now route to the Dang v1 runtime when their engineVersion
is below v0.21.5. Most dang fixtures had no engineVersion at all (which
normalizes below the gate) or pinned v0.20.x, so the whole suite would
silently exercise the frozen v1 package. Pin them all to v0.21.5 so the
main suite tests the living v2 implementation; the fixtures use no
`.{ }` syntax, so their behavior is identical under either major.
Signed-off-by: Alex Suraci <[email protected]>
Add a legacy-selection module pinned to v0.20.6 that uses `.{ }` as
selection (Dang v1) and a dot-block module at v0.21.5 that uses `.{ }`
application and `.{{ }}` selection (Dang v2), with a
TestVersionedSyntax suite asserting both run end-to-end with the
semantics they were written against.
Signed-off-by: Alex Suraci <[email protected]>
Linking both dang majors into one cgo-enabled binary (e.g. the core/schema test binary in CI) failed with multiple definitions of tree_sitter_dang and its external scanner functions, since both majors compiled the same tree-sitter C sources and C symbols share one global namespace. dang v1.0.1 renames the frozen line's symbols with a _v1 suffix; the canonical names stay with v2 so editor integrations keep working. The engine binary itself was unaffected because it builds with CGO_ENABLED=0 and dang falls back to its pure-Go paths. Document the symbol-rename step in the next-major recipe. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
bump-dang-2026-06-09
branch
from
June 10, 2026 02:01
40f88cb to
dbc0e03
Compare
sipsma
approved these changes
Jun 10, 2026
marcosnils
pushed a commit
that referenced
this pull request
Jun 10, 2026
* go.mod: bump vito/dang to 7b7d885fb711
Routine bump of vito/dang, pulling in dot-block application and `.{{ }}`
selection, an optional `pub` keyword, a postfix `!` non-null assertion, a
Map collection type, List.find, plain GraphQL introspection, and support
for the new Dagger module config, along with assorted docs and fixes.
Signed-off-by: Alex Suraci <[email protected]>
* core/sdk: pick dang major by module engineVersion
Dang v2 changed the meaning of `.{ }` from GraphQL selection to
dot-block application, with selection moving to `.{{ }}`. Both forms
parse under either version, so modules written against v1 would
silently change behavior if evaluated with v2.
Import both github.com/vito/dang majors and route each module to the
version matching its engineVersion: modules pinned before v0.21.5 keep
v1 semantics, v0.21.5+ gets v2. dangSDK becomes a thin dispatcher over
a per-major implementation package: core/sdk/dang/v2 is the living
copy, core/sdk/dang/v1 a frozen snapshot (identical except import
paths and doc comments), and core/sdk/dang/shared holds the dang-free
plumbing so a future major is a pure copy plus import rewrite. See
core/sdk/dang/README.md for the maintenance recipe.
Signed-off-by: Alex Suraci <[email protected]>
* core/integration: pin dang testdata to v0.21.5
Dang modules now route to the Dang v1 runtime when their engineVersion
is below v0.21.5. Most dang fixtures had no engineVersion at all (which
normalizes below the gate) or pinned v0.20.x, so the whole suite would
silently exercise the frozen v1 package. Pin them all to v0.21.5 so the
main suite tests the living v2 implementation; the fixtures use no
`.{ }` syntax, so their behavior is identical under either major.
Signed-off-by: Alex Suraci <[email protected]>
* core/integration: cover dang v1/v2 syntax routing
Add a legacy-selection module pinned to v0.20.6 that uses `.{ }` as
selection (Dang v1) and a dot-block module at v0.21.5 that uses `.{ }`
application and `.{{ }}` selection (Dang v2), with a
TestVersionedSyntax suite asserting both run end-to-end with the
semantics they were written against.
Signed-off-by: Alex Suraci <[email protected]>
* go.mod: bump vito/dang to v1.0.1 for cgo symbol fix
Linking both dang majors into one cgo-enabled binary (e.g. the
core/schema test binary in CI) failed with multiple definitions of
tree_sitter_dang and its external scanner functions, since both majors
compiled the same tree-sitter C sources and C symbols share one global
namespace. dang v1.0.1 renames the frozen line's symbols with a _v1
suffix; the canonical names stay with v2 so editor integrations keep
working. The engine binary itself was unaffected because it builds
with CGO_ENABLED=0 and dang falls back to its pure-Go paths. Document
the symbol-rename step in the next-major recipe.
Signed-off-by: Alex Suraci <[email protected]>
---------
Signed-off-by: Alex Suraci <[email protected]>
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
dagger 0.21.5 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## v0.21.5 - 2026-06-10 ### Added - Added expand option to container.exists by @alexcb in dagger/dagger#13310 - Support both Dang v1 and v2, routed by module engineVersion by @vito in dagger/dagger#13388 ### Changed - Prune local cache during disk pressure by @sipsma in dagger/dagger#13375 - Persist trivial core objects by @sipsma in dagger/dagger#13387 ### Fixed - Correct namespaced type-name mangling and cross-dependency interface dispatch in Dang by @vito in dagger/dagger#13377 - Surface exec errors correctly on the Bun runtime in the TypeScript SDK by @marcosnils in dagger/dagger#13395 - Ignore host xattrs for local filesync import identity by @sipsma in dagger/dagger#13389 - Don't shallow-clone the user's repo for git telemetry labels by @marcosnils in dagger/dagger#13363 - Preserve pending lazy container parents by @sipsma in dagger/dagger#13365 - Preserve withChanges parent layers by @dagger-codex[bot] + @shykes in dagger/dagger#13342 - Treat incomplete image metadata as cache miss by @sipsma in dagger/dagger#13346 - Cache registry image metadata by @dagger-codex[bot] + @shykes in dagger/dagger#13341 - Don't require id field for interface conformance in Dang by @vito in dagger/dagger#13318 - Use module-local check names for scale-out by @dagger-codex[bot] + @tiborvass in dagger/dagger#13329 - Fix snapshot owner lease attach/remove race by @sipsma in dagger/dagger#13321 - Follow source symlinks when copying directory contents in layercopy by @marcosnils in dagger/dagger#13326 ### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </pre> <p>View the full release notes at <a href="https://github.com/dagger/dagger/releases/tag/v0.21.5">https://github.com/dagger/dagger/releases/tag/v0.21.5</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!11205
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.
This started as a routine
vito/dangbump, but the bump includes a breaking syntax change (#101):.{ }changed from object selection to dot-block application (piping), with selection moving to.{{ }}. Both forms parse under either version with different meanings, so existing Dang modules would silently change behavior — there is no parse error to catch it.Instead of breaking old modules, this PR introduces a multi-version Dang runtime: the engine now imports both
github.com/vito/dang(v1, old semantics) andgithub.com/vito/dang/v2(new semantics) and routes each module by itsengineVersion:engineVersion< v0.21.5.{ }is selection>= v0.21.5.{ }is dot-block application,.{{ }}is selectionHow it works
core/sdk/dang_sdk.gois now a thin dispatcher:dangSDKkeeps all version-agnosticcore.SDKbehavior and picks a per-major implementation via a newengine.MinimumDangV2ModuleVersion = "v0.21.5"gate (sameCheckVersionCompatibilitypattern as the function-caching gate).core/sdk/dang/v2/is the living implementation (all feature work lands here),core/sdk/dang/v1/is a frozen snapshot — byte-identical except package clause, dang import paths, and doc comments.core/sdk/dang/shared/holds the dang-free plumbing (nested-client proxy server, client metadata, error conversion) so the per-major packages stay pure copies.engineVersion, which always routes to the newest major — so frozen majors never need feature work, only compiler-forced updates when engine internals change. When dang v3 ships, supporting it is: copy the living package, rewrite imports, add one constant, add one case to the dispatch ladder. The full recipe lives incore/sdk/dang/README.md.cgo gotcha
Linking both majors into one cgo-enabled binary collided on the tree-sitter C symbols (
tree_sitter_dang+ external scanner functions) — C symbols share a global namespace, so Go's module-major isolation doesn't help. Fixed upstream in dang v1.0.1 by renaming the frozen line's symbols with a_v1suffix via#defines in the cgo preamble; the canonical names stay with v2 so editor integrations are unaffected. The engine binary itself was never affected (it builds withCGO_ENABLED=0; dang falls back to pure-Go paths) — only host-side test binaries hit it.Tests
engineVersion: v0.21.5so the main suite exercises the living v2 path (~40 of them previously had no engineVersion and would have silently routed to v1).TestDang/TestVersionedSyntaxproves the routing end-to-end: alegacy-selectionmodule pinned to v0.20.6 using.{ }selection (v1), and adot-blockmodule at v0.21.5 using.{ _ * 2 }piping and.{{ }}selection (v2).TestDang(32),TestModule/TestBuiltinDang*(9),TestWorkspace/TestContextualWorkspace(332),TestUpdang cases (5) — all green.Note
The in-repo Dang modules (
toolchains/*,cmd/codegen,modules/markdownlint) are pinned tov0.21.4and will route to v1 until v0.21.5 ships (the released CLI rejects newer configs). They use no.{ }syntax, so behavior is identical; they should be bumped after the release.Upstream changes in this bump
From
0175bae(2026-06-03) to v1.0.1 / v2.0.0 (2026-06-09).Language
pubkeyword is now optional; bindings default to public!non-null assertion operator.{ }, object selection.{{ }}, and implicit_block parameter (v2 only; reverted on the v1 line)Mapcollection typeList.findregexpMatchis now a plain object with named capturesGraphQL / Dagger
Docs
🤖 Generated with Claude Code