Skip to content

Commit

Permalink
Revert "chore: update to electron 16 (#137241)"
Browse files Browse the repository at this point in the history
This reverts commit 01df559.
This reverts commit 4630133
  • Loading branch information
deepak1556 committed Feb 24, 2022
1 parent 6cde4b0 commit bc6cd21
Show file tree
Hide file tree
Showing 123 changed files with 615 additions and 557 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

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

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

- 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 }}-cacheNodeModules19-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules19-
key: ${{ runner.os }}-cacheNodeModules20-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules20-
- 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: 16
node-version: 14

- 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 }}-cacheNodeModules19-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules19-
key: ${{ runner.os }}-cacheNodeModules20-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules20-
- 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: 16
node-version: 14

- 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 }}-cacheNodeModules19-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules19-
key: ${{ runner.os }}-cacheNodeModules20-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules20-
- 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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

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

- name: Install dependencies
if: steps.caching-stage.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
disturl "https://electronjs.org/headers"
target "16.0.9"
target "13.5.2"
runtime "electron"
build_from_source "true"
2 changes: 1 addition & 1 deletion build/.cachesalt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-02-10T01:18:08.504Z
2022-02-24T13:55:48.169Z
2 changes: 1 addition & 1 deletion build/azure-pipelines/darwin/product-build-darwin-sign.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.x"

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

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/exploration-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pr: none
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
12 changes: 6 additions & 6 deletions build/azure-pipelines/linux/product-build-linux-client.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down Expand Up @@ -99,7 +99,7 @@ steps:
if [ -z "$CC" ] || [ -z "$CXX" ]; then
# 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
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 \
Expand All @@ -109,12 +109,12 @@ steps:
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
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/91.0.4472.164:build/config/arm.gni
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/91.0.4472.164:build/config/compiler/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/91.0.4472.164: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 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 -L$PWD/.build/libcxx-objects -lc++abi -Wl,--lto-O0"
export VSCODE_REMOTE_CC=$(which gcc)
export VSCODE_REMOTE_CXX=$(which g++)
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/linux/product-build-linux-server.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.x"

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

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

- task: AzureCLI@2
inputs:
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/publish-types/publish-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pool:
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.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
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ stages:
outputFormat: "pre"
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.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: "16.x"
versionSpec: "14.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/96.0.4664.110/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
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 \
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__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 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 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.9)
export VSCODE_REMOTE_CXX=$(which g++-4.9)
export VSCODE_REMOTE_CC=$(which gcc-4.8)
export VSCODE_REMOTE_CXX=$(which g++-4.8)
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
versionSpec: "14.x"

- task: UsePythonVersion@0
inputs:
Expand Down
34 changes: 5 additions & 29 deletions build/lib/layersChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,6 @@ 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 @@ -104,18 +89,19 @@ const RULES = [
// Common: vs/platform/environment/common/*
{
target: '**/vs/platform/environment/common/*.ts',
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
]
},
// Common: vs/platform/window/common/window.ts
{
target: '**/vs/platform/window/common/window.ts',
target: '**/vs/platform/windows/common/windows.ts',
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
Expand All @@ -124,8 +110,8 @@ const RULES = [
// Common: vs/platform/native/common/native.ts
{
target: '**/vs/platform/native/common/native.ts',
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
Expand Down Expand Up @@ -160,9 +146,6 @@ 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 @@ -246,20 +229,13 @@ function checkFile(program, sourceFile, rule) {
if (symbol) {
const declarations = symbol.declarations;
if (Array.isArray(declarations)) {
DeclarationLoop: for (const declaration of declarations) {
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
Loading

0 comments on commit bc6cd21

Please sign in to comment.