-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Build-time error on use of emscripten_promise_any if Promise.any is not available #19172
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
Conversation
5f417e5
to
a88ef13
Compare
test/test_core.py
Outdated
# This test depends on Promise.any, which in turn requires a modern target. Check that it | ||
# fails to even build without bumping the min versions: | ||
err = self.expect_fail([EMCC, test_file('core/test_promise.c')]) | ||
self.assertContained('error: emscripten_promise_any used, but Promise.any is not supported the current browser configuration', err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertContained('error: emscripten_promise_any used, but Promise.any is not supported the current browser configuration', err) | |
self.assertContained('error: emscripten_promise_any used, but Promise.any is not supported in the current runtime configuration (run with EMCC_DEBUG=1 in the env for more details)', err) |
47693ab
to
5bf1a9e
Compare
@@ -9761,6 +9761,14 @@ def test_main_reads_args(self): | |||
|
|||
@requires_node | |||
def test_promise(self): | |||
# This test depends on Promise.any, which in turn requires a modern target. Check that it | |||
# fails to even build without bumping the min versions: | |||
err = self.expect_fail([EMCC, test_file('core/test_promise.c')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't all the versions below support Promise.any, so this build should succeed rather than fail? I must be missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default versions fail, so we run a compile here to check that it fails, then we set the correct settings and then we expect the test to pass, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, yes, makes sense. I didn't grok that this was doing the build twice, once before and once after setting the settings.
1af44c8
to
b40e4fd
Compare
b40e4fd
to
bd5dc58
Compare
No description provided.