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

[feature] Upgrade to Node.js 20(LTS) #1173

Closed
DreamOfIce opened this issue Jan 20, 2023 · 16 comments · Fixed by #1387
Closed

[feature] Upgrade to Node.js 20(LTS) #1173

DreamOfIce opened this issue Jan 20, 2023 · 16 comments · Fixed by #1387

Comments

@DreamOfIce
Copy link
Contributor

DreamOfIce commented Jan 20, 2023

As written in https://github.com/nodejs/release#release-schedule, support for node.js 16 was end in September 2023.
Therefore, it is recommended to upgrade to node.js 20.
Also, many of the features in node.js 20 are enabled by default, such as --experimental-wasm-threads and --experimental-wasm-bulk-memory.

@sbc100
Copy link
Collaborator

sbc100 commented Jan 20, 2023

We are looking into this right now. See #829 for more discussion.

One current blocker is that out CI builders currently run on ubuntu/bionic and node 18 decided to drop support for the version of glibc that is included with ubuntu/bionic. I think we will likely have to follow suite and drop support for bionic and update our builders.

@sbc100 sbc100 transferred this issue from emscripten-core/emscripten Jan 20, 2023
@sbc100
Copy link
Collaborator

sbc100 commented Jan 20, 2023

Moved to emsdk since its the emsdk version of node we are talking about upgrading (emscripten itself already supports newer versions).

@DreamOfIce
Copy link
Contributor Author

DreamOfIce commented Jan 28, 2023

We are looking into this right now. See #829 for more discussion.

One current blocker is that out CI builders currently run on ubuntu/bionic and node 18 decided to drop support for the version of glibc that is included with ubuntu/bionic. I think we will likely have to follow suite and drop support for bionic and update our builders.

Are there any impediments to updating ci's version of Ubuntu? After all, the five-year free support period for Ubuntu 18 is almost up

@sbc100
Copy link
Collaborator

sbc100 commented Jan 28, 2023

Yes, there were impediments. We don't have direct control over the VM. But I think we have now overcome those.

BTW, according to https://wiki.ubuntu.com/Releases ubunut/bionic 18.04 LTS is supported until April 2028.

The issue of what version of node we use internally in emsdk should really be an implementation detail though. I think the real issue is that we are putting our internal version of node in the emsdk user's path, and we should focus on fixing that. Even if/when we update to node v18 that will also be wrong version for many users who have already installed their own.

@DreamOfIce
Copy link
Contributor Author

DreamOfIce commented Jan 28, 2023

I agree with this, forcing the specified version of node into path is a very bad idea. We should at least provide an option to use the system node.

Considering that the lifecycle of node.js14 is coming to an end, updating the bundled node version is the big trend.

BTW, the free LTS period for Ubuntu 18 will end in April and paid commercial support for the next five years

@sbc100
Copy link
Collaborator

sbc100 commented Jan 28, 2023

Considering that the lifecycle of node.js14 is coming to an end, updating the bundled node version is unavoidable, even if only for security reasons

I think unavoidable might be too strong a word there. Perhaps inadvisable.

@sbc100
Copy link
Collaborator

sbc100 commented Jan 28, 2023

Considering that the lifecycle of node.js14 is coming to an end, updating the bundled node version is unavoidable, even if only for security reasons

Emscripten's use of node is as part of the compiler toolchain and as such it does not process untrusted code. There is no protection at all against hostile user input in emscripten, regardless of node version. For example --library-js=foo.js executes foo.js with full user permissions at build time.

@DreamOfIce
Copy link
Contributor Author

Considering that the lifecycle of node.js14 is coming to an end, updating the bundled node version is unavoidable, even if only for security reasons

I think unavoidable might be too strong a word there. Perhaps inadvisable.

You're right, this is indeed a bit too absolute

@DreamOfIce
Copy link
Contributor Author

DreamOfIce commented Jan 30, 2023

Yes, there were impediments. We don't have direct control over the VM. But I think we have now overcome those.

BTW, according to https://wiki.ubuntu.com/Releases ubunut/bionic 18.04 LTS is supported until April 2028.

The issue of what version of node we use internally in emsdk should really be an implementation detail though. I think the real issue is that we are putting our internal version of node in the emsdk user's path, and we should focus on fixing that. Even if/when we update to node v18 that will also be wrong version for many users who have already installed their own.

@sbc100 After some changes, I successfully upgrade Ubuntu to 22.04LTS in .circleci/config.yml.The only change is the removal of running flake with python2 and only keeping python3, as installing both pip versions at the same time would report an error. Of course, it's easy to add python2 back if necessary.
Commit and CI status: DreamOfIce@d9f78ac

@zowers
Copy link

zowers commented Jan 19, 2024

Active LTS is 20 already, so probably 18 should be changed to 20 in issue's title

@sbc100
Copy link
Collaborator

sbc100 commented May 1, 2024

@juj, you mentioned in #1183 (comment) that you still need Ubuntu/Bionic support. Is this still true? Any idea when that might come to and end?

@DreamOfIce DreamOfIce changed the title [feature] Upgrade to Node.js 18(LTS) [feature] Upgrade to Node.js 20(LTS) May 5, 2024
aheejin added a commit to aheejin/emscripten that referenced this issue May 8, 2024
I submitted emscripten-core#21853 before landing
llvm/llvm-project#80923, so the previous version
(3.1.59) was released before the LLVM change actually landed. And then
we decided to disable reference-types temporarily
(llvm/llvm-project#90792) while the node version
is being resolved
(emscripten-core/emsdk#1173 (comment)).

This moves the entry to the current release and only mentions multivalue
is the newly enabled feature.
aheejin added a commit to emscripten-core/emscripten that referenced this issue May 8, 2024
I submitted #21853 before landing
llvm/llvm-project#80923, so the previous version
(3.1.59) was released before the LLVM change actually landed. And then
we decided to disable reference-types temporarily
(llvm/llvm-project#90792) while the node version
is being resolved
(emscripten-core/emsdk#1173 (comment)).

This moves the entry to the current release and only mentions multivalue
is the newly enabled feature.
@ab-unity
Copy link

@juj, you mentioned in #1183 (comment) that you still need Ubuntu/Bionic support. Is this still true? Any idea when that might come to and end?
Our min-spec is now Ubuntu/Jammy going forward.

@sbc100
Copy link
Collaborator

sbc100 commented May 21, 2024

@juj, you mentioned in #1183 (comment) that you still need Ubuntu/Bionic support. Is this still true? Any idea when that might come to and end?
Our min-spec is now Ubuntu/Jammy going forward.

Sorry I've not seen this account before.. is this jukka? Or someone else at unity maybe?

@ab-unity
Copy link

Sorry, I'm Anthony (Eng Manager) from Unity.

@sbc100
Copy link
Collaborator

sbc100 commented May 21, 2024

Awesome! Thats great news. I guess we are free to drop Trusty support and upgrade to node v18+ !

@juj
Copy link
Collaborator

juj commented May 22, 2024

Hey, thanks for pinging.

Currently Unity's Web CI infrastructure runs on Ubuntu 20.04 LTS Focal Fossa. That should be new enough to run Node v18.

We do no longer need Ubuntu 18.04 LTS Bionic Beaver support, so can happily drop that.

sbc100 added a commit that referenced this issue May 22, 2024
Node v18 is that current LTS release of node and v18.20.3 is the latest
release of v18.

This change means that emsdk is no longer installable on Ubuntu/Bionic
18.04, and we now require Ubuntu/Focal 20.04.

See: #1183
Fixes: #1173
sbc100 added a commit that referenced this issue May 22, 2024
Node v18 is that current LTS release of node and v18.20.3 is the latest
release of v18.

This change means that emsdk is no longer installable on Ubuntu/Bionic
18.04, and we now require Ubuntu/Focal 20.04.

See: #1183
Fixes: #1173
sbc100 added a commit that referenced this issue May 22, 2024
Node v18 is that current LTS release of node and v18.20.3 is the latest
release of v18.

This change means that emsdk is no longer installable on Ubuntu/Bionic
18.04, and we now require Ubuntu/Focal 20.04.

See: #1183
Fixes: #1173
sbc100 added a commit that referenced this issue May 22, 2024
Node v18 is that current LTS release of node and v18.20.3 is the latest
release of v18.

This change means that emsdk is no longer installable on Ubuntu/Bionic
18.04, and we now require Ubuntu/Focal 20.04.

See: #1183
Fixes: #1173
sbc100 added a commit that referenced this issue May 22, 2024
Node v18 is that current LTS release of node and v18.20.3 is the latest
release of v18.

This change means that emsdk is no longer installable on Ubuntu/Bionic
18.04, and we now require Ubuntu/Focal 20.04.

See: #1183
Fixes: #1173
sbc100 added a commit that referenced this issue May 28, 2024
On one hand Ubuntu18's free LTS cycle is ended, and on the other hand Ubuntu18 does not support nodejs greater than v18.
1. update the Linux Docker image to buildpack-deps:focal
2. some compatibility changes
3. use the new recommended way to install Docker ([see here](https://docs.docker.com/engine/install/ubuntu/))

See #1173
sbc100 added a commit that referenced this issue May 28, 2024
On one hand Ubuntu18's free LTS cycle is ended, and on the other hand Ubuntu18 does not support nodejs greater than v18.
1. update the Linux Docker image to buildpack-deps:focal
2. some compatibility changes
3. use the new recommended way to install Docker ([see here](https://docs.docker.com/engine/install/ubuntu/))

See #1173
sbc100 added a commit that referenced this issue May 28, 2024
On one hand Ubuntu18's free LTS cycle is ended, and on the other hand Ubuntu18 does not support nodejs greater than v18.
1. update the Linux Docker image to buildpack-deps:focal
2. some compatibility changes
3. use the new recommended way to install Docker ([see here](https://docs.docker.com/engine/install/ubuntu/))

See #1173
sbc100 pushed a commit that referenced this issue May 28, 2024
# Why
On one hand Ubuntu18's free LTS cycle is ended, and on the other hand Ubuntu18 does not support nodejs greater than v18.
# What's changed.
1. update the Linux Docker image to buildpack-deps:focal
2. some compatibility changes
3. use the new recommended way to install Docker ([see here](https://docs.docker.com/engine/install/ubuntu/))

See #1173
sbc100 added a commit that referenced this issue May 28, 2024
Node v18 is that current LTS release of node and v18.20.3 is the latest
release of v18.

This change means that emsdk is no longer installable on Ubuntu/Bionic
18.04, and we now require Ubuntu/Focal 20.04.

See: #1183
Fixes: #1173
sbc100 added a commit to sbc100/emscripten that referenced this issue May 28, 2024
sbc100 added a commit that referenced this issue May 28, 2024
Node v18 is that current LTS release of node and v18.20.3 is the latest
release of v18.

This change means that emsdk is no longer installable on Ubuntu/Bionic
18.04, and we now require Ubuntu/Focal 20.04.

See: #1183
Fixes: #1173
sbc100 added a commit to sbc100/emscripten that referenced this issue May 28, 2024
sbc100 added a commit to sbc100/emscripten that referenced this issue May 28, 2024
sbc100 added a commit to sbc100/emscripten that referenced this issue May 28, 2024
sbc100 added a commit to sbc100/emscripten that referenced this issue May 28, 2024
sbc100 added a commit to sbc100/emscripten that referenced this issue May 28, 2024
sbc100 added a commit to sbc100/emscripten that referenced this issue May 29, 2024
sbc100 added a commit to sbc100/emscripten that referenced this issue May 29, 2024
sbc100 added a commit to emscripten-core/emscripten that referenced this issue May 29, 2024
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 a pull request may close this issue.

5 participants