diff --git a/build/lib/layersChecker.js b/build/lib/layersChecker.js index 7af25afe1a5..4b03048d9e7 100644 --- a/build/lib/layersChecker.js +++ b/build/lib/layersChecker.js @@ -66,7 +66,9 @@ const NATIVE_TYPES = [ 'INativeEnvironmentService', 'AbstractNativeEnvironmentService', 'INativeWindowConfiguration', - 'ICommonNativeHostService' + 'ICommonNativeHostService', + 'INativeHostService', + 'IMainProcessService' ]; const RULES = [ // Tests: skip @@ -291,4 +293,4 @@ for (const sourceFile of program.getSourceFiles()) { if (hasErrors) { process.exit(1); } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXJzQ2hlY2tlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImxheWVyc0NoZWNrZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Z0dBR2dHOztBQUVoRyxpQ0FBaUM7QUFDakMsMkJBQThDO0FBQzlDLCtCQUE4QztBQUM5Qyx5Q0FBa0M7QUFFbEMsRUFBRTtBQUNGLGdHQUFnRztBQUNoRyxFQUFFO0FBQ0YsK0ZBQStGO0FBQy9GLG1EQUFtRDtBQUNuRCw0RUFBNEU7QUFDNUUsaUVBQWlFO0FBQ2pFLEVBQUU7QUFDRixnR0FBZ0c7QUFDaEcsRUFBRTtBQUNGLGdHQUFnRztBQUNoRyxFQUFFO0FBRUYsbUZBQW1GO0FBQ25GLHdGQUF3RjtBQUN4RixNQUFNLFVBQVUsR0FBRztJQUNsQixTQUFTO0lBQ1QsWUFBWTtJQUNaLGNBQWM7SUFDZCxhQUFhO0lBQ2IsZUFBZTtJQUNmLFNBQVM7SUFDVCxTQUFTO0lBQ1QsT0FBTztJQUNQLGtCQUFrQjtJQUNsQixRQUFRO0lBQ1IsYUFBYTtJQUNiLGFBQWE7SUFDYixNQUFNO0lBQ04sZ0JBQWdCO0lBQ2hCLE9BQU87SUFDUCxZQUFZO0lBQ1osYUFBYTtJQUN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git a/build/lib/layersChecker.ts b/build/lib/layersChecker.ts index 44490b6f1f9..f63e0c57ac3 100644 --- a/build/lib/layersChecker.ts +++ b/build/lib/layersChecker.ts @@ -68,7 +68,9 @@ const NATIVE_TYPES = [ 'INativeEnvironmentService', 'AbstractNativeEnvironmentService', 'INativeWindowConfiguration', - 'ICommonNativeHostService' + 'ICommonNativeHostService', + 'INativeHostService', + 'IMainProcessService' ]; const RULES: IRule[] = [ diff --git a/src/vs/code/node/sharedProcess/sharedProcessMain.ts b/src/vs/code/node/sharedProcess/sharedProcessMain.ts index 59c0f2e034b..99f4c92a644 100644 --- a/src/vs/code/node/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/node/sharedProcess/sharedProcessMain.ts @@ -3,6 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +/* eslint-disable local/code-layering, local/code-import-patterns */ +// TODO@bpasero remove these once utility process is the only way +import { Server as BrowserWindowMessagePortServer } from 'vs/base/parts/ipc/electron-browser/ipc.mp'; +import { SharedProcessWorkerService } from 'vs/platform/sharedProcess/electron-browser/sharedProcessWorkerService'; +import { ILocalPtyService } from 'vs/platform/terminal/electron-sandbox/terminal'; + import { hostname, release } from 'os'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { onUnexpectedError, setUnexpectedErrorHandler } from 'vs/base/common/errors'; @@ -71,7 +77,8 @@ import { UserDataSyncEnablementService } from 'vs/platform/userDataSync/common/u import { UserDataSyncService } from 'vs/platform/userDataSync/common/userDataSyncService'; import { UserDataSyncChannel } from 'vs/platform/userDataSync/common/userDataSyncServiceIpc'; import { UserDataSyncStoreManagementService, UserDataSyncStoreService } from 'vs/platform/userDataSync/common/userDataSyncStoreService'; -import { IUserDataProfileStorageService, NativeUserDataProfileStorageService } from 'vs/platform/userDataProfile/common/userDataProfileStorageService'; +import { IUserDataProfileStorageService } from 'vs/platform/userDataProfile/common/userDataProfileStorageService'; +import { NativeUserDataProfileStorageService } from 'vs/platform/userDataProfile/node/userDataProfileStorageService'; import { ActiveWindowManager } from 'vs/platform/windows/node/windowTracker'; import { ISignService } from 'vs/platform/sign/common/sign'; import { SignService } from 'vs/platform/sign/node/signService'; @@ -112,13 +119,7 @@ import { INativeHostService } from 'vs/platform/native/common/native'; import { UserDataAutoSyncService } from 'vs/platform/userDataSync/node/userDataAutoSyncService'; import { ExtensionTipsService } from 'vs/platform/extensionManagement/node/extensionTipsService'; import { IMainProcessService, MainProcessService } from 'vs/platform/ipc/common/mainProcessService'; -import { NativeStorageService } from 'vs/platform/storage/common/storageService'; - -/* eslint-disable local/code-layering, local/code-import-patterns */ -// TODO@bpasero remove these once utility process is the only way -import { Server as BrowserWindowMessagePortServer } from 'vs/base/parts/ipc/electron-browser/ipc.mp'; -import { SharedProcessWorkerService } from 'vs/platform/sharedProcess/electron-browser/sharedProcessWorkerService'; -import { ILocalPtyService } from 'vs/platform/terminal/electron-sandbox/terminal'; +import { RemoteStorageService } from 'vs/platform/storage/common/storageService'; class SharedProcessMain extends Disposable { @@ -277,7 +278,7 @@ class SharedProcessMain extends Disposable { services.set(IConfigurationService, configurationService); // Storage (global access only) - const storageService = new NativeStorageService(undefined, { defaultProfile: userDataProfilesService.defaultProfile, currentProfile: userDataProfilesService.defaultProfile }, mainProcessService, environmentService); + const storageService = new RemoteStorageService(undefined, { defaultProfile: userDataProfilesService.defaultProfile, currentProfile: userDataProfilesService.defaultProfile }, mainProcessService, environmentService); services.set(IStorageService, storageService); this._register(toDisposable(() => storageService.flush())); diff --git a/src/vs/platform/ipc/common/mainProcessService.ts b/src/vs/platform/ipc/common/mainProcessService.ts index 1da49b18862..a9e67cbd5a6 100644 --- a/src/vs/platform/ipc/common/mainProcessService.ts +++ b/src/vs/platform/ipc/common/mainProcessService.ts @@ -5,14 +5,11 @@ import { IChannel, IPCServer, IServerChannel, StaticRouter } from 'vs/base/parts/ipc/common/ipc'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { IRemoteService } from 'vs/platform/ipc/common/services'; export const IMainProcessService = createDecorator('mainProcessService'); -export interface IMainProcessService { - readonly _serviceBrand: undefined; - getChannel(channelName: string): IChannel; - registerChannel(channelName: string, channel: IServerChannel): void; -} +export interface IMainProcessService extends IRemoteService { } /** * An implementation of `IMainProcessService` that leverages `IPCServer`. diff --git a/src/vs/platform/ipc/common/services.ts b/src/vs/platform/ipc/common/services.ts new file mode 100644 index 00000000000..08a1ffea09d --- /dev/null +++ b/src/vs/platform/ipc/common/services.ts @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc'; + +export interface IRemoteService { + + readonly _serviceBrand: undefined; + + getChannel(channelName: string): IChannel; + registerChannel(channelName: string, channel: IServerChannel): void; +} diff --git a/src/vs/platform/ipc/electron-sandbox/services.ts b/src/vs/platform/ipc/electron-sandbox/services.ts index 193b36f54a4..36921e83ef5 100644 --- a/src/vs/platform/ipc/electron-sandbox/services.ts +++ b/src/vs/platform/ipc/electron-sandbox/services.ts @@ -3,11 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IChannel, IServerChannel, ProxyChannel } from 'vs/base/parts/ipc/common/ipc'; +import { IChannel, ProxyChannel } from 'vs/base/parts/ipc/common/ipc'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { createDecorator, IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IMainProcessService } from 'vs/platform/ipc/common/mainProcessService'; +import { IRemoteService } from 'vs/platform/ipc/common/services'; type ChannelClientCtor = { new(channel: IChannel, ...args: any[]): T }; type Remote = { getChannel(channelName: string): IChannel }; @@ -61,13 +62,7 @@ export function registerMainProcessRemoteService(id: ServiceIdentifier, ch export const ISharedProcessService = createDecorator('sharedProcessService'); -export interface ISharedProcessService { - - readonly _serviceBrand: undefined; - - getChannel(channelName: string): IChannel; - registerChannel(channelName: string, channel: IServerChannel): void; - +export interface ISharedProcessService extends IRemoteService { notifyRestored(): void; } diff --git a/src/vs/platform/storage/common/storageService.ts b/src/vs/platform/storage/common/storageService.ts index ae0679c3ef0..6dc8ec5e943 100644 --- a/src/vs/platform/storage/common/storageService.ts +++ b/src/vs/platform/storage/common/storageService.ts @@ -8,13 +8,13 @@ import { DisposableStore } from 'vs/base/common/lifecycle'; import { joinPath } from 'vs/base/common/resources'; import { IStorage, Storage } from 'vs/base/parts/storage/common/storage'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IMainProcessService } from 'vs/platform/ipc/common/mainProcessService'; +import { IRemoteService } from 'vs/platform/ipc/common/services'; import { AbstractStorageService, isProfileUsingDefaultStorage, StorageScope, WillSaveStateReason } from 'vs/platform/storage/common/storage'; import { ApplicationStorageDatabaseClient, ProfileStorageDatabaseClient, WorkspaceStorageDatabaseClient } from 'vs/platform/storage/common/storageIpc'; import { isUserDataProfile, IUserDataProfile } from 'vs/platform/userDataProfile/common/userDataProfile'; import { IAnyWorkspaceIdentifier } from 'vs/platform/workspace/common/workspace'; -export class NativeStorageService extends AbstractStorageService { +export class RemoteStorageService extends AbstractStorageService { private readonly applicationStorageProfile = this.initialProfiles.defaultProfile; private readonly applicationStorage = this.createApplicationStorage(); @@ -30,14 +30,14 @@ export class NativeStorageService extends AbstractStorageService { constructor( private readonly initialWorkspace: IAnyWorkspaceIdentifier | undefined, private readonly initialProfiles: { defaultProfile: IUserDataProfile; currentProfile: IUserDataProfile }, - private readonly mainProcessService: IMainProcessService, + private readonly remoteService: IRemoteService, private readonly environmentService: IEnvironmentService ) { super(); } private createApplicationStorage(): IStorage { - const storageDataBaseClient = this._register(new ApplicationStorageDatabaseClient(this.mainProcessService.getChannel('storage'))); + const storageDataBaseClient = this._register(new ApplicationStorageDatabaseClient(this.remoteService.getChannel('storage'))); const applicationStorage = this._register(new Storage(storageDataBaseClient)); this._register(applicationStorage.onDidChangeStorage(key => this.emitDidChangeValue(StorageScope.APPLICATION, key))); @@ -63,7 +63,7 @@ export class NativeStorageService extends AbstractStorageService { profileStorage = this.applicationStorage; } else { - const storageDataBaseClient = this.profileStorageDisposables.add(new ProfileStorageDatabaseClient(this.mainProcessService.getChannel('storage'), profile)); + const storageDataBaseClient = this.profileStorageDisposables.add(new ProfileStorageDatabaseClient(this.remoteService.getChannel('storage'), profile)); profileStorage = this.profileStorageDisposables.add(new Storage(storageDataBaseClient)); } @@ -84,7 +84,7 @@ export class NativeStorageService extends AbstractStorageService { let workspaceStorage: IStorage | undefined = undefined; if (workspace) { - const storageDataBaseClient = this.workspaceStorageDisposables.add(new WorkspaceStorageDatabaseClient(this.mainProcessService.getChannel('storage'), workspace)); + const storageDataBaseClient = this.workspaceStorageDisposables.add(new WorkspaceStorageDatabaseClient(this.remoteService.getChannel('storage'), workspace)); workspaceStorage = this.workspaceStorageDisposables.add(new Storage(storageDataBaseClient)); this.workspaceStorageDisposables.add(workspaceStorage.onDidChangeStorage(key => this.emitDidChangeValue(StorageScope.WORKSPACE, key))); diff --git a/src/vs/platform/userDataProfile/common/userDataProfileStorageService.ts b/src/vs/platform/userDataProfile/common/userDataProfileStorageService.ts index 93e9bbe7368..e2e5b0f816d 100644 --- a/src/vs/platform/userDataProfile/common/userDataProfileStorageService.ts +++ b/src/vs/platform/userDataProfile/common/userDataProfileStorageService.ts @@ -8,7 +8,7 @@ import { IStorage, IStorageDatabase, Storage } from 'vs/base/parts/storage/commo import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { AbstractStorageService, IStorageService, IStorageValueChangeEvent, StorageScope, StorageTarget, isProfileUsingDefaultStorage } from 'vs/platform/storage/common/storage'; import { Emitter, Event } from 'vs/base/common/event'; -import { IMainProcessService } from 'vs/platform/ipc/common/mainProcessService'; +import { IRemoteService } from 'vs/platform/ipc/common/services'; import { ILogService } from 'vs/platform/log/common/log'; import { ApplicationStorageDatabaseClient, ProfileStorageDatabaseClient } from 'vs/platform/storage/common/storageIpc'; import { IUserDataProfile, IUserDataProfilesService, reviveProfile } from 'vs/platform/userDataProfile/common/userDataProfile'; @@ -126,20 +126,20 @@ export abstract class AbstractUserDataProfileStorageService extends Disposable i protected abstract createStorageDatabase(profile: IUserDataProfile): Promise; } -export class NativeUserDataProfileStorageService extends AbstractUserDataProfileStorageService implements IUserDataProfileStorageService { +export class RemoteUserDataProfileStorageService extends AbstractUserDataProfileStorageService implements IUserDataProfileStorageService { private readonly _onDidChange: Emitter; readonly onDidChange: Event; constructor( - @IMainProcessService private readonly mainProcessService: IMainProcessService, - @IUserDataProfilesService userDataProfilesService: IUserDataProfilesService, - @IStorageService storageService: IStorageService, - @ILogService logService: ILogService, + private readonly remoteService: IRemoteService, + userDataProfilesService: IUserDataProfilesService, + storageService: IStorageService, + logService: ILogService, ) { super(storageService); - const channel = mainProcessService.getChannel('profileStorageListener'); + const channel = remoteService.getChannel('profileStorageListener'); const disposable = this._register(new MutableDisposable()); this._onDidChange = this._register(new Emitter({ // Start listening to profile storage changes only when someone is listening @@ -159,7 +159,7 @@ export class NativeUserDataProfileStorageService extends AbstractUserDataProfile } protected async createStorageDatabase(profile: IUserDataProfile): Promise { - const storageChannel = this.mainProcessService.getChannel('storage'); + const storageChannel = this.remoteService.getChannel('storage'); return isProfileUsingDefaultStorage(profile) ? new ApplicationStorageDatabaseClient(storageChannel) : new ProfileStorageDatabaseClient(storageChannel, profile); } } diff --git a/src/vs/platform/userDataProfile/electron-sandbox/userDataProfileStorageService.ts b/src/vs/platform/userDataProfile/electron-sandbox/userDataProfileStorageService.ts index 1c3b057f4a5..0679efcc742 100644 --- a/src/vs/platform/userDataProfile/electron-sandbox/userDataProfileStorageService.ts +++ b/src/vs/platform/userDataProfile/electron-sandbox/userDataProfileStorageService.ts @@ -3,7 +3,23 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IUserDataProfileStorageService, NativeUserDataProfileStorageService } from 'vs/platform/userDataProfile/common/userDataProfileStorageService'; +import { IUserDataProfileStorageService, RemoteUserDataProfileStorageService } from 'vs/platform/userDataProfile/common/userDataProfileStorageService'; import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { ILogService } from 'vs/platform/log/common/log'; +import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile'; +import { IMainProcessService } from 'vs/platform/ipc/common/mainProcessService'; + +export class NativeUserDataProfileStorageService extends RemoteUserDataProfileStorageService { + + constructor( + @IMainProcessService mainProcessService: IMainProcessService, + @IUserDataProfilesService userDataProfilesService: IUserDataProfilesService, + @IStorageService storageService: IStorageService, + @ILogService logService: ILogService, + ) { + super(mainProcessService, userDataProfilesService, storageService, logService); + } +} registerSingleton(IUserDataProfileStorageService, NativeUserDataProfileStorageService, InstantiationType.Delayed); diff --git a/src/vs/platform/userDataProfile/node/userDataProfileStorageService.ts b/src/vs/platform/userDataProfile/node/userDataProfileStorageService.ts new file mode 100644 index 00000000000..3b37d056aae --- /dev/null +++ b/src/vs/platform/userDataProfile/node/userDataProfileStorageService.ts @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { ILogService } from 'vs/platform/log/common/log'; +import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile'; +import { IMainProcessService } from 'vs/platform/ipc/common/mainProcessService'; +import { RemoteUserDataProfileStorageService } from 'vs/platform/userDataProfile/common/userDataProfileStorageService'; + +export class NativeUserDataProfileStorageService extends RemoteUserDataProfileStorageService { + + constructor( + @IMainProcessService mainProcessService: IMainProcessService, + @IUserDataProfilesService userDataProfilesService: IUserDataProfilesService, + @IStorageService storageService: IStorageService, + @ILogService logService: ILogService, + ) { + super(mainProcessService, userDataProfilesService, storageService, logService); + } +} diff --git a/src/vs/workbench/services/storage/electron-sandbox/storageService.ts b/src/vs/workbench/services/storage/electron-sandbox/storageService.ts index 52542fcad82..7cbcdca35ee 100644 --- a/src/vs/workbench/services/storage/electron-sandbox/storageService.ts +++ b/src/vs/workbench/services/storage/electron-sandbox/storageService.ts @@ -5,12 +5,12 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMainProcessService } from 'vs/platform/ipc/common/mainProcessService'; -import { NativeStorageService } from 'vs/platform/storage/common/storageService'; +import { RemoteStorageService } from 'vs/platform/storage/common/storageService'; import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile'; import { IAnyWorkspaceIdentifier } from 'vs/platform/workspace/common/workspace'; import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile'; -export class NativeWorkbenchStorageService extends NativeStorageService { +export class NativeWorkbenchStorageService extends RemoteStorageService { constructor( workspace: IAnyWorkspaceIdentifier | undefined,