Vscode merge (#4582)

* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
This commit is contained in:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -3,29 +3,14 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { OperatingSystem } from 'vs/base/common/platform';
import { URI } from 'vs/base/common/uri';
import { IChannel, IServerChannel } from 'vs/base/parts/ipc/node/ipc';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { IExtensionDescription } from 'vs/workbench/services/extensions/common/extensions';
import { RemoteAgentConnectionContext } from 'vs/platform/remote/node/remoteAgentConnection';
import { IRemoteAgentEnvironment, RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment';
import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
export const RemoteExtensionLogFileName = 'remoteagent';
export const IRemoteAgentService = createDecorator<IRemoteAgentService>('remoteAgentService');
export interface IRemoteAgentEnvironment {
pid: number;
appRoot: URI;
appSettingsHome: URI;
logsPath: URI;
extensionsPath: URI;
extensionHostLogsPath: URI;
globalStorageHome: URI;
extensions: IExtensionDescription[];
os: OperatingSystem;
}
export interface IRemoteAgentService {
_serviceBrand: any;
@@ -38,5 +23,5 @@ export interface IRemoteAgentConnection {
getEnvironment(): Promise<IRemoteAgentEnvironment | null>;
getChannel<T extends IChannel>(channelName: string): T;
registerChannel<T extends IServerChannel<RemoteAgentConnectionContext>>(channelName: string, channel: T);
registerChannel<T extends IServerChannel<RemoteAgentConnectionContext>>(channelName: string, channel: T): void;
}

View File

@@ -0,0 +1,34 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEnvironment';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
export interface IRemoteEnvironmentService {
_serviceBrand: any;
remoteEnvironment: Promise<IRemoteAgentEnvironment | null>;
}
export const IRemoteEnvironmentService = createDecorator<IRemoteEnvironmentService>('remoteEnvironmentService');
export class RemoteEnvironmentService implements IRemoteEnvironmentService {
_serviceBrand: any;
constructor(
@IRemoteAgentService private readonly remoteAgentService: IRemoteAgentService,
) { }
get remoteEnvironment(): Promise<IRemoteAgentEnvironment | null> {
const connection = this.remoteAgentService.getConnection();
if (connection) {
return connection.getEnvironment();
}
return Promise.resolve(null);
}
}
registerSingleton(IRemoteEnvironmentService, RemoteEnvironmentService, true);

View File

@@ -5,15 +5,24 @@
import { localize } from 'vs/nls';
import { Disposable } from 'vs/base/common/lifecycle';
import { IChannel, getDelayedChannel, IServerChannel } from 'vs/base/parts/ipc/node/ipc';
import { getDelayedChannel } from 'vs/base/parts/ipc/node/ipc';
import { Client } from 'vs/base/parts/ipc/node/ipc.net';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { connectRemoteAgentManagement, RemoteAgentConnectionContext } from 'vs/platform/remote/node/remoteAgentConnection';
import { IWindowConfiguration } from 'vs/platform/windows/common/windows';
import { connectRemoteAgentManagement } from 'vs/platform/remote/node/remoteAgentConnection';
import { IWindowService } from 'vs/platform/windows/common/windows';
import { RemoteExtensionEnvironmentChannelClient } from 'vs/workbench/services/remote/node/remoteAgentEnvironmentChannel';
import { IRemoteAgentConnection, IRemoteAgentEnvironment, IRemoteAgentService } from 'vs/workbench/services/remote/node/remoteAgentService';
import { IRemoteAgentConnection, IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { DialogChannel } from 'vs/platform/dialogs/node/dialogIpc';
import { DownloadServiceChannel } from 'vs/platform/download/node/downloadIpc';
import { LogLevelSetterChannel } from 'vs/platform/log/node/logIpc';
import { ILogService } from 'vs/platform/log/common/log';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IRemoteAgentEnvironment, RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment';
import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
export class RemoteAgentService implements IRemoteAgentService {
@@ -22,13 +31,23 @@ export class RemoteAgentService implements IRemoteAgentService {
private readonly _connection: IRemoteAgentConnection | null = null;
constructor(
window: IWindowConfiguration,
@IWindowService windowService: IWindowService,
@INotificationService notificationService: INotificationService,
@IEnvironmentService environmentService: IEnvironmentService,
@IRemoteAuthorityResolverService remoteAuthorityResolverService: IRemoteAuthorityResolverService
@IRemoteAuthorityResolverService remoteAuthorityResolverService: IRemoteAuthorityResolverService,
@ILifecycleService lifecycleService: ILifecycleService,
@ILogService logService: ILogService,
@IInstantiationService instantiationService: IInstantiationService
) {
if (window.remoteAuthority) {
this._connection = new RemoteAgentConnection(window.remoteAuthority, notificationService, environmentService, remoteAuthorityResolverService);
const { remoteAuthority } = windowService.getConfiguration();
if (remoteAuthority) {
const connection = this._connection = new RemoteAgentConnection(remoteAuthority, notificationService, environmentService, remoteAuthorityResolverService);
lifecycleService.when(LifecyclePhase.Ready).then(() => {
connection.registerChannel('dialog', instantiationService.createInstance(DialogChannel));
connection.registerChannel('download', new DownloadServiceChannel());
connection.registerChannel('loglevel', new LogLevelSetterChannel(logService));
});
}
}
@@ -83,3 +102,5 @@ class RemoteAgentConnection extends Disposable implements IRemoteAgentConnection
return this._connection;
}
}
registerSingleton(IRemoteAgentService, RemoteAgentService);

View File

@@ -3,11 +3,17 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { OperatingSystem } from 'vs/base/common/platform';
import * as platform from 'vs/base/common/platform';
import { URI, UriComponents } from 'vs/base/common/uri';
import { IChannel } from 'vs/base/parts/ipc/node/ipc';
import { IExtensionDescription } from 'vs/workbench/services/extensions/common/extensions';
import { IRemoteAgentEnvironment } from 'vs/workbench/services/remote/node/remoteAgentService';
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEnvironment';
export interface IGetEnvironmentDataArguments {
language: string;
remoteAuthority: string;
extensionDevelopmentPath: UriComponents | undefined;
}
export interface IRemoteAgentEnvironmentDTO {
pid: number;
@@ -17,8 +23,10 @@ export interface IRemoteAgentEnvironmentDTO {
extensionsPath: UriComponents;
extensionHostLogsPath: UriComponents;
globalStorageHome: UriComponents;
userHome: UriComponents;
extensions: IExtensionDescription[];
os: OperatingSystem;
os: platform.OperatingSystem;
syncExtensions: boolean;
}
export class RemoteExtensionEnvironmentChannelClient {
@@ -26,7 +34,12 @@ export class RemoteExtensionEnvironmentChannelClient {
constructor(private channel: IChannel) { }
getEnvironmentData(remoteAuthority: string, extensionDevelopmentPath?: URI): Promise<IRemoteAgentEnvironment> {
return this.channel.call<IRemoteAgentEnvironmentDTO>('getEnvironmentData', [remoteAuthority, extensionDevelopmentPath])
const args: IGetEnvironmentDataArguments = {
language: platform.language,
remoteAuthority,
extensionDevelopmentPath
};
return this.channel.call<IRemoteAgentEnvironmentDTO>('getEnvironmentData', args)
.then((data: IRemoteAgentEnvironmentDTO): IRemoteAgentEnvironment => {
return {
pid: data.pid,
@@ -36,8 +49,10 @@ export class RemoteExtensionEnvironmentChannelClient {
extensionsPath: URI.revive(data.extensionsPath),
extensionHostLogsPath: URI.revive(data.extensionHostLogsPath),
globalStorageHome: URI.revive(data.globalStorageHome),
userHome: URI.revive(data.userHome),
extensions: data.extensions.map(ext => { (<any>ext).extensionLocation = URI.revive(ext.extensionLocation); return ext; }),
os: data.os
os: data.os,
syncExtensions: data.syncExtensions
};
});
}