Repository navigation
build(js): fix wasm build under Go 1.26 and build wasm at release - #65
Merged
Merged
Conversation
Go 1.26 emits saturating float-to-int truncations (i64.trunc_sat_f64_s) for GOARCH=wasm, which wasm-opt rejects unless the feature is enabled. Needed before the Go toolchain bump in #58. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release-js only ran build-js, so npm shipped whatever js/format.wasm was committed. That copy had not been rebuilt since 97ce884 and was missing later formatter changes (e.g. dockerfmt-ignore). Build it from the tagged source instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
wasm-optnow passes--enable-nontrapping-float-to-int. Go 1.26 emits saturating float→int truncations (i64.trunc_sat_f64_s) forGOARCH=wasm, whichwasm-optrejects otherwise. This must land before the toolchain bump in fix(deps): patch CVEs baked into the dockerfmt release binary #58, or the JS CI job breaks.release-jsnow runs the fullnpm run build(includingbuild-go) instead of onlybuild-js. Until now npm shipped the committedjs/format.wasm, which hadn't been rebuilt since 97ce884 and was missing later formatter changes such as# dockerfmt-ignore.Test plan
npm ci && npm run build && node --test dist/format.test.js→ 6/6 pass (without the flag,wasm-optfails validation)🤖 Generated with Claude Code