diff options
-rwxr-xr-x | scripts/test-remote-integration.sh | 2 | ||||
-rw-r--r-- | src/vs/server/node/remoteAgentEnvironmentImpl.ts | 34 |
2 files changed, 4 insertions, 32 deletions
diff --git a/scripts/test-remote-integration.sh b/scripts/test-remote-integration.sh index 68c740784a6..7decdf3798f 100755 --- a/scripts/test-remote-integration.sh +++ b/scripts/test-remote-integration.sh @@ -63,7 +63,7 @@ else export ELECTRON_ENABLE_LOGGING=1 # Running from a build, we need to enable the vscode-test-resolver extension - EXTRA_INTEGRATION_TEST_ARGUMENTS="--extensions-dir=$EXT_PATH --enable-proposed-api=vscode.vscode-test-resolver --enable-proposed-api=vscode.vscode-api-tests --enable-proposed-api=vscode.markdown-language-features --enable-proposed-api=vscode.git" + EXTRA_INTEGRATION_TEST_ARGUMENTS="--extensions-dir=$EXT_PATH --enable-proposed-api=vscode.vscode-test-resolver --enable-proposed-api=vscode.vscode-api-tests" echo "Storing crash reports into '$VSCODECRASHDIR'." echo "Storing log files into '$VSCODELOGSDIR'." diff --git a/src/vs/server/node/remoteAgentEnvironmentImpl.ts b/src/vs/server/node/remoteAgentEnvironmentImpl.ts index dd7ebc3daa6..6a51d9f1514 100644 --- a/src/vs/server/node/remoteAgentEnvironmentImpl.ts +++ b/src/vs/server/node/remoteAgentEnvironmentImpl.ts @@ -9,11 +9,10 @@ import * as performance from 'vs/base/common/performance'; import { URI } from 'vs/base/common/uri'; import { createURITransformer } from 'vs/workbench/api/node/uriTransformer'; import { IRemoteAgentEnvironmentDTO, IGetEnvironmentDataArguments, IScanExtensionsArguments, IScanSingleExtensionArguments, IGetExtensionHostExitInfoArguments } from 'vs/workbench/services/remote/common/remoteAgentEnvironmentChannel'; -import * as nls from 'vs/nls'; import { Schemas } from 'vs/base/common/network'; import { IServerEnvironmentService } from 'vs/server/node/serverEnvironmentService'; import { IServerChannel } from 'vs/base/parts/ipc/common/ipc'; -import { ExtensionIdentifier, ExtensionType, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; +import { ExtensionType, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { transformOutgoingURIs } from 'vs/base/common/uriIpc'; import { ILogService } from 'vs/platform/log/common/log'; import { ContextKeyExpr, ContextKeyDefinedExpr, ContextKeyNotExpr, ContextKeyEqualsExpr, ContextKeyNotEqualsExpr, ContextKeyRegexExpr, IContextKeyExprMapper, ContextKeyExpression, ContextKeyInExpr, ContextKeyGreaterExpr, ContextKeyGreaterEqualsExpr, ContextKeySmallerExpr, ContextKeySmallerEqualsExpr } from 'vs/platform/contextkey/common/contextkey'; @@ -27,6 +26,7 @@ import { cwd } from 'vs/base/common/process'; import { ServerConnectionToken, ServerConnectionTokenType } from 'vs/server/node/serverConnectionToken'; import { IExtensionHostStatusService } from 'vs/server/node/extensionHostStatusService'; import { IExtensionsScannerService, toExtensionDescription } from 'vs/platform/extensionManagement/common/extensionsScannerService'; +import { dedupExtensions } from 'vs/workbench/services/extensions/common/extensionsUtil'; export class RemoteAgentEnvironmentChannel implements IServerChannel { @@ -310,35 +310,7 @@ export class RemoteAgentEnvironmentChannel implements IServerChannel { this._scanDevelopedExtensions(language, extensionDevelopmentPath) ]); - let result = new Map<string, IExtensionDescription>(); - - builtinExtensions.forEach((builtinExtension) => { - if (!builtinExtension) { - return; - } - result.set(ExtensionIdentifier.toKey(builtinExtension.identifier), builtinExtension); - }); - - installedExtensions.forEach((installedExtension) => { - if (!installedExtension) { - return; - } - if (result.has(ExtensionIdentifier.toKey(installedExtension.identifier))) { - console.warn(nls.localize('overwritingExtension', "Overwriting extension {0} with {1}.", result.get(ExtensionIdentifier.toKey(installedExtension.identifier))!.extensionLocation.fsPath, installedExtension.extensionLocation.fsPath)); - } - result.set(ExtensionIdentifier.toKey(installedExtension.identifier), installedExtension); - }); - - developedExtensions.forEach((developedExtension) => { - if (!developedExtension) { - return; - } - result.set(ExtensionIdentifier.toKey(developedExtension.identifier), developedExtension); - }); - - const r: IExtensionDescription[] = []; - result.forEach((v) => r.push(v)); - return r; + return dedupExtensions(builtinExtensions, installedExtensions, developedExtensions, this._logService); } private async _scanDevelopedExtensions(language: string, extensionDevelopmentPaths?: string[]): Promise<IExtensionDescription[]> { |