diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index bc0fb0365d89de4a5a5bbba70f716a3eb610e339..4e89be37fedfb19e9b5e09e77eeb8caf03c88fcd 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -44,7 +44,6 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { SerializedError } from 'vs/base/common/errors'; import { IStat, FileChangeType } from 'vs/platform/files/common/files'; import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; -import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { CommentRule, CharacterPair, EnterAction } from 'vs/editor/common/modes/languageConfiguration'; import { ISingleEditOperation } from 'vs/editor/common/model'; import { ILineMatch, IPatternInfo } from 'vs/platform/search/common/search'; @@ -77,9 +76,8 @@ export interface IInitData { configuration: IConfigurationInitData; telemetryInfo: ITelemetryInfo; windowId: number; - args: ParsedArgs; - execPath: string; logLevel: LogLevel; + logsPath: string; } export interface IConfigurationInitData extends IConfigurationData { diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index f164581641409d99d2a2dd3084f2f8c2589fc813..8532e95c37e00252c726557bd8f871d228b78496 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -20,7 +20,6 @@ import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { TernarySearchTree } from 'vs/base/common/map'; import { Barrier } from 'vs/base/common/async'; import { ILogService } from 'vs/platform/log/common/log'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ExtHostLogService } from 'vs/workbench/api/node/extHostLogService'; import URI from 'vs/base/common/uri'; @@ -140,8 +139,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { extHostContext: IExtHostContext, extHostWorkspace: ExtHostWorkspace, extHostConfiguration: ExtHostConfiguration, - extHostLogService: ExtHostLogService, - environmentService: IEnvironmentService + extHostLogService: ExtHostLogService ) { this._barrier = new Barrier(); this._registry = new ExtensionDescriptionRegistry(initData.extensions); diff --git a/src/vs/workbench/api/node/extHostLogService.ts b/src/vs/workbench/api/node/extHostLogService.ts index e4b169361909ea78147fd5458706a5177f004e16..6708690a2f429011e078526a9470002b6d5aad3f 100644 --- a/src/vs/workbench/api/node/extHostLogService.ts +++ b/src/vs/workbench/api/node/extHostLogService.ts @@ -9,7 +9,6 @@ import { join } from 'vs/base/common/paths'; import { LogLevel } from 'vs/workbench/api/node/extHostTypes'; import { ILogService, DelegatedLogService } from 'vs/platform/log/common/log'; import { createSpdLogService } from 'vs/platform/log/node/spdlogService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ExtHostLogServiceShape } from 'vs/workbench/api/node/extHost.protocol'; @@ -20,9 +19,9 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic constructor( private _windowId: number, logLevel: LogLevel, - private _environmentService: IEnvironmentService + private _logsPath: string ) { - super(createSpdLogService(`exthost${_windowId}`, logLevel, _environmentService.logsPath)); + super(createSpdLogService(`exthost${_windowId}`, logLevel, _logsPath)); } $setLevel(level: LogLevel): void { @@ -39,7 +38,7 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic } getLogDirectory(extensionID: string): string { - return join(this._environmentService.logsPath, `${extensionID}_${this._windowId}`); + return join(this._logsPath, `${extensionID}_${this._windowId}`); } private createLogger(extensionID: string): ExtHostLogger { diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index f0a8fe9cacfeaee70f3a2e20104f2c5b0f9433cf..9a17c7976dc4a21159190bf6e9dcaab4a31e6c02 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -20,7 +20,6 @@ import * as errors from 'vs/base/common/errors'; import * as watchdog from 'native-watchdog'; import * as glob from 'vs/base/common/glob'; import { ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator'; -import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { RPCProtocol } from 'vs/workbench/services/extensions/node/rpcProtocol'; @@ -89,8 +88,7 @@ export class ExtensionHostMain { // services const rpcProtocol = new RPCProtocol(protocol); - const environmentService = new EnvironmentService(initData.args, initData.execPath); - this._extHostLogService = new ExtHostLogService(initData.windowId, initData.logLevel, environmentService); + this._extHostLogService = new ExtHostLogService(initData.windowId, initData.logLevel, initData.logsPath); this.disposables.push(this._extHostLogService); const extHostWorkspace = new ExtHostWorkspace(rpcProtocol, initData.workspace, this._extHostLogService); @@ -98,7 +96,7 @@ export class ExtensionHostMain { this._extHostLogService.trace('initData', initData); this._extHostConfiguration = new ExtHostConfiguration(rpcProtocol.getProxy(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration); - this._extensionService = new ExtHostExtensionService(initData, rpcProtocol, extHostWorkspace, this._extHostConfiguration, this._extHostLogService, environmentService); + this._extensionService = new ExtHostExtensionService(initData, rpcProtocol, extHostWorkspace, this._extHostConfiguration, this._extHostLogService); // error forwarding and stack trace scanning Error.stackTraceLimit = 100; // increase number of stack frames (from 10, https://github.com/v8/v8/wiki/Stack-Trace-API) diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts index d60a90117e8e1eccb5746be514411c5bec5bd41a..045e78f0c5281d65df9929441dc962ffe646e580 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionHost.ts @@ -381,10 +381,9 @@ export class ExtensionHostProcessWorker { // Send configurations scopes only in development mode. configuration: !this._environmentService.isBuilt || this._environmentService.isExtensionDevelopment ? { ...configurationData, configurationScopes: getScopes() } : configurationData, telemetryInfo, - args: this._environmentService.args, - execPath: this._environmentService.execPath, windowId: this._windowService.getCurrentWindowId(), - logLevel: this._logService.getLevel() + logLevel: this._logService.getLevel(), + logsPath: this._environmentService.logsPath }; return r; });