Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8 (#14883)

* Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8

* Bump distro

* Upgrade GCC to 4.9 due to yarn install errors

* Update build image

* Fix bootstrap base url

* Bump distro

* Fix build errors

* Update source map file

* Disable checkbox for blocking migration issues (#15131)

* disable checkbox for blocking issues

* wip

* disable checkbox fixes

* fix strings

* Remove duplicate tsec command

* Default to off for tab color if settings not present

* re-skip failing tests

* Fix mocha error

* Bump sqlite version & fix notebooks search view

* Turn off esbuild warnings

* Update esbuild log level

* Fix overflowactionbar tests

* Fix ts-ignore in dropdown tests

* cleanup/fixes

* Fix hygiene

* Bundle in entire zone.js module

* Remove extra constructor param

* bump distro for web compile break

* bump distro for web compile break v2

* Undo log level change

* New distro

* Fix integration test scripts

* remove the "no yarn.lock changes" workflow

* fix scripts v2

* Update unit test scripts

* Ensure ads-kerberos2 updates in .vscodeignore

* Try fix unit tests

* Upload crash reports

* remove nogpu

* always upload crashes

* Use bash script

* Consolidate data/ext dir names

* Create in tmp directory

Co-authored-by: chlafreniere <hichise@gmail.com>
Co-authored-by: Christopher Suh <chsuh@microsoft.com>
Co-authored-by: chgagnon <chgagnon@microsoft.com>
This commit is contained in:
Karl Burtram
2021-04-27 14:01:59 -07:00
committed by GitHub
parent 7e1c0076ba
commit 867a963882
1817 changed files with 81812 additions and 50843 deletions

View File

@@ -7,17 +7,16 @@
'use strict';
const perf = require('./vs/base/common/performance');
perf.mark('code/didStartMain');
const lp = require('./vs/base/node/languagePacks');
perf.mark('main:started');
const path = require('path');
const fs = require('fs');
const os = require('os');
const bootstrap = require('./bootstrap');
const bootstrapNode = require('./bootstrap-node');
const paths = require('./paths');
/** @type {any} */
/** @type {Partial<import('./vs/platform/product/common/productService').IProductConfiguration> & { applicationName: string}} */
const product = require('../product.json');
const { app, protocol, crashReporter } = require('electron');
@@ -201,14 +200,14 @@ function startup(cachedDataDir, nlsConfig) {
process.env['VSCODE_NODE_CACHED_DATA_DIR'] = cachedDataDir || '';
// Load main in AMD
perf.mark('willLoadMainBundle');
perf.mark('code/willLoadMainBundle');
require('./bootstrap-amd').load('vs/code/electron-main/main', () => {
perf.mark('didLoadMainBundle');
perf.mark('code/didLoadMainBundle');
});
}
async function onReady() {
perf.mark('main:appReady');
perf.mark('code/mainAppReady');
try {
const [cachedDataDir, nlsConfig] = await Promise.all([nodeCachedDataDir.ensureExists(), resolveNlsConfiguration()]);
@@ -220,9 +219,7 @@ async function onReady() {
}
/**
* @typedef {{ [arg: string]: any; '--'?: string[]; _: string[]; }} NativeParsedArgs
*
* @param {NativeParsedArgs} cliArgs
* @param {import('./vs/platform/environment/common/argv').NativeParsedArgs} cliArgs
*/
function configureCommandlineSwitchesSync(cliArgs) {
const SUPPORTED_ELECTRON_SWITCHES = [
@@ -246,7 +243,11 @@ function configureCommandlineSwitchesSync(cliArgs) {
const SUPPORTED_MAIN_PROCESS_SWITCHES = [
// Persistently enable proposed api via argv.json: https://github.com/microsoft/vscode/issues/99775
'enable-proposed-api'
'enable-proposed-api',
// TODO@bpasero remove me once testing is done on `vscode-file` protocol
// (all traces of `enable-browser-code-loading` and `ENABLE_VSCODE_BROWSER_CODE_LOADING`)
'enable-browser-code-loading'
];
// Read argv config
@@ -277,12 +278,20 @@ function configureCommandlineSwitchesSync(cliArgs) {
// Append main process flags to process.argv
else if (SUPPORTED_MAIN_PROCESS_SWITCHES.indexOf(argvKey) !== -1) {
if (argvKey === 'enable-proposed-api') {
if (Array.isArray(argvValue)) {
argvValue.forEach(id => id && typeof id === 'string' && process.argv.push('--enable-proposed-api', id));
} else {
console.error(`Unexpected value for \`enable-proposed-api\` in argv.json. Expected array of extension ids.`);
}
switch (argvKey) {
case 'enable-proposed-api':
if (Array.isArray(argvValue)) {
argvValue.forEach(id => id && typeof id === 'string' && process.argv.push('--enable-proposed-api', id));
} else {
console.error(`Unexpected value for \`enable-proposed-api\` in argv.json. Expected array of extension ids.`);
}
break;
case 'enable-browser-code-loading':
if (typeof argvValue === 'string') {
process.env['ENABLE_VSCODE_BROWSER_CODE_LOADING'] = argvValue;
}
break;
}
}
});
@@ -293,6 +302,11 @@ function configureCommandlineSwitchesSync(cliArgs) {
app.commandLine.appendSwitch('js-flags', jsFlags);
}
// Support __sandbox flag
if (cliArgs.__sandbox) {
process.env['ENABLE_VSCODE_BROWSER_CODE_LOADING'] = 'bypassHeatCheck';
}
return argvConfig;
}
@@ -375,7 +389,7 @@ function getArgvConfigPath() {
}
/**
* @param {NativeParsedArgs} cliArgs
* @param {import('./vs/platform/environment/common/argv').NativeParsedArgs} cliArgs
* @returns {string | null}
*/
function getJSFlags(cliArgs) {
@@ -395,7 +409,7 @@ function getJSFlags(cliArgs) {
}
/**
* @param {NativeParsedArgs} cliArgs
* @param {import('./vs/platform/environment/common/argv').NativeParsedArgs} cliArgs
*
* @returns {string}
*/
@@ -408,7 +422,7 @@ function getUserDataPath(cliArgs) {
}
/**
* @returns {NativeParsedArgs}
* @returns {import('./vs/platform/environment/common/argv').NativeParsedArgs}
*/
function parseCLIArgs() {
const minimist = require('minimist');
@@ -457,11 +471,16 @@ function registerListeners() {
* @type {string[]}
*/
const openUrls = [];
const onOpenUrl = function (event, url) {
event.preventDefault();
const onOpenUrl =
/**
* @param {{ preventDefault: () => void; }} event
* @param {string} url
*/
function (event, url) {
event.preventDefault();
openUrls.push(url);
};
openUrls.push(url);
};
app.on('will-finish-launching', function () {
app.on('open-url', onOpenUrl);