Skip to content

Commit

Permalink
chore: update to electron 16 (#137241)
Browse files Browse the repository at this point in the history
* chore: bump electron@15.3.0

* chore: bump node@16.x

* chore: enable render process reuse

* Revert "watcher - use `type` property for crash reporter location"

This reverts commit bfa488d.

* Revert "watcher - enable crash reports on linux (#136264)"

This reverts commit af26148.

* chore: enable crashpad on linux

* chore: bump electron@15.3.1

* chore: update api changes

* chore: bump @vscode/sqlite3@5.0.3

* spec: skip non-context aware module unittests

* chore: fix perf hook integration with node environment

* fix: adopt fs api changes

* chore: fix integration tests

* chore: bump electron@15.3.2

* chore: bump electron@16.0.0

* temp(macOS): kill test instances in OSS

* Revert "temp(macOS): kill test instances in OSS"

This reverts commit b0d796c.

* chore: update chromium version for clang downloader

* some 💄 changes

* align with changes

* adopt more fs.rm

* 💄

* chore: bump @vscode/sqlite3@5.0.4

* fix layers check to account for duplicated types from node.js

* update todo for type casts

* smoke - fix compile issue

* chore: update module cache

* watcher - fix unhandled rejection (fix #137416)

* ci: update node version

* enable stack dumping

* update electron types to 16.x

* chore: bump @vscode/sqlite3@5.0.5

Refs #137496

* fix layer issue

* add `AbortSignal` to core types

* chore: update linux compile flags

Refs electron/electron@797723e

* ci: fix linux build

* ci: update github ci cache

* ci: fix remote build in github ci

* ci: better fix for remote build

* chore: bump azure cache

* chore: fix merge conflict

* :chore: update to electron@16.0.2

* chore: bump @vscode/sqlite3@5.0.7

* ci: update to gcc-4.9 for remote

Refs #137659

* ci: switch to buster for linux arm

Refs #137927

* ci: fix build on linux arm64

* ci: fix arm client compiler toolchain

Refs #137927

* chore: bump electron@16.0.3

* ci: fix compile flags for the c toolchain

* chore: bump electron@16.0.4

* Add experimental dark mode flag (#139109)

* Add experimental dark mode flag

* Apply PR feedback

* chore: bump electron@16.0.6

* chore: bump electron@16.0.7

Fixes #138792
Fixes #139300

* chore: experimental highlight API

* smoke - fix compile issue

* FIXME: custom ELECTRON_RUN_AS_NODE with node worker

* Revert "chore: bump electron@16.0.7"

This reverts commit 5fd01cf.

* Revert "Revert "chore: bump electron@16.0.7""

This reverts commit a7f1b73.

* chore: fix github linux workflow

* chore: address review feedback

* chore: bump electron@16.0.8

* ci: revert to stretch distro for linux arm

Refs #137927

* ci: force build

* chore: update yarn.lock

* address feedback

* Revert "FIXME: custom ELECTRON_RUN_AS_NODE with node worker"

This reverts commit 7b48fa3.

* ci: fix remote folder build

* chore: fix github linux ci

* 🆙 `versionSpec`

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
Co-authored-by: Raymond Zhao <raymondzhao@microsoft.com>
  • Loading branch information
3 people committed Feb 8, 2022
1 parent 47b5413 commit 01df559
Show file tree
Hide file tree
Showing 121 changed files with 473 additions and 539 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16

- uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16

- name: Compute node modules cache key
id: nodeModulesCacheKey
Expand All @@ -123,8 +123,8 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules14-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules14-
key: ${{ runner.os }}-cacheNodeModules19-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules19-
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16

- name: Compute node modules cache key
id: nodeModulesCacheKey
Expand All @@ -195,8 +195,8 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules14-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules14-
key: ${{ runner.os }}-cacheNodeModules19-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules19-
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16

- name: Compute node modules cache key
id: nodeModulesCacheKey
Expand All @@ -269,8 +269,8 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules14-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules14-
key: ${{ runner.os }}-cacheNodeModules19-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules19-
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rich-navigation.yml
Expand Up @@ -24,7 +24,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16

- name: Install dependencies
if: steps.caching-stage.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc
@@ -1,4 +1,4 @@
disturl "https://electronjs.org/headers"
target "13.5.2"
target "16.0.8"
runtime "electron"
build_from_source "true"
2 changes: 1 addition & 1 deletion build/.cachesalt
@@ -1 +1 @@
2021-11-24T12:04:58.681Z
2022-02-03T12:38:01.545Z
2 changes: 1 addition & 1 deletion build/azure-pipelines/darwin/product-build-darwin-sign.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/darwin/product-build-darwin.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/distro-build.yml
Expand Up @@ -11,7 +11,7 @@ pr:
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/exploration-build.yml
Expand Up @@ -7,7 +7,7 @@ pr: none
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/linux/product-build-alpine.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
51 changes: 35 additions & 16 deletions build/azure-pipelines/linux/product-build-linux-client.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down Expand Up @@ -87,21 +87,40 @@ steps:
set -e
export npm_config_arch=$(NPM_ARCH)
if [ -z "$CC" ] || [ -z "$CXX" ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/91.0.4472.164/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 \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \
VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \
VSCODE_ARCH="$(NPM_ARCH)" \
node build/linux/libcxx-fetcher.js
# Set compiler toolchain
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi"
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/96.0.4664.110/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 \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \
VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \
VSCODE_ARCH="$(NPM_ARCH)" \
node build/linux/libcxx-fetcher.js
# Set compiler toolchain
# Flags for the client build are based on
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/96.0.4664.110:build/config/arm.gni
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/96.0.4664.110:build/config/compiler/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/96.0.4664.110:build/config/c++/BUILD.gn
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export CFLAGS="-nostdinc++ -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi"
if [ "$VSCODE_ARCH" == "arm64" ]; then
export CXXFLAGS="${CXXFLAGS} --target=aarch64-linux-gnu -fwhole-program-vtables"
export CFLAGS="${CFLAGS} --target=aarch64-linux-gnu -fwhole-program-vtables"
export LDFLAGS="${LDFLAGS} --target=aarch64-linux-gnu -march=arm64 -fwhole-program-vtables"
export VSCODE_REMOTE_CC=/usr/bin/aarch64-linux-gnu-gcc
export VSCODE_REMOTE_CXX=/usr/bin/aarch64-linux-gnu-g++
fi
if [ "$VSCODE_ARCH" == "armhf" ]; then
export CXXFLAGS="${CXXFLAGS} --target=arm-linux-gnueabihf -march=armv7-a -mthumb -mfloat-abi=hard -mfpu=neon -mtune=generic-armv7-a"
export CFLAGS="${CFLAGS} --target=arm-linux-gnueabihf -march=armv7-a -mthumb -mfloat-abi=hard -mfpu=neon -mtune=generic-armv7-a"
export LDFLAGS="${LDFLAGS} --target=arm-linux-gnueabihf -march=armv7-a"
export VSCODE_REMOTE_CC=/usr/bin/arm-linux-gnueabihf-gcc
export VSCODE_REMOTE_CXX=/usr/bin/arm-linux-gnueabihf-g++
fi
for i in {1..3}; do # try 3 times, for Terrapin
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/linux/product-build-linux-server.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/linux/snap-build-linux.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: DownloadPipelineArtifact@0
displayName: "Download Pipeline Artifact"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/product-compile.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/product-release.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureCLI@2
inputs:
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/publish-types/publish-types.yml
Expand Up @@ -12,7 +12,7 @@ pool:
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- bash: |
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
Expand Down
12 changes: 6 additions & 6 deletions build/azure-pipelines/sdl-scan.yml
Expand Up @@ -47,7 +47,7 @@ stages:
outputFormat: "pre"
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down Expand Up @@ -139,7 +139,7 @@ stages:
toolMajorVersion: "V2"
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down Expand Up @@ -191,7 +191,7 @@ stages:
if [ -z "$CC" ] || [ -z "$CXX" ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/91.0.4472.164/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
curl -s https://raw.githubusercontent.com/chromium/chromium/96.0.4664.110/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 \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
Expand All @@ -202,13 +202,13 @@ stages:
# Set compiler toolchain
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi"
fi
if [ "$VSCODE_ARCH" == "x64" ]; then
export VSCODE_REMOTE_CC=$(which gcc-4.8)
export VSCODE_REMOTE_CXX=$(which g++-4.8)
export VSCODE_REMOTE_CC=$(which gcc-4.9)
export VSCODE_REMOTE_CXX=$(which g++-4.9)
fi
for i in {1..3}; do # try 3 times, for Terrapin
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/web/product-build-web.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/win32/product-build-win32.yml
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"

- task: UsePythonVersion@0
inputs:
Expand Down
33 changes: 29 additions & 4 deletions build/lib/layersChecker.js
Expand Up @@ -53,6 +53,21 @@ const CORE_TYPES = [
'trimLeft',
'trimRight',
'queueMicrotask',
'Array',
'Uint8Array',
'Uint16Array',
'Uint32Array',
'Int8Array',
'Int16Array',
'Int32Array',
'Float32Array',
'Float64Array',
'Uint8ClampedArray',
'BigUint64Array',
'BigInt64Array',
'btoa',
'atob',
'AbortSignal',
'MessageChannel',
'MessagePort'
];
Expand Down Expand Up @@ -89,8 +104,8 @@ const RULES = [
// Common: vs/platform/environment/common/*
{
target: '**/vs/platform/environment/common/*.ts',
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
Expand All @@ -99,8 +114,8 @@ const RULES = [
// Common: vs/platform/windows/common/windows.ts
{
target: '**/vs/platform/windows/common/windows.ts',
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
Expand All @@ -109,8 +124,8 @@ const RULES = [
// Common: vs/platform/native/common/native.ts
{
target: '**/vs/platform/native/common/native.ts',
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
Expand Down Expand Up @@ -145,6 +160,9 @@ const RULES = [
target: '**/vs/**/browser/**',
allowedTypes: CORE_TYPES,
disallowedTypes: NATIVE_TYPES,
allowedDefinitions: [
'@types/node/stream/consumers.d.ts' // node.js started to duplicate types from lib.dom.d.ts so we have to account for that
],
disallowedDefinitions: [
'@types/node' // no node.js
]
Expand Down Expand Up @@ -228,13 +246,20 @@ function checkFile(program, sourceFile, rule) {
if (symbol) {
const declarations = symbol.declarations;
if (Array.isArray(declarations)) {
for (const declaration of declarations) {
DeclarationLoop: for (const declaration of declarations) {
if (declaration) {
const parent = declaration.parent;
if (parent) {
const parentSourceFile = parent.getSourceFile();
if (parentSourceFile) {
const definitionFileName = parentSourceFile.fileName;
if (rule.allowedDefinitions) {
for (const allowedDefinition of rule.allowedDefinitions) {
if (definitionFileName.indexOf(allowedDefinition) >= 0) {
continue DeclarationLoop;
}
}
}
if (rule.disallowedDefinitions) {
for (const disallowedDefinition of rule.disallowedDefinitions) {
if (definitionFileName.indexOf(disallowedDefinition) >= 0) {
Expand Down

0 comments on commit 01df559

Please sign in to comment.