From 482c4bf75ed246f396bc58c308cd3702d3296e23 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 12 May 2023 22:57:26 +0200 Subject: [PATCH] Avoid mangling `ExtensionIdentifier._lower` --- src/vs/platform/extensions/common/extensions.ts | 7 ++++++- .../services/remote/common/remoteExtensionsScanner.ts | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index 4e427d56b8f..cfa0e3296f0 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -341,7 +341,12 @@ export interface IExtension { */ export class ExtensionIdentifier { public readonly value: string; - private readonly _lower: string; + + /** + * Do not use directly. This is public to avoid mangling and thus + * allow compatibility between running from source and a built version. + */ + readonly _lower: string; constructor(value: string) { this.value = value; diff --git a/src/vs/workbench/services/remote/common/remoteExtensionsScanner.ts b/src/vs/workbench/services/remote/common/remoteExtensionsScanner.ts index 418026d6a4f..a466cc1f3a1 100644 --- a/src/vs/workbench/services/remote/common/remoteExtensionsScanner.ts +++ b/src/vs/workbench/services/remote/common/remoteExtensionsScanner.ts @@ -7,7 +7,7 @@ import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteA import { IRemoteExtensionsScannerService, RemoteExtensionsScannerChannelName } from 'vs/platform/remote/common/remoteExtensionsScanner'; import * as platform from 'vs/base/common/platform'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -import { ExtensionIdentifier, IExtensionDescription, IRelaxedExtensionDescription } from 'vs/platform/extensions/common/extensions'; +import { IExtensionDescription, IRelaxedExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { URI } from 'vs/base/common/uri'; import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile'; import { IRemoteUserDataProfilesService } from 'vs/workbench/services/userDataProfile/common/remoteUserDataProfiles'; @@ -45,7 +45,6 @@ class RemoteExtensionsScannerService implements IRemoteExtensionsScannerService const scannedExtensions = await channel.call('scanExtensions', [platform.language, profileLocation, this.environmentService.extensionDevelopmentLocationURI, languagePack]); scannedExtensions.forEach((extension) => { extension.extensionLocation = URI.revive(extension.extensionLocation); - extension.identifier = new ExtensionIdentifier(extension.identifier.value); }); return scannedExtensions; },