Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task] Improve compile-time error when wasm-bindgen-cli version is out of sync. #1113

Open
9 tasks
olivereanderson opened this issue Feb 6, 2023 · 0 comments
Open
9 tasks

Comments

@olivereanderson
Copy link
Contributor

Description

Consider adding a build script that crashes with a good error message if there is a version mismatch between the wasm-bindgen dependency and wasm-bindgen-cli. Either a build.rs in the bindings/wasm directory or something JS-based in the build folder could work.

Although mainly intended for local development, such a script might help the CI as well since it occasionally falls back to downloading an older version of the cli and the build action then later panics with a rather vague error message.

Whether it would make sense to upstream such a script to wasm-bindgen is not yet clear to me. It is probably not necessary for the many people who build their wasm binaries using wasm-pack.

Motivation

If one attempts to build the bindings using an out-of-sync (or at least older version) of wasm-bindgen-cli than wasm-bindgen a panic with an unhelpful error message occurs. It would be nice to help developers avoid wasting their time debugging this.

Resources

This issue in the wasm-bindgen repo is somewhat related.

To-do list

Create a task-specific to-do list. Please link PRs that match the TODO list item behind the item after it has been submitted.

  • Item one
  • Item two
  • Item three

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • The feature or fix is implemented in Rust and across all bindings whereas possible.
  • The feature or fix has sufficient testing coverage
  • All tests and examples build and run locally as expected
  • Every piece of code has been document according to the documentation guidelines.
  • If conceptual documentation (mdbook) and examples highlighting the feature exist, they are properly updated.
  • If the feature is not currently documented, a documentation task Issue has been opened to address this.
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

No branches or pull requests

1 participant