Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 (#8911)

* Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2

* update distro

* fix layering

* update distro

* fix tests
This commit is contained in:
Anthony Dresser
2020-01-22 13:42:37 -08:00
committed by GitHub
parent 977111eb21
commit bd7aac8ee0
895 changed files with 24651 additions and 14520 deletions

View File

@@ -34,6 +34,6 @@ export function parseExtensionDevOptions(environmentService: IEnvironmentService
isExtensionDevHost,
isExtensionDevDebug,
isExtensionDevDebugBrk,
isExtensionDevTestFromCli,
isExtensionDevTestFromCli
};
}

View File

@@ -199,7 +199,7 @@ export class ExtensionHostProcessWorker implements IExtensionHostStarter {
onDebouncedOutput(output => {
const inspectorUrlMatch = output.data && output.data.match(/ws:\/\/([^\s]+:(\d+)\/[^\s]+)/);
if (inspectorUrlMatch) {
if (!this._environmentService.isBuilt) {
if (!this._environmentService.isBuilt && !this._isExtensionDevTestFromCli) {
console.log(`%c[Extension Host] %cdebugger inspector at chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=${inspectorUrlMatch[1]}`, 'color: blue', 'color:');
}
if (!this._inspectPort) {
@@ -207,9 +207,11 @@ export class ExtensionHostProcessWorker implements IExtensionHostStarter {
this._onDidSetInspectPort.fire();
}
} else {
console.group('Extension Host');
console.log(output.data, ...output.format);
console.groupEnd();
if (!this._isExtensionDevTestFromCli) {
console.group('Extension Host');
console.log(output.data, ...output.format);
console.groupEnd();
}
}
});
@@ -292,22 +294,22 @@ export class ExtensionHostProcessWorker implements IExtensionHostStarter {
const expected = this._environmentService.debugExtensionHost.port;
const port = await findFreePort(expected, 10 /* try 10 ports */, 5000 /* try up to 5 seconds */);
if (!port) {
console.warn('%c[Extension Host] %cCould not find a free port for debugging', 'color: blue', 'color:');
return 0;
if (!this._isExtensionDevTestFromCli) {
if (!port) {
console.warn('%c[Extension Host] %cCould not find a free port for debugging', 'color: blue', 'color:');
} else {
if (port !== expected) {
console.warn(`%c[Extension Host] %cProvided debugging port ${expected} is not free, using ${port} instead.`, 'color: blue', 'color:');
}
if (this._isExtensionDevDebugBrk) {
console.warn(`%c[Extension Host] %cSTOPPED on first line for debugging on port ${port}`, 'color: blue', 'color:');
} else {
console.info(`%c[Extension Host] %cdebugger listening on port ${port}`, 'color: blue', 'color:');
}
}
}
if (port !== expected) {
console.warn(`%c[Extension Host] %cProvided debugging port ${expected} is not free, using ${port} instead.`, 'color: blue', 'color:');
}
if (this._isExtensionDevDebugBrk) {
console.warn(`%c[Extension Host] %cSTOPPED on first line for debugging on port ${port}`, 'color: blue', 'color:');
} else {
console.info(`%c[Extension Host] %cdebugger listening on port ${port}`, 'color: blue', 'color:');
}
return port;
return port || 0;
}
private _tryExtHostHandshake(): Promise<PersistentProtocol> {

View File

@@ -478,7 +478,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
// set the resolved authority
this._remoteAuthorityResolverService.setResolvedAuthority(resolvedAuthority.authority, resolvedAuthority.options);
this._remoteExplorerService.addEnvironmentTunnels(resolvedAuthority.tunnelInformation?.environmentTunnels);
this._remoteExplorerService.setTunnelInformation(resolvedAuthority.tunnelInformation);
// monitor for breakage
const connection = this._remoteAgentService.getConnection();

View File

@@ -190,6 +190,7 @@ suite('RPCProtocol', () => {
test('issue #72798: null errors are hard to digest', function (done) {
delegate = (a1: number, a2: number) => {
// eslint-disable-next-line no-throw-literal
throw { 'what': 'what' };
};
bProxy.$m(4, 1).then((res) => {

View File

@@ -22,9 +22,11 @@ import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiatio
import { ILogService } from 'vs/platform/log/common/log';
import { ExtHostLogService } from 'vs/workbench/api/worker/extHostLogService';
import { IExtHostTunnelService, ExtHostTunnelService } from 'vs/workbench/api/common/extHostTunnelService';
import { IExtHostApiDeprecationService, ExtHostApiDeprecationService, } from 'vs/workbench/api/common/extHostApiDeprecationService';
// register singleton services
registerSingleton(ILogService, ExtHostLogService);
registerSingleton(IExtHostApiDeprecationService, ExtHostApiDeprecationService);
registerSingleton(IExtHostOutputService, ExtHostOutputService);
registerSingleton(IExtHostWorkspace, ExtHostWorkspace);
registerSingleton(IExtHostDecorations, ExtHostDecorations);