Skip to content

bump dang - #13482

Merged
vito merged 4 commits into
dagger:mainfrom
vito:bump-dang-20260617-010257
Jun 17, 2026
Merged

bump dang#13482
vito merged 4 commits into
dagger:mainfrom
vito:bump-dang-20260617-010257

Conversation

@vito

@vito vito commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/vito/dang/v2 to a59661e1b2bb.

What's new in Dang

Codecs: JSON / YAML / TOML are now first-class

  • The top-level toJSON / fromJSON / fromYAML functions are replaced by JSON.encode / JSON.decode, YAML.encode / YAML.decode, and TOML.encode / TOML.decode. All three formats now behave identically.
  • Dang ships JSON, YAML, and TOML as builtin codec scalars installed in the prelude, so :: JSON resolves in type position with no import. A same-named schema- or user-declared scalar (e.g. Dagger's scalar JSON) merges with the builtin and gets the same codec grafted on, instead of colliding.
  • Scalar API attachment is generalized beyond codecs into a builtin-scalar registry, so members can be stapled onto any same-named scalar (owned, user-declared, or schema-imported).

Codec field directives

  • Per-format field directives for the JSON/YAML/TOML codecs: @JSON.field(name:, omitNull:, omitEmpty:) renames a field's serialized key and can drop it when null/empty, and @JSON.ignore excludes it entirely. The same directives exist for YAML and TOML, scoped per format so a rename in one never leaks into another.
  • omitEmpty drops a field when its value is empty the way Go's encoding/json omitempty does (null, "", 0, false, or an empty list/map); omitNull stays the narrower option that only drops null.
  • Renamed fields round-trip through decode, and directives are validated at inference time: non-literal/malformed names, omitNull on a non-null field, omitNull + omitEmpty together, ignore + field together, and two fields colliding on one key are all compile errors with source locations.

String methods

  • toBase64 / fromBase64 for String -> String base64 conversion (fromBase64 reports a source-located error on invalid input).
  • truncate for strings (thanks @sagikazarmark).

Misc

  • FindDaggerModule now also looks for dagger.toml.
  • TOML encode/decode errors (top-level non-table, null-in-list) are now reported in Dang terms.
  • Treesitter parses qualified directive applications; playground grammar wasm regenerated.
  • stdlib reference docs gain a table of contents and JSON/YAML/TOML coverage.

Full range: vito/dang@fd0fc4f...a59661e

Signed-off-by: Alex Suraci <[email protected]>
@vito vito added this to the v0.21.7 milestone Jun 17, 2026

@shykes shykes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optimistically approving. I'm assuming this won't break all my modules when we release? 😅

@sagikazarmark

Copy link
Copy Markdown
Contributor

I tell you a couple minutes after merge 😄

Dang moved JSON encoding behind the JSON namespace. Update the Dang integration fixtures that still used the removed top-level toJSON builtin.

Signed-off-by: Tibor Vass <[email protected]>
Signed-off-by: Solomon Hykes <[email protected]>
@vito

vito commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@shykes As an exercise I'll keep toJSON around but marked @deprecated so modules don't break: vito/dang#137

@vito
vito force-pushed the bump-dang-20260617-010257 branch from 0d086b3 to 1ff6ade Compare June 17, 2026 14:42
@vito
vito merged commit 382ccec into dagger:main Jun 17, 2026
81 checks passed
marcosnils pushed a commit that referenced this pull request Jun 17, 2026
* bump dang

Signed-off-by: Alex Suraci <[email protected]>

* test: update Dang JSON encoding calls

Dang moved JSON encoding behind the JSON namespace. Update the Dang integration fixtures that still used the removed top-level toJSON builtin.

Signed-off-by: Tibor Vass <[email protected]>
Signed-off-by: Solomon Hykes <[email protected]>

* bump to Dang v2.1.0, with deprecated toJSON

Signed-off-by: Alex Suraci <[email protected]>

* bump to Dang v2.1.1 for constructor scope fix

Signed-off-by: Alex Suraci <[email protected]>

---------

Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Tibor Vass <[email protected]>
Signed-off-by: Solomon Hykes <[email protected]>
Co-authored-by: Solomon Hykes <[email protected]>
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
dagger 0.21.7

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.7 - 2026-06-17

### Changed

- Bump default CNI IP address pool size to reduce address exhaustion under high container concurrency. by @sipsma in dagger/dagger#13394
- Bump Dang to v2.1.1, moving JSON encoding behind the `JSON` namespace (with a deprecated top-level `toJSON`) and picking up constructor scope and nullable input fixes. by @vito in dagger/dagger#13482

### Fixed

- `.env` file handling so non-matching variables are kept as hidden expansion context instead of being dropped, allowing later variables to expand against them. by @marcosnils in dagger/dagger#13490
- Filesync so syncing a re-included file under a gitignored directory (e.g. `foo/` ignored with `!foo/bar.txt`) no longer fails with `no such file or directory`; ignored parent dirs are now created on demand for visible descendants. by @grouville in dagger/dagger#13439
- A concurrent map panic during GC by guarding session client map iteration, preventing fatal `concurrent map iteration and map write` crashes. by @sipsma in dagger/dagger#13474
- Go SDK codegen so SDK auth config is forwarded to typedef generation, allowing modules with private transitive Go dependencies to resolve during codegen. by @grouville in dagger/dagger#13457
- Core enum handling to preserve conventional enum member names. by @shykes in dagger/dagger#13435
- The Apple `container` driver to honor the privileged option by granting all capabilities (`--cap-add ALL`), so the engine can bind-mount `/etc/resolv.conf` on startup with `container` 1.0.0's reduced default capability set. by @eunomie in dagger/dagger#13460
- Dang directive argument resolution so `@cache` (and other directive) arguments resolve against the declaring type's file scope, fixing `FunctionCachePolicy not found in env` errors in multi-file modules. by @vito in dagger/dagger#13455
- The report-mode heartbeat so it waits for its goroutine to exit before final render, avoiding interleaved output. by @kpenfound in dagger/dagger#13425
- Nullable result unwrapping for SDK input so nullable values are passed correctly into SDK functions. by @shykes in dagger/dagger#13401

### 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.7">https://github.com/dagger/dagger/releases/tag/v0.21.7</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!11763
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.

3 participants