From 2974e22e9ddfcf6841fdf3a01c9720663ba7896e Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Thu, 30 May 2024 13:05:58 -0700 Subject: [PATCH] Revert "Bump min node version to 18.20.3 (#22010)" This reverts commit 27b30507ffd4141b57a6bf564280b78960ff617b. This is a temporary workaround for #22022 --- .circleci/config.yml | 10 +++++----- requirements-dev.txt | 1 - .../source/docs/tools_reference/settings_reference.rst | 7 +++---- src/parseTools.mjs | 4 ++-- src/settings.js | 7 +++---- test/other/metadce/test_metadce_hello_O0.gzsize | 2 +- test/other/metadce/test_metadce_hello_O0.jssize | 2 +- test/other/metadce/test_metadce_minimal_O0.gzsize | 2 +- test/other/metadce/test_metadce_minimal_O0.jssize | 2 +- test/other/test_unoptimized_code_size.js.size | 2 +- test/other/test_unoptimized_code_size_strict.js.size | 2 +- test/test_sanity.py | 4 ++-- tools/shared.py | 2 +- 13 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 94df4f91c9e3..0f567d42ae0a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,13 +6,13 @@ orbs: executors: linux-node: docker: - - image: cimg/node:18.20.3 + - image: circleci/node:stretch linux-python: docker: - image: cimg/python:3.10.7 bionic: docker: - - image: emscripten/emscripten-ci:focal + - image: emscripten/emscripten-ci environment: LANG: "C.UTF-8" EMCC_CORES: "4" @@ -41,7 +41,7 @@ commands: name: download chrome command: | # TODO: Make these part of the base image - apt-get install -q -y libu2f-udev libvulkan1 xdg-utils + apt-get install libu2f-udev libvulkan1 # wget -O ~/chrome.deb https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb # If that download link breaks, temporarily use this URL instead: # wget -O ~/chrome.deb https://storage.googleapis.com/webassembly/chrome/google-chrome-stable_current_amd64.deb @@ -170,7 +170,7 @@ commands: command: | ./emcc --clear-cache - pip-install - - run: apt-get install -q -y ninja-build + - run: apt-get install ninja-build - run: name: embuilder build ALL command: | @@ -791,7 +791,7 @@ jobs: environment: EMTEST_SKIP_NODE_CANARY: "1" steps: - - run: apt-get install -q -y ninja-build scons + - run: apt-get install ninja-build scons - run-tests-linux: # some native-dependent tests fail because of the lack of native # headers on emsdk-bundled clang diff --git a/requirements-dev.txt b/requirements-dev.txt index 267dee10ff07..2990b59cd405 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -25,7 +25,6 @@ sphinxcontrib-htmlhelp<=2.0.0 sphinxcontrib-serializinghtml<=1.1.5 sphinxcontrib-qthelp<=1.0.3 alabaster<=0.7.12 -pygments==2.17.2 # See https://github.com/readthedocs/readthedocs.org/issues/9038 jinja2<3.1 diff --git a/site/source/docs/tools_reference/settings_reference.rst b/site/source/docs/tools_reference/settings_reference.rst index 2937143a775e..585ce6cdce56 100644 --- a/site/source/docs/tools_reference/settings_reference.rst +++ b/site/source/docs/tools_reference/settings_reference.rst @@ -2933,12 +2933,11 @@ MIN_NODE_VERSION Specifies minimum node version to target for the generated code. This is distinct from the minimum version required run the emscripten compiler. -This version aligns with the current Node LTS release, and the version -of node that is included with emsdk. -Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.1. +This version aligns with the current Ubuuntu TLS 20.04 (Focal). +Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.01. Minimum supported value is 101900, which was released 2020-02-05. -Default value: 182003 +Default value: 160000 .. _support_errno: diff --git a/src/parseTools.mjs b/src/parseTools.mjs index 1026d02a4b97..a22dd55a350a 100644 --- a/src/parseTools.mjs +++ b/src/parseTools.mjs @@ -1059,8 +1059,8 @@ function getEntryFunction() { } function formattedMinNodeVersion() { - var major = (MIN_NODE_VERSION / 10000) | 0; - var minor = ((MIN_NODE_VERSION / 100) | 0) % 100; + var major = MIN_NODE_VERSION / 10000; + var minor = (MIN_NODE_VERSION / 100) % 100; var rev = MIN_NODE_VERSION % 100; return `v${major}.${minor}.${rev}`; } diff --git a/src/settings.js b/src/settings.js index 256c9cbfb4df..c382fca69c91 100644 --- a/src/settings.js +++ b/src/settings.js @@ -1905,11 +1905,10 @@ var MIN_CHROME_VERSION = 85; // Specifies minimum node version to target for the generated code. This is // distinct from the minimum version required run the emscripten compiler. -// This version aligns with the current Node LTS release, and the version -// of node that is included with emsdk. -// Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.1. +// This version aligns with the current Ubuuntu TLS 20.04 (Focal). +// Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.01. // Minimum supported value is 101900, which was released 2020-02-05. -var MIN_NODE_VERSION = 182003; +var MIN_NODE_VERSION = 160000; // Whether we support setting errno from JS library code. // In MINIMAL_RUNTIME builds, this option defaults to 0. diff --git a/test/other/metadce/test_metadce_hello_O0.gzsize b/test/other/metadce/test_metadce_hello_O0.gzsize index 66874b10ddb9..65323cac6caa 100644 --- a/test/other/metadce/test_metadce_hello_O0.gzsize +++ b/test/other/metadce/test_metadce_hello_O0.gzsize @@ -1 +1 @@ -8140 +8137 diff --git a/test/other/metadce/test_metadce_hello_O0.jssize b/test/other/metadce/test_metadce_hello_O0.jssize index 2b5dc2650eae..c7aa13c96919 100644 --- a/test/other/metadce/test_metadce_hello_O0.jssize +++ b/test/other/metadce/test_metadce_hello_O0.jssize @@ -1 +1 @@ -22014 +22013 diff --git a/test/other/metadce/test_metadce_minimal_O0.gzsize b/test/other/metadce/test_metadce_minimal_O0.gzsize index 6e382e26ac11..1d5f5f6f9544 100644 --- a/test/other/metadce/test_metadce_minimal_O0.gzsize +++ b/test/other/metadce/test_metadce_minimal_O0.gzsize @@ -1 +1 @@ -6725 +6721 diff --git a/test/other/metadce/test_metadce_minimal_O0.jssize b/test/other/metadce/test_metadce_minimal_O0.jssize index be4147bfde0f..6be92a82ed88 100644 --- a/test/other/metadce/test_metadce_minimal_O0.jssize +++ b/test/other/metadce/test_metadce_minimal_O0.jssize @@ -1 +1 @@ -18122 +18121 diff --git a/test/other/test_unoptimized_code_size.js.size b/test/other/test_unoptimized_code_size.js.size index 412ee091bc61..d004c80d94ac 100644 --- a/test/other/test_unoptimized_code_size.js.size +++ b/test/other/test_unoptimized_code_size.js.size @@ -1 +1 @@ -55521 +55520 diff --git a/test/other/test_unoptimized_code_size_strict.js.size b/test/other/test_unoptimized_code_size_strict.js.size index 6cd6bff413f6..b835a1889058 100644 --- a/test/other/test_unoptimized_code_size_strict.js.size +++ b/test/other/test_unoptimized_code_size_strict.js.size @@ -1 +1 @@ -54384 +54383 diff --git a/test/test_sanity.py b/test/test_sanity.py index dcbabb5d0b47..e1de89dd1271 100644 --- a/test/test_sanity.py +++ b/test/test_sanity.py @@ -284,8 +284,8 @@ def test_node(self): for version, succeed in [('v0.8.0', False), ('v4.1.0', False), ('v10.18.0', False), - ('v19.20.3', True), - ('v19.20.4-pre', True), + ('v16.20.0', True), + ('v16.20.1-pre', True), ('cheez', False)]: print(version, succeed) delete_file(SANITY_FILE) diff --git a/tools/shared.py b/tools/shared.py index 9f8f834247ae..9eee4a374b8f 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -58,7 +58,7 @@ # (settings.MIN_NODE_VERSION). # This version currently matches the node version that we ship with emsdk # which means that we can say for sure that this version is well supported. -MINIMUM_NODE_VERSION = (18, 20, 3) +MINIMUM_NODE_VERSION = (16, 20, 0) EXPECTED_LLVM_VERSION = 19 # These get set by setup_temp_dirs