Skip to content

Commit

Permalink
chore: update to electron 29 (#209818)
Browse files Browse the repository at this point in the history
* chore: update [email protected]

* chore: update typings to 20.x

* chore: bump [email protected]

* ci: fix crash in compiling extensions-ci

* chore: disable .d.ts check for build/

$ ../node_modules/.bin/tsc -p tsconfig.build.json
node_modules/@types/chokidar/index.d.ts:21:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/@types/chokidar/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

21 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
                ~~~~~~~~~

node_modules/chokidar/types/index.d.ts:8:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/chokidar/types/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

8 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
               ~~~~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  node_modules/@types/chokidar/index.d.ts:21
     1  node_modules/chokidar/types/index.d.ts:8

Refs paulmillr/chokidar@a0f9e09

* chore: update core types

* temp: fix layer validation

* chore: update nodejs checksums

* ci: use latest v20 LTS for missing node-gyp

Refs npm/cli@eacec5f

* ci: define LIBCPP_HARDENING_MODE

* ci: fix crash in vscode-web-min-ci

* chore: update rpm deps-list

* chore: bump [email protected]

* chore: bump [email protected]

* chore: bump [email protected]

* chore: update rpm deps-list for x86_64

* ci: disable io_uring UV backend on linux

* ci: disable io_uring backend for oss as well

* chore: update typings to 20.x

* ci: add TODO for io_uring workaround

* chore: bump distro

* chore: update preinstall node version checks

* chore: update @types/gulp

Refs #212442

* ci: disable io_uring in more test suites
  • Loading branch information
deepak1556 authored May 10, 2024
1 parent c5e287e commit 5216c04
Show file tree
Hide file tree
Showing 101 changed files with 797 additions and 361 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.0
20.12.1
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "18.x"
"@types/node": "20.x"
},
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.25",
Expand Down
8 changes: 4 additions & 4 deletions .vscode/extensions/vscode-selfhost-test-provider/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b"
integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==

"@types/node@18.x":
version "18.19.26"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.26.tgz#18991279d0a0e53675285e8cf4a0823766349729"
integrity sha512-+wiMJsIwLOYCvUqSdKTrfkS8mpTp+MPINe6+Np4TAGFWWRWiBQ5kSq9nZGCSPkzx9mvT+uEukzpX4MOSCydcvw==
"@types/node@20.x":
version "20.12.11"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.11.tgz#c4ef00d3507000d17690643278a60dc55a9dc9be"
integrity sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==
dependencies:
undici-types "~5.26.4"

Expand Down
4 changes: 2 additions & 2 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
disturl "https://electronjs.org/headers"
target "28.2.8"
ms_build_id "27744544"
target "29.3.1"
ms_build_id "9464424"
runtime "electron"
build_from_source "true"
3 changes: 1 addition & 2 deletions build/azure-pipelines/darwin/product-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ steps:

- script: |
set -e
export npm_config_arch=$(VSCODE_ARCH)
npm i -g [email protected]
python3 -m pip install setuptools
for i in {1..5}; do # try 5 times
Expand All @@ -91,6 +89,7 @@ steps:
echo "Yarn failed $i, trying again..."
done
env:
npm_config_arch: $(VSCODE_ARCH)
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
Expand Down
36 changes: 36 additions & 0 deletions build/azure-pipelines/linux/product-build-linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ steps:
- script: ./scripts/test-integration.sh --tfs "Integration Tests"
env:
DISPLAY: ":10"
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Electron)
timeoutInMinutes: 20

Expand All @@ -100,6 +103,10 @@ steps:
timeoutInMinutes: 20

- script: ./scripts/test-remote-integration.sh
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Remote)
timeoutInMinutes: 20

Expand All @@ -116,6 +123,9 @@ steps:
./scripts/test-integration.sh --build --tfs "Integration Tests"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Electron)
timeoutInMinutes: 20
Expand All @@ -134,6 +144,9 @@ steps:
./scripts/test-remote-integration.sh
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Remote)
timeoutInMinutes: 20
Expand All @@ -160,24 +173,43 @@ steps:

- script: yarn smoketest-no-compile --tracing
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Electron)

- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Browser, Chromium)

- script: yarn smoketest-no-compile --remote --tracing
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Remote)

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: yarn smoketest-no-compile --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Electron)

- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
timeoutInMinutes: 20
displayName: Run smoke tests (Browser, Chromium)

Expand All @@ -188,6 +220,10 @@ steps:
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Remote)
- script: |
Expand Down
10 changes: 5 additions & 5 deletions build/azure-pipelines/linux/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SYSROOT_ARCH="$SYSROOT_ARCH" node -e '(async () => { const { getVSCodeSysroot }
if [ "$npm_config_arch" == "x64" ]; then
if [ "$(echo "$@" | grep -c -- "--only-remote")" -eq 0 ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/120.0.6099.268/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
curl -s https://raw.githubusercontent.com/chromium/chromium/122.0.6261.156/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux

# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
Expand All @@ -25,12 +25,12 @@ if [ "$npm_config_arch" == "x64" ]; then

# Set compiler toolchain
# Flags for the client build are based on
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/120.0.6099.268:build/config/arm.gni
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/120.0.6099.268:build/config/compiler/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/120.0.6099.268:build/config/c++/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/122.0.6261.156:build/config/arm.gni
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/122.0.6261.156:build/config/compiler/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/122.0.6261.156:build/config/c++/BUILD.gn
export CC="$PWD/.build/CR_Clang/bin/clang --gcc-toolchain=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu"
export CXX="$PWD/.build/CR_Clang/bin/clang++ --gcc-toolchain=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu"
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -I$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit -D_LIBCPP_ABI_NAMESPACE=Cr --sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot"
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -I$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit -D_LIBCPP_ABI_NAMESPACE=Cr -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE --sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot"
export LDFLAGS="-stdlib=libc++ --sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot -fuse-ld=lld -flto=thin -L$PWD/.build/libcxx-objects -lc++abi -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/usr/lib/x86_64-linux-gnu -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/lib/x86_64-linux-gnu -Wl,--lto-O0"

# Set compiler toolchain for remote server
Expand Down
2 changes: 2 additions & 0 deletions build/azure-pipelines/product-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,13 @@ steps:
- script: yarn npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
DISABLE_V8_COMPILE_CACHE: 1 # Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
displayName: Compile & Hygiene (OSS)
- ${{ else }}:
- script: yarn npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
DISABLE_V8_COMPILE_CACHE: 1 # Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
displayName: Compile & Hygiene (non-OSS)

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
Expand Down
1 change: 1 addition & 0 deletions build/azure-pipelines/web/product-build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ steps:
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-web
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
env:
DISABLE_V8_COMPILE_CACHE: 1 # Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build
Expand Down
10 changes: 2 additions & 8 deletions build/azure-pipelines/win32/product-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,10 @@ steps:
. build/azure-pipelines/win32/exec.ps1
. build/azure-pipelines/win32/retry.ps1
$ErrorActionPreference = "Stop"
# TODO: remove custom node-gyp when updating to Node v20,
# refs https://github.com/npm/cli/releases/tag/v10.2.3 which is available with Node >= 20.10.0
$nodeGypDir = "$(Agent.TempDirectory)/custom-packages"
mkdir "$nodeGypDir"
npm install [email protected] -g --prefix "$nodeGypDir"
$env:npm_config_node_gyp = "${nodeGypDir}/node_modules/node-gyp/bin/node-gyp.js"
$env:npm_config_arch = "$(VSCODE_ARCH)"
$env:CHILD_CONCURRENCY="1"
retry { exec { yarn --frozen-lockfile --check-files } }
env:
npm_config_arch: $(VSCODE_ARCH)
CHILD_CONCURRENCY: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
Expand Down
Loading

0 comments on commit 5216c04

Please sign in to comment.