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

Don't inject assertions onto the ready promise #23176

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 16, 2024

This is a debug feature that means users who did not await the promise and tried to access stuff directly on it would see a nice error message.

However with the advent of more usage of async/await, for example in #23157 it is not always the ready promise that gets returned to the user but a language-generated promise from an await call.

We could try to jump through more hoops to continue to support this debug feature, but I don't think added complexity in the toolchain or the generated code would be worth it.

Split out from #23157.

@sbc100 sbc100 requested review from kripken and dschuff December 16, 2024 18:27
This is a debug feature that means users who did not await the promise
and tried to access stuff directly on it would see a nice error message.

However with the advent of more usage of async/await, for example in
\emscripten-core#23157 it is not always the ready promise that gets returned to the
user but a language-generated promise from an `await` call.

We could try to jump through more hoops to continue to support this
debug feature, but I don't think added complexity in the toolchain
or the generated code would be worth it.

Split out from emscripten-core#23157.
@sbc100 sbc100 force-pushed the ready_promise_assertions branch from e370f04 to 1958e67 Compare December 16, 2024 21:42
@sbc100 sbc100 enabled auto-merge (squash) December 16, 2024 22:13
@sbc100 sbc100 disabled auto-merge December 16, 2024 23:04
@sbc100 sbc100 merged commit df004b2 into emscripten-core:main Dec 16, 2024
26 of 28 checks passed
@sbc100 sbc100 deleted the ready_promise_assertions branch December 16, 2024 23:04
hedwigz pushed a commit to hedwigz/emscripten that referenced this pull request Dec 18, 2024
This is a debug feature that means users who did not await the promise
and tried to access stuff directly on it would see a nice error message.

However with the advent of more usage of async/await, for example in
\emscripten-core#23157 it is not always the ready promise that gets returned to the
user but a language-generated promise from an `await` call.

We could try to jump through more hoops to continue to support this
debug feature, but I don't think added complexity in the toolchain or
the generated code would be worth it.

Split out from emscripten-core#23157.
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