variables: allow resolving extensionDir (#146274)

* variables: allow resolving `extensionDir`

This allows us to fix https://github.com/microsoft/vscode-remote-release/issues/5516#issuecomment-911597917

It enables a new replacement in the format `${extensionDir:<id>}` which
will expand to the filesystem path where the extension is stored. This
involved churn, since now resolution is always synchronous (where before
the terminal took a synchronous-only path.)

Additionally, changes were needed to inject this information in the
variable resolver. As part of this I made the extension host resolver
(used by debug and tasks) its own extension host service.

* fixup! preserve object key order in resolution, add extensionDir support

* fixup! address pr comments

* fixup! address pr comments

* fixup! address pr comments

* config: fix config replacement only working for first variable per line

* fixup! fix unit tests
This commit is contained in:
Connor Peet
2022-04-07 08:06:31 -07:00
committed by GitHub
parent 0fba8139ce
commit 0de44f9786
30 changed files with 450 additions and 298 deletions

View File

@@ -186,7 +186,7 @@ export async function setupServerServices(connectionToken: ServerConnectionToken
const telemetryChannel = new ServerTelemetryChannel(accessor.get(IServerTelemetryService), appInsightsAppender);
socketServer.registerChannel('telemetry', telemetryChannel);
socketServer.registerChannel(REMOTE_TERMINAL_CHANNEL_NAME, new RemoteTerminalChannel(environmentService, logService, ptyService, productService));
socketServer.registerChannel(REMOTE_TERMINAL_CHANNEL_NAME, new RemoteTerminalChannel(environmentService, logService, ptyService, productService, extensionManagementService));
const remoteFileSystemChannel = new RemoteAgentFileSystemProviderChannel(logService, environmentService);
socketServer.registerChannel(REMOTE_FILE_SYSTEM_CHANNEL_NAME, remoteFileSystemChannel);