-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Base support for coalescing & logical assignment #20549
Base support for coalescing & logical assignment #20549
Conversation
Nice! I so think we might run into problems with out min node version.. can you confirm by adding |
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.
Do you know what the first node version to support this syntax was?
4de686b
to
0ae96ea
Compare
I actually tried some of the failed tests from the other PR - e.g. |
Node.js 16 so already covered by our MIN_NODE_VERSION. |
If we just do nullish operators |
Ahh you're probably spot on with that question. I see it sets
what is our minimum right now? |
MIN_NODE_VERSION relates to the min node supported by the generated code. The min node version needed to the compiler itself is completely separate and is specified here: Lines 55 to 59 in 1dedd1b
|
Ah that's pretty ancient and long dead even for security updates :( Why does it use different version than whatever emsdk ships? For scenarios of folks using Emscripten w/o emsdk? But, assuming I revert changes to parseTools.js and such, why does it even matter? |
For this change it won't matter since we don't currently run test_es5_transpile in test-node-compat. But as soon as we add any unsupported stuff to the core stdlib the compiler will no longer run on that old version of node. |
Yes, for folks who just want use their OS/system version of node. Its probably reasonable to bump that version, but we should do that as a separate change. |
It looks like debian stable (bookworm, which was recently released) has 18.3: https://packages.debian.org/bookworm/arm64/nodejs The previous debian/stable was 12.22.12: https://packages.debian.org/bullseye/arm64/nodejs The current ubuntu LTS (jammy) has 12.22.9 : https://packages.ubuntu.com/jammy/amd64/nodejs. Would 12.22.9 have the features we need? |
No, none of those :( I believe most folks install newer Node.js from https://github.com/nodesource/distributions anyway, but I might be mistaken. |
I guess we need to update our min supported version to 16.0 then? That doesn't seem unreasonable at this point. |
If you think that's an option, that would be great, yeah. Alternatively, as I said, at least Node 14 would get us halfway (some of the newer operators but not all). |
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549.
Something I still don't understand is how a change like this can lead to Wasmer bulk-memory validation issues (see failing standalone tests, it's as if standalone modules are suddenly compiled with bulk memory support but weren't before):
How is that connected to either ECMAScript version update or even Node.js version? |
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549. One side effect of this is that we no longer need to support the `NODEJS_CATCH_REJECTION` setting, which was needed only for node versions older than v15.
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549. One side effect of this is that we no longer need to support the `NODEJS_CATCH_REJECTION` setting, which was needed only for node versions older than v15.
We use the feature matrix code to opt into certain features based on the MIN_XXX_VERSIONS specified for the different targets: Lines 2514 to 2519 in 1dedd1b
This is basically saying: enable bulk memory if all our current targets support it. |
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549. One side effect of this is that we no longer need to support the `NODEJS_CATCH_REJECTION` setting, which was needed only for node versions older than v15.
Hm that seems like a bug that feature matrix of browser/JS engines affects standalone target? |
The standalone builds can still run in browser and engines and JS engines though. Are you suggesting that we simply ignore The fix here is probably to set |
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549. One side effect of this is that we no longer need to support the `NODEJS_CATCH_REJECTION` setting, which was needed only for node versions older than v15.
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549. One side effect of this is that we no longer need to support the `NODEJS_CATCH_REJECTION` setting, which was needed only for node versions older than v15.
That seems like the safest bet, but not ideal. I guess a proper alternative would be to have That said, it looks like the actual problem is that CI is using very old prerelease version of Wasmer for testing. As per https://webassembly.org/roadmap/, it supported bulk memory since 1.0. |
Yup, we can/should update that. |
29481aa
to
09b2568
Compare
The remaining failures are interesting and probably not going to be addressed by #20551. They all have the same cause:
It appears that bumping browser versions here makes BULK_MEMORY enabled by default, as after this bump it's now supported by all engines. That, in turn, breaks wasm64 tests because bulk memory seems incompatible with wasm64 at the moment, or rather I'm going to raise a separate issue for it for someone else to look into. |
f18522e
to
a3e86b9
Compare
Bulk memory for wasm64 was implemented in V8 at v8/v8@18469ec which was first shipped in Node.js 18 (thanks @kleisauke). Split out from emscripten-core#20549 where this was caught initially. Fixes emscripten-core#20560.
It now needs version to be lowered from the default, not bumped.
a3e86b9
to
a63dda8
Compare
All tests here finally pass but I've split out bulk memory + wasm64 fix into #20549 and will wait for it to be merged first. |
...not counting the ever-flaking test_pthread_proxying_refcount. Restarted. |
For the minimum build-time version of node we bump 10.19.0 -> 16.20.0 This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549.
For the minimum build-time version of node we bump 10.19.0 -> 16.20.0 This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549.
For the minimum build-time version of node we bump 10.19.0 -> 16.20.0 This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549.
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549.
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549.
This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549.
…mscripten-core#20551) This new minimum version matches the version that we ship with emsdk. Critically it supports null coalescing & logical assignment needed by emscripten-core#20549.
Now that #20551 has landed I think this should be good to go. |
This is also waiting for #20562. Which I have already restarted but looks like I'll have to again (unless it's a legitimate failure). |
Base PR for #20531.