Skip to content

Conversation

@ThierryBerger
Copy link
Member

@ThierryBerger ThierryBerger commented Feb 3, 2026

Fix #83

Prevent wasm CI from crashing when a Cargo.lock is commit and a new version of wasm-bindgen-cli is released, effectively installed via its name only in CI, but incompatible with the old one from the lockfile.

This PR addresses this by parsing cargo metadata and installing the same version.

@ChristopherBiscardi
Copy link

I don't really see how this fixes the "issue" since the wasm-bindgen version used in the Cargo.lock is the version that needs to match, and this PR will thus just invert the problem, leading to an old version in CI and a new version in lock.

The relevant CI for your failed CI run shows that you installed wasm-bindgen .106: https://github.com/ThierryBerger/tb_ly/blob/e1167e513e300792aff1bec947d1e139e2358f55/Cargo.lock#L7873

So this is because you have a different version installed in your project vs ci, which isn't really a thing the template can fix by pinning to an old version

@ThierryBerger ThierryBerger marked this pull request as draft February 4, 2026 08:26
@ThierryBerger
Copy link
Member Author

ThierryBerger commented Feb 4, 2026

Thanks for the precisions! I agree that my fix is indeed incorrect (as it will now fail most of the cases).

End users tend to commit their cargo.lock though, and when they do, the next update of wasm-bindgen-cli will break the CI, so I think the root issue is worth debating at least.

@mockersf
Copy link
Member

mockersf commented Feb 4, 2026

you can find the version to install with cargo metadata --format-version 1 | jq --raw-output '.packages[] | select(.name=="wasm-bindgen") | .version'

See bevyengine#84

Co-authored-by: François Mockers <francois.mockers@vleue.com>
@ThierryBerger ThierryBerger marked this pull request as ready for review February 4, 2026 16:32
Copy link

@ChristopherBiscardi ChristopherBiscardi left a comment

Choose a reason for hiding this comment

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

lockfile version detection is much better than pinning

@alice-i-cecile
Copy link
Member

@ThierryBerger can you please update the PR description/title? Once that's done I'm happy to merge.

@ThierryBerger ThierryBerger changed the title fix(ci): Pin wasm-bindgen-cli version feat(ci): parse wasm-bindgen version to install correct client Feb 4, 2026
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.

pin wasm-cli version

4 participants