Skip to content

build: modernize dependencies and toolchains - #2826

Merged
alixander merged 2 commits into
masterfrom
codex/dependency-modernization
Aug 9, 2026
Merged

alixander merged 2 commits into
masterfrom
codex/dependency-modernization

Conversation

@alixander

@alixander alixander commented Aug 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • move D2 to Go 1.26.5 and update every stale direct Go dependency
  • migrate the archived gofpdf and freetype dependencies to maintained replacements
  • update Chroma, Bun 1.3.14, Binaryen 131, npm lock state, Node 24, fixuid, and release-container inputs
  • pin GitHub Actions and downloaded release tools to audited immutable versions/checksums
  • upgrade WiX to 7.0.0 behind an explicit owner-controlled EULA gate
  • leave the separate Dagro, ELK, MathJax, and Rough product-engine upgrades out of scope

Output and compatibility

Go 1.26 reordered exported fields in net/url.URL. D2 previously included that raw JSON representation in its diagram hash, so the toolchain update would have changed SVG IDs without changing diagram content. This adds a structural hash serializer and a cross-version regression test so Go 1.25.12 and Go 1.26.5 retain the same IDs.

The 68 Go 1.26 JSON golden updates are key-order-only and canonicalize to identical data. No SVG golden was accepted for the toolchain bump.

The intentional render changes come from Chroma 2.27 and the maintained sfnt decoder. Font line metrics, advances, missing-glyph behavior, and kerning remain compatible; reviewed outline-bound corrections change board geometry by at most 4 px.

The maintained PDF fork preserves page sizes, internal/external links, and pixel-identical rendered pages.

d2.js artifact comparison

Artifact Go 1.25.12 Go 1.26.5 Change
optimized WASM 32,747,205 B 33,250,162 B +1.536%
browser bundle 9,399,243 B 9,588,087 B +2.009%
total dist 74,943,599 B 76,138,357 B +1.594%
@d2lang/d2 tarball 25,678,613 B 26,056,287 B +1.471%

Go 1.26 emits non-trapping float-to-integer WASM instructions, so the Binaryen step now explicitly enables that feature. Binaryen still removes 899,293 bytes from the raw Go 1.26 module.

Validation

  • CI=1 go test ./... -count=1
  • CI=1 go test -race ./...
  • go vet ./...
  • govulncheck ./... — no vulnerabilities found
  • non-accept full E2E and cross-version HashID regression
  • native and Go/WASM builds
  • 32 Bun unit tests and 2 integration tests
  • packed Node 24 ESM and CJS consumer tests for both npm identities
  • npm audit — 0 vulnerabilities
  • PDF semantic and pixel A/B comparison
  • go mod tidy -diff, actionlint, shell/YAML syntax, checksums, and git diff --check

Owner follow-up

The Windows MSI workflow lets pull requests validate release inputs while skipping EULA-dependent MSI steps until a repository owner reviews the WiX OSMF/EULA terms and sets WIX7_EULA_ACCEPTED=true. Tag-triggered and manually dispatched MSI builds still fail closed when the variable is absent. Docker and MSI execution were not available locally; their definitions passed static validation.

@alixander
alixander marked this pull request as ready for review August 9, 2026 22:41
@alixander
alixander merged commit ac05ca6 into master Aug 9, 2026
9 checks passed
@alixander
alixander deleted the codex/dependency-modernization branch August 9, 2026 22:41
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.

1 participant