Skip to content

v1.5 doesn't compile anymore for wasm32 #52

New issue

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

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

Already on GitHub? # to your account

Closed
mockersf opened this issue Nov 6, 2023 · 2 comments · Fixed by #54
Closed

v1.5 doesn't compile anymore for wasm32 #52

mockersf opened this issue Nov 6, 2023 · 2 comments · Fixed by #54

Comments

@mockersf
Copy link

mockersf commented Nov 6, 2023

Similar to smol-rs/async-executor#72

with blocking v1.5:

error[E0599]: no method named `get_or_init_blocking` found for struct `async_lock::OnceCell` in the current scope
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/blocking-1.5.0/src/lib.rs:170:37
    |
170 |             let executor = EXECUTOR.get_or_init_blocking(|| {
    |                            ---------^^^^^^^^^^^^^^^^^^^^ help: there is a method with a similar name: `get_or_init`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `blocking` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

forcing to use version 1.4.1 makes compilation work again

@taiki-e
Copy link
Collaborator

taiki-e commented Nov 7, 2023

Thanks for the report, yanked 1.5.0. However, I suspect that blocking does not actually work in wasm.

@notgull
Copy link
Member

notgull commented Nov 7, 2023

I agree with @taiki-e here. I doubt that blocking works in smol and is probably just pulled in as part of smol/async-fs/etc.

notgull added a commit that referenced this issue Nov 7, 2023
Breaking change but hopefully not a controversial one.

Closes #52

Signed-off-by: John Nunley <dev@notgull.net>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
3 participants