debt - introduce native environment service descriptor

This commit is contained in:
Benjamin Pasero
2020-09-18 09:49:32 +02:00
parent 09a78db5ef
commit ae6e3bcb49
22 changed files with 44 additions and 38 deletions

View File

@@ -10,7 +10,7 @@ import product from 'vs/platform/product/common/product';
import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
import { onUnexpectedError } from 'vs/base/common/errors';
import { ILogService } from 'vs/platform/log/common/log';
import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
interface ExtensionEntry {
version: string;
@@ -32,7 +32,7 @@ interface LanguagePackFile {
export class LanguagePackCachedDataCleaner extends Disposable {
constructor(
@IEnvironmentService private readonly _environmentService: INativeEnvironmentService,
@INativeEnvironmentService private readonly _environmentService: INativeEnvironmentService,
@ILogService private readonly _logService: ILogService
) {
super();

View File

@@ -7,7 +7,7 @@ import { basename, dirname, join } from 'vs/base/common/path';
import { onUnexpectedError } from 'vs/base/common/errors';
import { toDisposable, DisposableStore } from 'vs/base/common/lifecycle';
import { readdir, rimraf, stat } from 'vs/base/node/pfs';
import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import product from 'vs/platform/product/common/product';
export class NodeCachedDataCleaner {
@@ -19,7 +19,7 @@ export class NodeCachedDataCleaner {
private readonly _disposables = new DisposableStore();
constructor(
@IEnvironmentService private readonly _environmentService: INativeEnvironmentService
@INativeEnvironmentService private readonly _environmentService: INativeEnvironmentService
) {
this._manageCachedDataSoon();
}

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { join } from 'vs/base/common/path';
import { readdir, readFile, rimraf } from 'vs/base/node/pfs';
import { onUnexpectedError } from 'vs/base/common/errors';
@@ -16,7 +16,7 @@ export class StorageDataCleaner extends Disposable {
private static readonly NON_EMPTY_WORKSPACE_ID_LENGTH = 128 / 4;
constructor(
@IEnvironmentService private readonly environmentService: INativeEnvironmentService
@INativeEnvironmentService private readonly environmentService: INativeEnvironmentService
) {
super();

View File

@@ -10,7 +10,7 @@ import { serve, Server, connect } from 'vs/base/parts/ipc/node/ipc.net';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
import { ExtensionManagementChannel, ExtensionTipsChannel } from 'vs/platform/extensionManagement/common/extensionManagementIpc';
@@ -148,6 +148,8 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
services.set(IStorageKeysSyncRegistryService, new StorageKeysSyncRegistryChannelClient(mainProcessService.getChannel('storageKeysSyncRegistryService')));
services.set(IEnvironmentService, environmentService);
services.set(INativeEnvironmentService, environmentService);
services.set(IProductService, { _serviceBrand: undefined, ...product });
services.set(ILogService, logService);
services.set(IConfigurationService, configurationService);