Fixes #107434: hostExtensions
should never contain remote extensions
This commit is contained in:
parent
dc9ef0d110
commit
5d8c90cdb3
1 changed files with 9 additions and 2 deletions
|
@ -21,7 +21,7 @@ import { Schemas } from 'vs/base/common/network';
|
||||||
import { Disposable } from 'vs/base/common/lifecycle';
|
import { Disposable } from 'vs/base/common/lifecycle';
|
||||||
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
|
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
|
||||||
import { PersistentProtocol } from 'vs/base/parts/ipc/common/ipc.net';
|
import { PersistentProtocol } from 'vs/base/parts/ipc/common/ipc.net';
|
||||||
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||||
import { VSBuffer } from 'vs/base/common/buffer';
|
import { VSBuffer } from 'vs/base/common/buffer';
|
||||||
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||||
import { IProductService } from 'vs/platform/product/common/productService';
|
import { IProductService } from 'vs/platform/product/common/productService';
|
||||||
|
@ -205,8 +205,15 @@ export class RemoteExtensionHost extends Disposable implements IExtensionHost {
|
||||||
const [telemetryInfo, remoteInitData] = await Promise.all([this._telemetryService.getTelemetryInfo(), this._initDataProvider.getInitData()]);
|
const [telemetryInfo, remoteInitData] = await Promise.all([this._telemetryService.getTelemetryInfo(), this._initDataProvider.getInitData()]);
|
||||||
|
|
||||||
// Collect all identifiers for extension ids which can be considered "resolved"
|
// Collect all identifiers for extension ids which can be considered "resolved"
|
||||||
|
const remoteExtensions = new Set<string>();
|
||||||
|
remoteInitData.extensions.forEach((extension) => remoteExtensions.add(ExtensionIdentifier.toKey(extension.identifier.value)));
|
||||||
|
|
||||||
const resolvedExtensions = remoteInitData.allExtensions.filter(extension => !extension.main && !extension.browser).map(extension => extension.identifier);
|
const resolvedExtensions = remoteInitData.allExtensions.filter(extension => !extension.main && !extension.browser).map(extension => extension.identifier);
|
||||||
const hostExtensions = remoteInitData.allExtensions.filter(extension => (extension.main || extension.browser) && extension.api === 'none').map(extension => extension.identifier);
|
const hostExtensions = (
|
||||||
|
remoteInitData.allExtensions
|
||||||
|
.filter(extension => !remoteExtensions.has(ExtensionIdentifier.toKey(extension.identifier.value)))
|
||||||
|
.filter(extension => (extension.main || extension.browser) && extension.api === 'none').map(extension => extension.identifier)
|
||||||
|
);
|
||||||
const workspace = this._contextService.getWorkspace();
|
const workspace = this._contextService.getWorkspace();
|
||||||
return {
|
return {
|
||||||
commit: this._productService.commit,
|
commit: this._productService.commit,
|
||||||
|
|
Loading…
Reference in a new issue