fix(wasm): bump wasm nightly to 2025-02-20, stop silent wasm-build failures - #709
Merged
Merged
Conversation
…ures Two coupled bugs were making `test_halo2_wasm_web` red on every push to main since 2026-03-16: 1. The pinned wasm toolchain `nightly-2024-07-18` (cargo 1.81.0-nightly) predates `edition2024`. A transitive dep — `wit-bindgen 0.51.0` / `wit-bindgen-rust-macro 0.51.0` — uses `edition = "2024"`, so cargo refuses to parse it and `wasm-pack build` exits non-zero. 2. The Build Web step wraps mopro in `script -q -c "..." /dev/null` on Linux to fake a TTY. Util-linux `script` returns its own exit code (0) by default, not the child's, unless `-e` / `--return` is passed. So mopro exited 1, but the step reported success — `cli_build_web` went green with no `MoproWasmBindings/` produced, the cache save was skipped, and the downstream `test_halo2_wasm_web` job cache-missed and tried to `yarn install` in a directory that never existed. Fixes: - Bump `nightly-2024-07-18` -> `nightly-2025-02-20` (around Rust 1.85 stabilization, when `edition2024` became stable) in `mopro-ffi/rust-toolchain.toml`, `mopro-ffi/src/app_config/web.rs`, and both workflow references. - Add `-e` to the Linux `script` invocation so a failing mopro build fails the step. - Guard the Build Web step with a `test -d MoproWasmBindings` check so any future silent-exit class of bug surfaces at the step that introduced it rather than corrupting a downstream job. Fixes #708
Deploying mopro with
|
| Latest commit: |
482e948
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2b4499e9.mopro.pages.dev |
| Branch Preview URL: | https://fix-wasm-ci-nightly-and-sile.mopro.pages.dev |
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
nightly-2024-07-18→nightly-2025-02-20inmopro-ffi/rust-toolchain.toml,mopro-ffi/src/app_config/web.rs, and both.github/workflows/build-and-test.ymlreferences.-eto the Linuxscript -q -c "..."invocation in the Build Web step so a failingmopro buildactually fails the step.test -d MoproWasmBindingsguard that exits with a::error::annotation if the wasm bindings weren't produced.Why
Full diagnosis in #708. Short version:
nightly-2024-07-18(cargo 1.81.0-nightly) predatesedition2024. A transitive dep —wit-bindgen 0.51.0/wit-bindgen-rust-macro 0.51.0— usesedition = "2024", so cargo refuses to parse its manifest andwasm-pack buildexits non-zero.scriptreturns its own exit code (0) by default, not the child's, unless-e/--returnis passed. So mopro exited 1,scriptexited 0, the Build Web step reported success with noMoproWasmBindings/produced,actions/cache@v4skipped the save (Path Validation Error: Path(s) ... do(es) not exist), and the downstreamtest_halo2_wasm_webjob cache-missed and tried toyarn installin a directory that never existed.The post-build guard is defense in depth: even if a future regression sneaks past the
script -echange, we catch it at the step that introduced it instead of corrupting a downstream job.Out of scope
script -q /dev/null cmd argsform is left untouched — BSDscriptsemantics differ and the macOS web path isn't currently in the failing matrix.script(the# TODO: allow mopro CLI to run fully non-interactivecomment) is unchanged; a proper fix in the CLI would let us drop the pseudo-TTY entirely. Tracked separately.Test plan
cli_build_web (halo2)succeeds and now actually producesMoproWasmBindings/.test_halo2_wasm_web (halo2)(which depends on the above) goes green —yarn installfinds its working directory and the browser test runs.test -d MoproWasmBindingsguard prints::error::wasm build did not produce MoproWasmBindings/and fails the step at the actual point of failure.🤖 Generated with Claude Code