Skip to content

Pin wasm-bindgen test crate to an exact version - #27678

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
guybedford:wasm-bindgen-exact-pin
Sep 5, 2026
Merged

Pin wasm-bindgen test crate to an exact version#27678
sbc100 merged 1 commit into
emscripten-core:mainfrom
guybedford:wasm-bindgen-exact-pin

Conversation

@guybedford

Copy link
Copy Markdown
Collaborator

The wasm-bindgen tests pin the crate to the CLI version installed in CI, but cargo add wasm-bindgen@0.2.N writes wasm-bindgen = "0.2.N", which cargo treats as the caret range ^0.2.N. As soon as a newer 0.2.x patch is published, cargo resolves to it while the CLI on PATH stays at the older version, and wasm-bindgen rejects the crate/CLI mismatch at link time. This broke CI when 0.2.128 was released while the CLI was still at 0.2.127.

  • Use exact requirements (=0.2.128) in the cargo add calls in test_other.py
  • Same for test/rust/bindgen_greeter/Cargo.toml

Verified that cargo add wasm-bindgen@0.2.127 locks to 0.2.128 while cargo add wasm-bindgen@=0.2.127 locks to 0.2.127, so future releases no longer affect the pinned tests. other.test_wasm_bindgen_* pass locally.

Made with AI assistance under my review

A bare "0.2.N" requirement is a caret range, so cargo resolves any newer
0.2.x patch release, which then mismatches the wasm-bindgen-cli on PATH.
@sbc100
sbc100 merged commit 6fad56c into emscripten-core:main Sep 5, 2026
42 checks passed
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.

2 participants