Load async Wasm and JSON imports in parallel#17818
Conversation
| } | ||
|
|
||
| export function buildParallelStaticImports( | ||
| function buildParallelStaticImports( |
There was a problem hiding this comment.
If this PR lands after 8.0.0 I'll need to add the export back here.
40050e1 to
3419729
Compare
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/61068 |
|
commit: |
JLHwung
left a comment
There was a problem hiding this comment.
Could you add a new exec test with multiple failing modules? Previously the behaviour of the transpiled output is to throw from the first failing module, after this PR the behaviour is to throw from one of the failing modules.
|
The spec actually does not define which failure to report, because on the web things indeed do happen in parallel. What do you suggest testing for? Encoding the current behavior, even if it might change? |
True, I think the current behaviour in this PR is okay. But a covering test will ensure any behaviour change in the future will be informed. We can still add a test for the Node.js behaviour, since previously it was transformed to a waterfall of awaited Promise, now it is a concurrent one. |
|
@JLHwung I'm struggling with writing a test here, since there isn't really a point at which we can observe "on, reading this file finished before that reading the other file started". |
3419729 to
b29d0e5
Compare
Would it work if we declared a local variable named |
OK, if that's the case we don't have to block this PR, we can investigate how to properly test it later. |
b29d0e5 to
fb2a9ec
Compare
Fixes #1, Fixes #2First commit is from #17816