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

Improve contributor docs on testing #3619

Closed
snOm3ad opened this issue Sep 15, 2023 · 2 comments
Closed

Improve contributor docs on testing #3619

snOm3ad opened this issue Sep 15, 2023 · 2 comments
Labels
docs Issues related to documentation

Comments

@snOm3ad
Copy link
Contributor

snOm3ad commented Sep 15, 2023

Describe the Bug

When testing wasm-bindgen using cargo test --target wasm32-unknown-unknown the tests located in tests/wasm/ fail with a somewhat cryptic error message:

Caused by:
    0: failed to generate bindings for import of `__wbindgen_placeholder__::__wbindgen_link_91767d44553c09e6`
    1: wasm-bindgen needs to be invoked with `--split-linked-modules`, because "./not-found.js" cannot be embedded.
       See https://rustwasm.github.io/wasm-bindgen/reference/cli.html#--split-linked-modules for details.
error: test failed, to rerun pass `--test wasm`

It is not immediately obvious that the fix is to set environment variable WASM_BINDGEN_SPLIT_LINKED_MODULES before running the test suite.

@snOm3ad snOm3ad added the bug label Sep 15, 2023
@daxpedda daxpedda added docs Issues related to documentation and removed bug labels Sep 16, 2023
@flumm
Copy link
Contributor

flumm commented Sep 21, 2023

should be improved (if not fixed) by #3629

@daxpedda
Copy link
Collaborator

Thanks @snOm3ad for reporting it and @flumm for fixing it!

Fixed by #3629.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues related to documentation
Projects
None yet
Development

No branches or pull requests

3 participants