-
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
Update default minimum Node.js version to 16.0.0 #19192
Conversation
This is about 2 years old, and the node website already provides newer versions both for latest and for LTS. However, other places are behind, for example the latest Ubuntu LTS (22) has Node 12, so perhaps we should wait on this. This is possible after emscripten-core/emsdk#829 made the emsdk install a 15.x version by default.
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.
lgtm % discussions about when to actually land this
Node 15 no longer has active or security support. Why not go straight to Node 16 which is currently in maintenance LTS? |
@jeswr Good point, yeah, it might be better to do that. This came up on the mailing list too: https://groups.google.com/g/emscripten-discuss/c/HmCTeDEw6cQ/m/-nYu5HqfCAAJ It does seem more obvious to go for 16, but that does allow strictly fewer installations than going to 15 (and 15 is the minimum we need for the wasm-bigint feature), so it's not obvious to me what is best. |
I'd be suggesting 16. Odd versions of node (including 15) are short lived by design and shouldn't really end up being used in any production scenarios - Node 15 has been deprecated for almost 2 years now (c.f. https://endoflife.date/nodejs).
I'd be suggesting to upgrade emsdk to 16.x as well (and always using even versions of Node as defaults going into the future). |
Just read the mailing list as well and wanted to respond to a particular comment there.
This would actually be quite a beneficial update in our use case in swipl-wasm. I currently have a draft PR open where we are needing to switch over to node 16 for the build step in order to generate a file that will pass our |
Are the errors you are seeing from running the tests (i.e. running the output of emscripten)? Remember this issue is just about the minimum node version that we target by default. You are still free to run the output on a more recent version, such as 16.. or whatever you want. |
If there is an issue with |
1 similar comment
If there is an issue with |
I would also like to see emsdk stop placing node on the path automatically. Or at least not at the start of the path, I would be okay with adding node to the end of the path. Particularly if there is already a newer node around that I would prefer to use it is annoying to have to adjust the path to work around the older node. |
|
After thinking more on this I am convinced that we should switch to 16 by default. It is less surprising by far - we've had several people mention that - and also this is tied to the version the emsdk installs by default, and 16 is just much more useful for people to have (since it is a supported version that people might also find useful in their CIs etc.). But that would depend on making the emsdk install 16 by default. @sbc100 , I know you did the upgrade to 15 fairly recently, and I guess there's no reason to rush to do it again. But next time we think about an update there, I think it would be good to do. In general, I think it makes sense for us to eventually switch to having the emsdk install node LTS versions by default. |
Looks like node 16 is coming to emsdk: emscripten-core/emsdk#1232 |
Updated to Node 16 after emscripten-core/emsdk#1232 landed. |
ChangeLog.md
Outdated
@@ -20,6 +20,8 @@ See docs/process.md for more on how version tagging works. | |||
|
|||
3.1.42 (in development) | |||
----------------------- | |||
- Bump the default minimum Node version from 10.19 to 16.0. To target the |
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 minimum Node version was bumped
Also can you add the word "default" to the PR title?
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.
Done, but isn't "was bumped" passive voice, which is generally frowned upon in English? I guess just "bump" as in the old text isn't even grammatical...
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.
"Bump the default minimum Node version" sounds correct grammatically but that sounds like that text I would write for the PR itself. i.e. its in the present tense, imperative mood. e.d. "Rename foo", "Delete X"
For the changelog entry I normally write in the past tense think. e.g. "foo was renamed", "x was deleted". So I would expect "was bumped" here... but I could be wrong. Reading the rest of the changelog it seems to be mostly be in the past. Should we swith to using the same tense/mood for PR and for the changelog?
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.
I'm not sure. Let's go with your intuition here (changelog in the past, PRs in the present).
A code size test improved here. While improving it I also made it work with |
The code size improvement is due to this diff: 64,69d63
< var nodeMajor = process.versions.node.split(".")[0];
< if (nodeMajor < 15) {
< process.on("unhandledRejection", reason => {
< throw reason;
< });
< } |
15.x -> 16.x in the PR description. |
And #1232 is the emsdk PR that made it possible |
…self.emcc_args which are populated with the node flags
This also required a test fix, to make a test use |
lgtm! Once this landed we should do a release I think. |
Ok, I think this is ready to land. We've collected feedback both here and on the mailing list and there were no concerns, aside from actually suggesting to go to 16 and not just 15, as we then agreed. |
This version of node supports wasm-bigint by default, so it will help #19156
This is about 2 years old, and the node website already provides newer versions
both for latest and for LTS. However, other places are behind, for example the
latest Ubuntu LTS (22) has Node 12, so perhaps we should wait on this.
This is possible after emscripten-core/emsdk#829 made
the emsdk install a 15.x version by default, and then
emscripten-core/emsdk#1232 switched to 16.