@codingame/monaco-vscode-extensions-service-override 11.1.1 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/webWorkerExtensionHostIframe.html +2 -2
- package/index.d.ts +40 -2
- package/index.js +266 -1
- package/package.json +81 -11
- package/vscode/src/vs/base/common/console.d.ts +22 -0
- package/vscode/src/vs/base/common/console.js +3 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.d.ts +24 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +54 -53
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.d.ts +14 -0
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +4 -2
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.d.ts +1 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +1 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.d.ts +30 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +73 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +67 -39
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +65 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +33 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +169 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +50 -58
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +13 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +82 -75
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.d.ts +14 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +58 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +40 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +23 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +8 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.d.ts +65 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +15 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +37 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +53 -52
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +60 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +97 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.d.ts +34 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.d.ts +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +42 -45
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.d.ts +32 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +64 -60
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +108 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +31 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +23 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +6 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +46 -47
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.d.ts +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +39 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +13 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +19 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +52 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +11 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +9 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +6 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.d.ts +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +174 -195
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +27 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +7 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.d.ts +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +6 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.d.ts +16 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +45 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +41 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.d.ts +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +29 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +21 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.d.ts +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.d.ts +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +19 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +10 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +71 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +34 -35
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.d.ts +12 -0
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +1 -0
- package/vscode/src/vs/workbench/common/comments.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +14 -12
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +6 -4
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.d.ts +25 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +62 -60
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +74 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +63 -45
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +57 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +16 -12
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.d.ts +20 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +203 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +217 -180
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +68 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +37 -39
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +40 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +38 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +15 -14
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.d.ts +2 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.d.ts +14 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +18 -19
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.d.ts +3 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +8 -7
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +54 -0
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +4 -3
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.d.ts +4 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +68 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +12 -9
- package/_virtual/semver.js +0 -5
- package/extensions.js +0 -257
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
- package/tools/url.js +0 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Barrier } from 'vscode/vscode/vs/base/common/async';
|
|
3
4
|
import { toErrorMessage } from 'vscode/vscode/vs/base/common/errorMessage';
|
|
4
5
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
@@ -13,6 +14,7 @@ import { isDefined } from 'vscode/vscode/vs/base/common/types';
|
|
|
13
14
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
14
15
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
15
16
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
17
|
+
import { InstallOperation } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
16
18
|
import { ImplicitActivationEvents } from 'vscode/vscode/vs/platform/extensionManagement/common/implicitActivationEvents';
|
|
17
19
|
import { ExtensionIdentifierMap, ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
18
20
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
@@ -34,24 +36,26 @@ import { Extensions } from 'vscode/vscode/vs/workbench/services/extensionManagem
|
|
|
34
36
|
import { IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
35
37
|
import { LockableExtensionDescriptionRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionDescriptionRegistry';
|
|
36
38
|
import { parseExtensionDevOptions } from './extensionDevOptions.js';
|
|
39
|
+
import { ExtensionRunningPreference, ExtensionHostKind } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostKind';
|
|
37
40
|
import { ExtensionHostManager } from './extensionHostManager.js';
|
|
38
41
|
import { IExtensionManifestPropertiesService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
|
|
39
|
-
import { RemoteRunningLocation, LocalProcessRunningLocation, LocalWebWorkerRunningLocation } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionRunningLocation';
|
|
42
|
+
import { RemoteRunningLocation, LocalProcessRunningLocation, LocalWebWorkerRunningLocation } from '@codingame/monaco-vscode-d7f659f5-da33-5ea8-a3b8-9b94f2cf5f33-common/vscode/vs/workbench/services/extensions/common/extensionRunningLocation';
|
|
40
43
|
import { ExtensionRunningLocationTracker, filterExtensionIdentifiers } from './extensionRunningLocationTracker.js';
|
|
41
|
-
import { toExtensionDescription, ExtensionPointContribution, ActivationTimes, toExtension } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
44
|
+
import { toExtensionDescription, ExtensionHostStartup, ActivationKind, ExtensionPointContribution, ActivationTimes, toExtension } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
42
45
|
import { ExtensionsRegistry, ExtensionMessageCollector } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
43
46
|
import { LazyCreateExtensionHostManager } from './lazyCreateExtensionHostManager.js';
|
|
47
|
+
import { ResponsiveState } from 'vscode/vscode/vs/workbench/services/extensions/common/rpcProtocol';
|
|
44
48
|
import { checkGlobFileExists, checkActivateWorkspaceContainsExtension } from 'vscode/vscode/vs/workbench/services/extensions/common/workspaceContains';
|
|
45
49
|
import { WillShutdownJoinerOrder } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
46
50
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
47
51
|
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
48
|
-
import Severity
|
|
52
|
+
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
49
53
|
|
|
50
54
|
var AbstractExtensionService_1;
|
|
51
55
|
const hasOwnProperty = Object.hasOwnProperty;
|
|
52
56
|
const NO_OP_VOID_PROMISE = Promise.resolve(undefined);
|
|
53
57
|
let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtensionService extends Disposable {
|
|
54
|
-
constructor(_extensionsProposedApi, _extensionHostFactory, _extensionHostKindPicker, _instantiationService, _notificationService, _environmentService, _telemetryService, _extensionEnablementService, _fileService, _productService, _extensionManagementService, _contextService, _configurationService, _extensionManifestPropertiesService, _logService, _remoteAgentService, _remoteExtensionsScannerService, _lifecycleService, _remoteAuthorityResolverService, _dialogService) {
|
|
58
|
+
constructor(options, _extensionsProposedApi, _extensionHostFactory, _extensionHostKindPicker, _instantiationService, _notificationService, _environmentService, _telemetryService, _extensionEnablementService, _fileService, _productService, _extensionManagementService, _contextService, _configurationService, _extensionManifestPropertiesService, _logService, _remoteAgentService, _remoteExtensionsScannerService, _lifecycleService, _remoteAuthorityResolverService, _dialogService) {
|
|
55
59
|
super();
|
|
56
60
|
this._extensionsProposedApi = _extensionsProposedApi;
|
|
57
61
|
this._extensionHostFactory = _extensionHostFactory;
|
|
@@ -73,41 +77,43 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
73
77
|
this._lifecycleService = _lifecycleService;
|
|
74
78
|
this._remoteAuthorityResolverService = _remoteAuthorityResolverService;
|
|
75
79
|
this._dialogService = _dialogService;
|
|
76
|
-
this._onDidRegisterExtensions = this._register((
|
|
80
|
+
this._onDidRegisterExtensions = this._register(( new Emitter()));
|
|
77
81
|
this.onDidRegisterExtensions = this._onDidRegisterExtensions.event;
|
|
78
|
-
this._onDidChangeExtensionsStatus = this._register((
|
|
82
|
+
this._onDidChangeExtensionsStatus = this._register(( new Emitter()));
|
|
79
83
|
this.onDidChangeExtensionsStatus = this._onDidChangeExtensionsStatus.event;
|
|
80
|
-
this._onDidChangeExtensions = this._register((
|
|
84
|
+
this._onDidChangeExtensions = this._register(( new Emitter({ leakWarningThreshold: 400 })));
|
|
81
85
|
this.onDidChangeExtensions = this._onDidChangeExtensions.event;
|
|
82
|
-
this._onWillActivateByEvent = this._register((
|
|
86
|
+
this._onWillActivateByEvent = this._register(( new Emitter()));
|
|
83
87
|
this.onWillActivateByEvent = this._onWillActivateByEvent.event;
|
|
84
|
-
this._onDidChangeResponsiveChange = this._register((
|
|
88
|
+
this._onDidChangeResponsiveChange = this._register(( new Emitter()));
|
|
85
89
|
this.onDidChangeResponsiveChange = this._onDidChangeResponsiveChange.event;
|
|
86
|
-
this._onWillStop = this._register((
|
|
90
|
+
this._onWillStop = this._register(( new Emitter()));
|
|
87
91
|
this.onWillStop = this._onWillStop.event;
|
|
88
|
-
this._activationEventReader = (
|
|
89
|
-
this._registry = (
|
|
90
|
-
this._installedExtensionsReady = (
|
|
91
|
-
this._extensionStatus = (
|
|
92
|
-
this._allRequestedActivateEvents = (
|
|
93
|
-
this._remoteCrashTracker = (
|
|
92
|
+
this._activationEventReader = ( new ImplicitActivationAwareReader());
|
|
93
|
+
this._registry = ( new LockableExtensionDescriptionRegistry(this._activationEventReader));
|
|
94
|
+
this._installedExtensionsReady = ( new Barrier());
|
|
95
|
+
this._extensionStatus = ( new ExtensionIdentifierMap());
|
|
96
|
+
this._allRequestedActivateEvents = ( new Set());
|
|
97
|
+
this._remoteCrashTracker = ( new ExtensionHostCrashTracker());
|
|
94
98
|
this._deltaExtensionsQueue = [];
|
|
95
99
|
this._inHandleDeltaExtensions = false;
|
|
96
|
-
this._extensionHostManagers = this._register((
|
|
100
|
+
this._extensionHostManagers = this._register(( new ExtensionHostCollection()));
|
|
97
101
|
this._resolveAuthorityAttempt = 0;
|
|
102
|
+
this._hasLocalProcess = options.hasLocalProcess;
|
|
103
|
+
this._allowRemoteExtensionsInLocalWebWorker = options.allowRemoteExtensionsInLocalWebWorker;
|
|
98
104
|
this._register(this._fileService.onWillActivateFileSystemProvider(e => {
|
|
99
105
|
if (e.scheme !== Schemas.vscodeRemote) {
|
|
100
106
|
e.join(this.activateByEvent(`onFileSystem:${e.scheme}`));
|
|
101
107
|
}
|
|
102
108
|
}));
|
|
103
|
-
this._runningLocations = (
|
|
109
|
+
this._runningLocations = ( new ExtensionRunningLocationTracker(
|
|
104
110
|
this._registry,
|
|
105
111
|
this._extensionHostKindPicker,
|
|
106
112
|
this._environmentService,
|
|
107
113
|
this._configurationService,
|
|
108
114
|
this._logService,
|
|
109
115
|
this._extensionManifestPropertiesService
|
|
110
|
-
))
|
|
116
|
+
));
|
|
111
117
|
this._register(this._extensionEnablementService.onEnablementChanged((extensions) => {
|
|
112
118
|
const toAdd = [];
|
|
113
119
|
const toRemove = [];
|
|
@@ -120,16 +126,16 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
120
126
|
}
|
|
121
127
|
}
|
|
122
128
|
if (isCI) {
|
|
123
|
-
this._logService.info(`AbstractExtensionService.onEnablementChanged fired for ${(
|
|
129
|
+
this._logService.info(`AbstractExtensionService.onEnablementChanged fired for ${( extensions.map(e => e.identifier.id)).join(', ')}`);
|
|
124
130
|
}
|
|
125
|
-
this._handleDeltaExtensions((
|
|
131
|
+
this._handleDeltaExtensions(( new DeltaExtensionsQueueItem(toAdd, toRemove)));
|
|
126
132
|
}));
|
|
127
133
|
this._register(this._extensionManagementService.onDidChangeProfile(({ added, removed }) => {
|
|
128
134
|
if (added.length || removed.length) {
|
|
129
135
|
if (isCI) {
|
|
130
136
|
this._logService.info(`AbstractExtensionService.onDidChangeProfile fired`);
|
|
131
137
|
}
|
|
132
|
-
this._handleDeltaExtensions((
|
|
138
|
+
this._handleDeltaExtensions(( new DeltaExtensionsQueueItem(added, removed)));
|
|
133
139
|
}
|
|
134
140
|
}));
|
|
135
141
|
this._register(this._extensionManagementService.onDidEnableExtensions(extensions => {
|
|
@@ -137,21 +143,21 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
137
143
|
if (isCI) {
|
|
138
144
|
this._logService.info(`AbstractExtensionService.onDidEnableExtensions fired`);
|
|
139
145
|
}
|
|
140
|
-
this._handleDeltaExtensions((
|
|
146
|
+
this._handleDeltaExtensions(( new DeltaExtensionsQueueItem(extensions, [])));
|
|
141
147
|
}
|
|
142
148
|
}));
|
|
143
149
|
this._register(this._extensionManagementService.onDidInstallExtensions((result) => {
|
|
144
150
|
const extensions = [];
|
|
145
151
|
for (const { local, operation } of result) {
|
|
146
|
-
if (local && local.isValid && operation !==
|
|
152
|
+
if (local && local.isValid && operation !== InstallOperation.Migrate && this._safeInvokeIsEnabled(local)) {
|
|
147
153
|
extensions.push(local);
|
|
148
154
|
}
|
|
149
155
|
}
|
|
150
156
|
if (extensions.length) {
|
|
151
157
|
if (isCI) {
|
|
152
|
-
this._logService.info(`AbstractExtensionService.onDidInstallExtensions fired for ${(
|
|
158
|
+
this._logService.info(`AbstractExtensionService.onDidInstallExtensions fired for ${( extensions.map(e => e.identifier.id)).join(', ')}`);
|
|
153
159
|
}
|
|
154
|
-
this._handleDeltaExtensions((
|
|
160
|
+
this._handleDeltaExtensions(( new DeltaExtensionsQueueItem(extensions, [])));
|
|
155
161
|
}
|
|
156
162
|
}));
|
|
157
163
|
this._register(this._extensionManagementService.onDidUninstallExtension((event) => {
|
|
@@ -159,7 +165,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
159
165
|
if (isCI) {
|
|
160
166
|
this._logService.info(`AbstractExtensionService.onDidUninstallExtension fired for ${event.identifier.id}`);
|
|
161
167
|
}
|
|
162
|
-
this._handleDeltaExtensions((
|
|
168
|
+
this._handleDeltaExtensions(( new DeltaExtensionsQueueItem([], [event.identifier.id])));
|
|
163
169
|
}
|
|
164
170
|
}));
|
|
165
171
|
this._register(this._lifecycleService.onWillShutdown(event => {
|
|
@@ -175,14 +181,14 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
175
181
|
}
|
|
176
182
|
}, {
|
|
177
183
|
id: 'join.disconnectRemote',
|
|
178
|
-
label: ( localize(
|
|
184
|
+
label: ( localize(11473, "Disconnect Remote Agent")),
|
|
179
185
|
order: WillShutdownJoinerOrder.Last
|
|
180
186
|
});
|
|
181
187
|
}
|
|
182
188
|
else {
|
|
183
189
|
event.join(this._doStopExtensionHosts(), {
|
|
184
190
|
id: 'join.stopExtensionHosts',
|
|
185
|
-
label: ( localize(
|
|
191
|
+
label: ( localize(11474, "Stopping Extension Hosts")),
|
|
186
192
|
});
|
|
187
193
|
}
|
|
188
194
|
}));
|
|
@@ -212,7 +218,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
212
218
|
}
|
|
213
219
|
async _deltaExtensions(lock, _toAdd, _toRemove) {
|
|
214
220
|
if (isCI) {
|
|
215
|
-
this._logService.info(`AbstractExtensionService._deltaExtensions: toAdd: [${(
|
|
221
|
+
this._logService.info(`AbstractExtensionService._deltaExtensions: toAdd: [${( _toAdd.map(e => e.identifier.id)).join(',')}] toRemove: [${( _toRemove.map(e => typeof e === 'string' ? e : e.identifier.id)).join(',')}]`);
|
|
216
222
|
}
|
|
217
223
|
let toRemove = [];
|
|
218
224
|
for (let i = 0, len = _toRemove.length; i < len; i++) {
|
|
@@ -246,31 +252,31 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
246
252
|
if (toAdd.length === 0 && toRemove.length === 0) {
|
|
247
253
|
return;
|
|
248
254
|
}
|
|
249
|
-
const result = this._registry.deltaExtensions(lock, toAdd, (
|
|
255
|
+
const result = this._registry.deltaExtensions(lock, toAdd, ( toRemove.map(e => e.identifier)));
|
|
250
256
|
this._onDidChangeExtensions.fire({ added: toAdd, removed: toRemove });
|
|
251
257
|
toRemove = toRemove.concat(result.removedDueToLooping);
|
|
252
258
|
if (result.removedDueToLooping.length > 0) {
|
|
253
259
|
this._notificationService.notify({
|
|
254
|
-
severity: Severity
|
|
260
|
+
severity: Severity.Error,
|
|
255
261
|
message: ( localize(
|
|
256
|
-
|
|
262
|
+
11475,
|
|
257
263
|
"The following extensions contain dependency loops and have been disabled: {0}",
|
|
258
|
-
(
|
|
264
|
+
( result.removedDueToLooping.map(e => `'${e.identifier.value}'`)).join(', ')
|
|
259
265
|
))
|
|
260
266
|
});
|
|
261
267
|
}
|
|
262
268
|
this._extensionsProposedApi.updateEnabledApiProposals(toAdd);
|
|
263
|
-
this._doHandleExtensionPoints([].concat(toAdd).concat(toRemove));
|
|
264
|
-
await this._updateExtensionsOnExtHosts(result.versionId, toAdd, (
|
|
269
|
+
this._doHandleExtensionPoints([].concat(toAdd).concat(toRemove), false);
|
|
270
|
+
await this._updateExtensionsOnExtHosts(result.versionId, toAdd, ( toRemove.map(e => e.identifier)));
|
|
265
271
|
for (let i = 0; i < toAdd.length; i++) {
|
|
266
272
|
this._activateAddedExtensionIfNeeded(toAdd[i]);
|
|
267
273
|
}
|
|
268
274
|
}
|
|
269
275
|
async _updateExtensionsOnExtHosts(versionId, toAdd, toRemove) {
|
|
270
276
|
const removedRunningLocation = this._runningLocations.deltaExtensions(toAdd, toRemove);
|
|
271
|
-
const promises = (
|
|
277
|
+
const promises = ( this._extensionHostManagers.map(
|
|
272
278
|
extHostManager => this._updateExtensionsOnExtHost(extHostManager, versionId, toAdd, toRemove, removedRunningLocation)
|
|
273
|
-
))
|
|
279
|
+
));
|
|
274
280
|
await Promise.all(promises);
|
|
275
281
|
}
|
|
276
282
|
async _updateExtensionsOnExtHost(extensionHostManager, versionId, toAdd, toRemove, removedRunningLocation) {
|
|
@@ -278,11 +284,11 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
278
284
|
const myToRemove = filterExtensionIdentifiers(toRemove, removedRunningLocation, extRunningLocation => extensionHostManager.representsRunningLocation(extRunningLocation));
|
|
279
285
|
const addActivationEvents = ImplicitActivationEvents.createActivationEventsMap(toAdd);
|
|
280
286
|
if (isCI) {
|
|
281
|
-
const printExtIds = (extensions) => (
|
|
282
|
-
const printIds = (extensions) => (
|
|
287
|
+
const printExtIds = (extensions) => ( extensions.map(e => e.identifier.value)).join(',');
|
|
288
|
+
const printIds = (extensions) => ( extensions.map(e => e.value)).join(',');
|
|
283
289
|
this._logService.info(`AbstractExtensionService: Calling deltaExtensions: toRemove: [${printIds(toRemove)}], toAdd: [${printExtIds(toAdd)}], myToRemove: [${printIds(myToRemove)}], myToAdd: [${printExtIds(myToAdd)}],`);
|
|
284
290
|
}
|
|
285
|
-
await extensionHostManager.deltaExtensions({ versionId, toRemove, toAdd, addActivationEvents, myToRemove, myToAdd: (
|
|
291
|
+
await extensionHostManager.deltaExtensions({ versionId, toRemove, toAdd, addActivationEvents, myToRemove, myToAdd: ( myToAdd.map(extension => extension.identifier)) });
|
|
286
292
|
}
|
|
287
293
|
canAddExtension(extension) {
|
|
288
294
|
return this._canAddExtension(extension, []);
|
|
@@ -290,16 +296,16 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
290
296
|
_canAddExtension(extension, extensionsBeingRemoved) {
|
|
291
297
|
const existing = this._registry.getExtensionDescriptionByIdOrUUID(extension.identifier, extension.id);
|
|
292
298
|
if (existing) {
|
|
293
|
-
const isBeingRemoved = (
|
|
299
|
+
const isBeingRemoved = ( extensionsBeingRemoved.some(
|
|
294
300
|
(extensionDescription) => ExtensionIdentifier.equals(extension.identifier, extensionDescription.identifier)
|
|
295
|
-
))
|
|
301
|
+
));
|
|
296
302
|
if (!isBeingRemoved) {
|
|
297
303
|
return false;
|
|
298
304
|
}
|
|
299
305
|
}
|
|
300
306
|
const extensionKinds = this._runningLocations.readExtensionKinds(extension);
|
|
301
307
|
const isRemote = extension.extensionLocation.scheme === Schemas.vscodeRemote;
|
|
302
|
-
const extensionHostKind = this._extensionHostKindPicker.pickExtensionHostKind(extension.identifier, extensionKinds, !isRemote, isRemote,
|
|
308
|
+
const extensionHostKind = this._extensionHostKindPicker.pickExtensionHostKind(extension.identifier, extensionKinds, !isRemote, isRemote, ExtensionRunningPreference.None);
|
|
303
309
|
if (extensionHostKind === null) {
|
|
304
310
|
return false;
|
|
305
311
|
}
|
|
@@ -321,7 +327,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
321
327
|
let hasWorkspaceContains = false;
|
|
322
328
|
const activationEvents = this._activationEventReader.readActivationEvents(extensionDescription);
|
|
323
329
|
for (const activationEvent of activationEvents) {
|
|
324
|
-
if ((
|
|
330
|
+
if (( this._allRequestedActivateEvents.has(activationEvent))) {
|
|
325
331
|
shouldActivate = true;
|
|
326
332
|
shouldActivateReason = activationEvent;
|
|
327
333
|
break;
|
|
@@ -341,16 +347,16 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
341
347
|
}
|
|
342
348
|
}
|
|
343
349
|
if (shouldActivate) {
|
|
344
|
-
await Promise.all((
|
|
350
|
+
await Promise.all(( this._extensionHostManagers.map(
|
|
345
351
|
extHostManager => extHostManager.activate(extensionDescription.identifier, { startup: false, extensionId: extensionDescription.identifier, activationEvent: shouldActivateReason })
|
|
346
|
-
)))
|
|
352
|
+
))).then(() => { });
|
|
347
353
|
}
|
|
348
354
|
else if (hasWorkspaceContains) {
|
|
349
355
|
const workspace = await this._contextService.getCompleteWorkspace();
|
|
350
356
|
const forceUsingSearch = !!this._environmentService.remoteAuthority;
|
|
351
357
|
const host = {
|
|
352
358
|
logService: this._logService,
|
|
353
|
-
folders: (
|
|
359
|
+
folders: ( workspace.folders.map(folder => folder.uri)),
|
|
354
360
|
forceUsingSearch: forceUsingSearch,
|
|
355
361
|
exists: (uri) => this._fileService.exists(uri),
|
|
356
362
|
checkExists: (folders, includes, token) => this._instantiationService.invokeFunction((accessor) => checkGlobFileExists(accessor, folders, includes, token))
|
|
@@ -359,9 +365,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
359
365
|
if (!result) {
|
|
360
366
|
return;
|
|
361
367
|
}
|
|
362
|
-
await Promise.all((
|
|
368
|
+
await Promise.all(( this._extensionHostManagers.map(
|
|
363
369
|
extHostManager => extHostManager.activate(extensionDescription.identifier, { startup: false, extensionId: extensionDescription.identifier, activationEvent: result.activationEvent })
|
|
364
|
-
)))
|
|
370
|
+
))).then(() => { });
|
|
365
371
|
}
|
|
366
372
|
}
|
|
367
373
|
async _initialize() {
|
|
@@ -369,13 +375,12 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
369
375
|
this._startExtensionHostsIfNecessary(true, []);
|
|
370
376
|
const lock = await this._registry.acquireLock('_initialize');
|
|
371
377
|
try {
|
|
372
|
-
|
|
373
|
-
this._processExtensions(lock, resolvedExtensions);
|
|
378
|
+
await this._resolveAndProcessExtensions(lock);
|
|
374
379
|
const snapshot = this._registry.getSnapshot();
|
|
375
380
|
for (const extHostManager of this._extensionHostManagers) {
|
|
376
|
-
if (extHostManager.startup !==
|
|
381
|
+
if (extHostManager.startup !== ExtensionHostStartup.EagerAutoStart) {
|
|
377
382
|
const extensions = this._runningLocations.filterByExtensionHostManager(snapshot.extensions, extHostManager);
|
|
378
|
-
extHostManager.start(snapshot.versionId, snapshot.extensions, (
|
|
383
|
+
extHostManager.start(snapshot.versionId, snapshot.extensions, ( extensions.map(extension => extension.identifier)));
|
|
379
384
|
}
|
|
380
385
|
}
|
|
381
386
|
}
|
|
@@ -386,34 +391,62 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
386
391
|
mark('code/didLoadExtensions');
|
|
387
392
|
await this._handleExtensionTests();
|
|
388
393
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
let remoteExtensions =
|
|
394
|
+
async _resolveAndProcessExtensions(lock) {
|
|
395
|
+
let resolverExtensions = [];
|
|
396
|
+
let localExtensions = [];
|
|
397
|
+
let remoteExtensions = [];
|
|
398
|
+
for await (const extensions of this._resolveExtensions()) {
|
|
399
|
+
if (extensions instanceof ResolverExtensions) {
|
|
400
|
+
resolverExtensions = checkEnabledAndProposedAPI(this._logService, this._extensionEnablementService, this._extensionsProposedApi, extensions.extensions, false);
|
|
401
|
+
this._registry.deltaExtensions(lock, resolverExtensions, []);
|
|
402
|
+
this._doHandleExtensionPoints(resolverExtensions, true);
|
|
403
|
+
}
|
|
404
|
+
if (extensions instanceof LocalExtensions) {
|
|
405
|
+
localExtensions = checkEnabledAndProposedAPI(this._logService, this._extensionEnablementService, this._extensionsProposedApi, extensions.extensions, false);
|
|
406
|
+
}
|
|
407
|
+
if (extensions instanceof RemoteExtensions) {
|
|
408
|
+
remoteExtensions = checkEnabledAndProposedAPI(this._logService, this._extensionEnablementService, this._extensionsProposedApi, extensions.extensions, false);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
393
411
|
this._runningLocations.initializeRunningLocation(localExtensions, remoteExtensions);
|
|
394
412
|
this._startExtensionHostsIfNecessary(true, []);
|
|
395
|
-
const remoteExtensionsThatNeedToRunLocally = (
|
|
396
|
-
const localProcessExtensions = (
|
|
397
|
-
const localWebWorkerExtensions = this._runningLocations.filterByExtensionHostKind(localExtensions,
|
|
398
|
-
remoteExtensions = this._runningLocations.filterByExtensionHostKind(remoteExtensions,
|
|
413
|
+
const remoteExtensionsThatNeedToRunLocally = (this._allowRemoteExtensionsInLocalWebWorker ? this._runningLocations.filterByExtensionHostKind(remoteExtensions, ExtensionHostKind.LocalWebWorker) : []);
|
|
414
|
+
const localProcessExtensions = (this._hasLocalProcess ? this._runningLocations.filterByExtensionHostKind(localExtensions, ExtensionHostKind.LocalProcess) : []);
|
|
415
|
+
const localWebWorkerExtensions = this._runningLocations.filterByExtensionHostKind(localExtensions, ExtensionHostKind.LocalWebWorker);
|
|
416
|
+
remoteExtensions = this._runningLocations.filterByExtensionHostKind(remoteExtensions, ExtensionHostKind.Remote);
|
|
399
417
|
for (const ext of remoteExtensionsThatNeedToRunLocally) {
|
|
400
418
|
if (!includes(localWebWorkerExtensions, ext.identifier)) {
|
|
401
419
|
localWebWorkerExtensions.push(ext);
|
|
402
420
|
}
|
|
403
421
|
}
|
|
404
422
|
const allExtensions = remoteExtensions.concat(localProcessExtensions).concat(localWebWorkerExtensions);
|
|
405
|
-
|
|
423
|
+
let toAdd = allExtensions;
|
|
424
|
+
if (resolverExtensions.length) {
|
|
425
|
+
toAdd = allExtensions.filter(extension => !( resolverExtensions.some(
|
|
426
|
+
e => ExtensionIdentifier.equals(e.identifier, extension.identifier) && ( e.extensionLocation.toString()) === ( extension.extensionLocation.toString())
|
|
427
|
+
)));
|
|
428
|
+
if (allExtensions.length < toAdd.length + resolverExtensions.length) {
|
|
429
|
+
const toRemove = resolverExtensions.filter(registered => !( allExtensions.some(
|
|
430
|
+
e => ExtensionIdentifier.equals(e.identifier, registered.identifier) && ( e.extensionLocation.toString()) === ( registered.extensionLocation.toString())
|
|
431
|
+
)));
|
|
432
|
+
if (toRemove.length) {
|
|
433
|
+
this._registry.deltaExtensions(lock, [], ( toRemove.map(e => e.identifier)));
|
|
434
|
+
this._doHandleExtensionPoints(toRemove, true);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
const result = this._registry.deltaExtensions(lock, toAdd, []);
|
|
406
439
|
if (result.removedDueToLooping.length > 0) {
|
|
407
440
|
this._notificationService.notify({
|
|
408
|
-
severity: Severity
|
|
441
|
+
severity: Severity.Error,
|
|
409
442
|
message: ( localize(
|
|
410
|
-
|
|
443
|
+
11475,
|
|
411
444
|
"The following extensions contain dependency loops and have been disabled: {0}",
|
|
412
|
-
(
|
|
445
|
+
( result.removedDueToLooping.map(e => `'${e.identifier.value}'`)).join(', ')
|
|
413
446
|
))
|
|
414
447
|
});
|
|
415
448
|
}
|
|
416
|
-
this._doHandleExtensionPoints(this._registry.getAllExtensionDescriptions());
|
|
449
|
+
this._doHandleExtensionPoints(this._registry.getAllExtensionDescriptions(), false);
|
|
417
450
|
}
|
|
418
451
|
async _handleExtensionTests() {
|
|
419
452
|
if (!this._environmentService.isExtensionDevelopment || !this._environmentService.extensionTestsLocationURI) {
|
|
@@ -422,9 +455,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
422
455
|
const extensionHostManager = this.findTestExtensionHost(this._environmentService.extensionTestsLocationURI);
|
|
423
456
|
if (!extensionHostManager) {
|
|
424
457
|
const msg = ( localize(
|
|
425
|
-
|
|
458
|
+
11476,
|
|
426
459
|
"No extension host found that can launch the test runner at {0}.",
|
|
427
|
-
|
|
460
|
+
(this._environmentService.extensionTestsLocationURI.toString())
|
|
428
461
|
));
|
|
429
462
|
console.error(msg);
|
|
430
463
|
this._notificationService.error(msg);
|
|
@@ -456,10 +489,10 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
456
489
|
}
|
|
457
490
|
if (runningLocation === null) {
|
|
458
491
|
if (testLocation.scheme === Schemas.vscodeRemote) {
|
|
459
|
-
runningLocation = (
|
|
492
|
+
runningLocation = ( new RemoteRunningLocation());
|
|
460
493
|
}
|
|
461
494
|
else {
|
|
462
|
-
runningLocation = (
|
|
495
|
+
runningLocation = ( new LocalProcessRunningLocation(0));
|
|
463
496
|
}
|
|
464
497
|
}
|
|
465
498
|
if (runningLocation !== null) {
|
|
@@ -470,7 +503,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
470
503
|
_releaseBarrier() {
|
|
471
504
|
this._installedExtensionsReady.open();
|
|
472
505
|
this._onDidRegisterExtensions.fire(undefined);
|
|
473
|
-
this._onDidChangeExtensionsStatus.fire((
|
|
506
|
+
this._onDidChangeExtensionsStatus.fire(( this._registry.getAllExtensionDescriptions().map(e => e.identifier)));
|
|
474
507
|
}
|
|
475
508
|
async _resolveAuthorityInitial(remoteAuthority) {
|
|
476
509
|
const MAX_ATTEMPTS = 5;
|
|
@@ -525,12 +558,12 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
525
558
|
async _resolveAuthorityOnExtensionHosts(kind, remoteAuthority) {
|
|
526
559
|
const extensionHosts = this._getExtensionHostManagers(kind);
|
|
527
560
|
if (extensionHosts.length === 0) {
|
|
528
|
-
throw (
|
|
561
|
+
throw ( new Error(`Cannot resolve authority`));
|
|
529
562
|
}
|
|
530
563
|
this._resolveAuthorityAttempt++;
|
|
531
|
-
const results = await Promise.all((
|
|
564
|
+
const results = await Promise.all(( extensionHosts.map(
|
|
532
565
|
extHost => extHost.resolveAuthority(remoteAuthority, this._resolveAuthorityAttempt)
|
|
533
|
-
)))
|
|
566
|
+
)));
|
|
534
567
|
let bestErrorResult = null;
|
|
535
568
|
for (const result of results) {
|
|
536
569
|
if (result.type === 'ok') {
|
|
@@ -546,24 +579,24 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
546
579
|
bestErrorResult = result;
|
|
547
580
|
}
|
|
548
581
|
}
|
|
549
|
-
throw (
|
|
582
|
+
throw ( new RemoteAuthorityResolverError(
|
|
550
583
|
bestErrorResult.error.message,
|
|
551
584
|
bestErrorResult.error.code,
|
|
552
585
|
bestErrorResult.error.detail
|
|
553
|
-
))
|
|
586
|
+
));
|
|
554
587
|
}
|
|
555
588
|
stopExtensionHosts(reason, auto) {
|
|
556
589
|
return this._doStopExtensionHostsWithVeto(reason, auto);
|
|
557
590
|
}
|
|
558
591
|
async _doStopExtensionHosts() {
|
|
559
592
|
const previouslyActivatedExtensionIds = [];
|
|
560
|
-
for (const extensionStatus of (
|
|
593
|
+
for (const extensionStatus of ( this._extensionStatus.values())) {
|
|
561
594
|
if (extensionStatus.activationStarted) {
|
|
562
595
|
previouslyActivatedExtensionIds.push(extensionStatus.id);
|
|
563
596
|
}
|
|
564
597
|
}
|
|
565
598
|
await this._extensionHostManagers.stopAllInReverse();
|
|
566
|
-
for (const extensionStatus of (
|
|
599
|
+
for (const extensionStatus of ( this._extensionStatus.values())) {
|
|
567
600
|
extensionStatus.clearRuntimeStatus();
|
|
568
601
|
}
|
|
569
602
|
if (previouslyActivatedExtensionIds.length > 0) {
|
|
@@ -575,7 +608,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
575
608
|
return false;
|
|
576
609
|
}
|
|
577
610
|
const vetos = [];
|
|
578
|
-
const vetoReasons = (
|
|
611
|
+
const vetoReasons = ( new Set());
|
|
579
612
|
this._onWillStop.fire({
|
|
580
613
|
reason,
|
|
581
614
|
auto,
|
|
@@ -592,7 +625,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
592
625
|
vetoReasons.add(reason);
|
|
593
626
|
}
|
|
594
627
|
}).catch(error => {
|
|
595
|
-
vetoReasons.add(( localize(
|
|
628
|
+
vetoReasons.add(( localize(11477, "{0} (Error: {1})", reason, toErrorMessage(error))));
|
|
596
629
|
});
|
|
597
630
|
}
|
|
598
631
|
}
|
|
@@ -605,13 +638,13 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
605
638
|
if (!auto) {
|
|
606
639
|
const vetoReasonsArray = Array.from(vetoReasons);
|
|
607
640
|
this._logService.warn(`Extension host was not stopped because of veto (stop reason: ${reason}, veto reason: ${vetoReasonsArray.join(', ')})`);
|
|
608
|
-
await this._dialogService.warn(( localize(
|
|
609
|
-
( localize(
|
|
641
|
+
await this._dialogService.warn(( localize(11478, "The following operation was blocked: {0}", reason)), vetoReasonsArray.length === 1 ?
|
|
642
|
+
( localize(11479, "The reason for blocking the operation: {0}", vetoReasonsArray[0])) :
|
|
610
643
|
( localize(
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
644
|
+
11480,
|
|
645
|
+
"The reasons for blocking the operation:\n- {0}",
|
|
646
|
+
vetoReasonsArray.join('\n -')
|
|
647
|
+
)));
|
|
615
648
|
}
|
|
616
649
|
}
|
|
617
650
|
return !veto;
|
|
@@ -619,12 +652,12 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
619
652
|
_startExtensionHostsIfNecessary(isInitialStart, initialActivationEvents) {
|
|
620
653
|
const locations = [];
|
|
621
654
|
for (let affinity = 0; affinity <= this._runningLocations.maxLocalProcessAffinity; affinity++) {
|
|
622
|
-
locations.push((
|
|
655
|
+
locations.push(( new LocalProcessRunningLocation(affinity)));
|
|
623
656
|
}
|
|
624
657
|
for (let affinity = 0; affinity <= this._runningLocations.maxLocalWebWorkerAffinity; affinity++) {
|
|
625
|
-
locations.push((
|
|
658
|
+
locations.push(( new LocalWebWorkerRunningLocation(affinity)));
|
|
626
659
|
}
|
|
627
|
-
locations.push((
|
|
660
|
+
locations.push(( new RemoteRunningLocation()));
|
|
628
661
|
for (const location of locations) {
|
|
629
662
|
if (this._extensionHostManagers.getByRunningLocation(location)) {
|
|
630
663
|
continue;
|
|
@@ -642,13 +675,13 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
642
675
|
return null;
|
|
643
676
|
}
|
|
644
677
|
const processManager = this._doCreateExtensionHostManager(extensionHost, initialActivationEvents);
|
|
645
|
-
const disposableStore = (
|
|
678
|
+
const disposableStore = ( new DisposableStore());
|
|
646
679
|
disposableStore.add(processManager.onDidExit(([code, signal]) => this._onExtensionHostCrashOrExit(processManager, code, signal)));
|
|
647
680
|
disposableStore.add(processManager.onDidChangeResponsiveState((responsiveState) => {
|
|
648
|
-
this._logService.info(`Extension host (${processManager.friendyName}) is ${responsiveState ===
|
|
681
|
+
this._logService.info(`Extension host (${processManager.friendyName}) is ${responsiveState === ResponsiveState.Responsive ? 'responsive' : 'unresponsive'}.`);
|
|
649
682
|
this._onDidChangeResponsiveChange.fire({
|
|
650
683
|
extensionHostKind: processManager.kind,
|
|
651
|
-
isResponsive: responsiveState ===
|
|
684
|
+
isResponsive: responsiveState === ResponsiveState.Responsive,
|
|
652
685
|
getInspectListener: (tryEnableInspector) => {
|
|
653
686
|
return processManager.getInspectPort(tryEnableInspector);
|
|
654
687
|
}
|
|
@@ -658,7 +691,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
658
691
|
}
|
|
659
692
|
_doCreateExtensionHostManager(extensionHost, initialActivationEvents) {
|
|
660
693
|
const internalExtensionService = this._acquireInternalAPI(extensionHost);
|
|
661
|
-
if (extensionHost.startup ===
|
|
694
|
+
if (extensionHost.startup === ExtensionHostStartup.Lazy && initialActivationEvents.length === 0) {
|
|
662
695
|
return this._instantiationService.createInstance(LazyCreateExtensionHostManager, extensionHost, internalExtensionService);
|
|
663
696
|
}
|
|
664
697
|
return this._instantiationService.createInstance(ExtensionHostManager, extensionHost, initialActivationEvents, internalExtensionService);
|
|
@@ -673,10 +706,10 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
673
706
|
}
|
|
674
707
|
_onExtensionHostCrashed(extensionHost, code, signal) {
|
|
675
708
|
console.error(`Extension host (${extensionHost.friendyName}) terminated unexpectedly. Code: ${code}, Signal: ${signal}`);
|
|
676
|
-
if (extensionHost.kind ===
|
|
709
|
+
if (extensionHost.kind === ExtensionHostKind.LocalProcess) {
|
|
677
710
|
this._doStopExtensionHosts();
|
|
678
711
|
}
|
|
679
|
-
else if (extensionHost.kind ===
|
|
712
|
+
else if (extensionHost.kind === ExtensionHostKind.Remote) {
|
|
680
713
|
if (signal) {
|
|
681
714
|
this._onRemoteExtensionHostCrashed(extensionHost, signal);
|
|
682
715
|
}
|
|
@@ -684,17 +717,15 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
684
717
|
}
|
|
685
718
|
}
|
|
686
719
|
_getExtensionHostExitInfoWithTimeout(reconnectionToken) {
|
|
687
|
-
return (
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
}))
|
|
697
|
-
);
|
|
720
|
+
return ( new Promise((resolve, reject) => {
|
|
721
|
+
const timeoutHandle = setTimeout(() => {
|
|
722
|
+
reject(( new Error('getExtensionHostExitInfo timed out')));
|
|
723
|
+
}, 2000);
|
|
724
|
+
this._remoteAgentService.getExtensionHostExitInfo(reconnectionToken).then((r) => {
|
|
725
|
+
clearTimeout(timeoutHandle);
|
|
726
|
+
resolve(r);
|
|
727
|
+
}, reject);
|
|
728
|
+
}));
|
|
698
729
|
}
|
|
699
730
|
async _onRemoteExtensionHostCrashed(extensionHost, reconnectionToken) {
|
|
700
731
|
try {
|
|
@@ -706,17 +737,17 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
706
737
|
this._remoteCrashTracker.registerCrash();
|
|
707
738
|
if (this._remoteCrashTracker.shouldAutomaticallyRestart()) {
|
|
708
739
|
this._logService.info(`Automatically restarting the remote extension host.`);
|
|
709
|
-
this._notificationService.status(( localize(
|
|
710
|
-
this._startExtensionHostsIfNecessary(false, Array.from((
|
|
740
|
+
this._notificationService.status(( localize(11481, "The remote extension host terminated unexpectedly. Restarting...")), { hideAfter: 5000 });
|
|
741
|
+
this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
|
|
711
742
|
}
|
|
712
743
|
else {
|
|
713
|
-
this._notificationService.prompt(Severity
|
|
714
|
-
|
|
744
|
+
this._notificationService.prompt(Severity.Error, ( localize(
|
|
745
|
+
11482,
|
|
715
746
|
"Remote Extension host terminated unexpectedly 3 times within the last 5 minutes."
|
|
716
747
|
)), [{
|
|
717
|
-
label: ( localize(
|
|
748
|
+
label: ( localize(11483, "Restart Remote Extension Host")),
|
|
718
749
|
run: () => {
|
|
719
|
-
this._startExtensionHostsIfNecessary(false, Array.from((
|
|
750
|
+
this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
|
|
720
751
|
}
|
|
721
752
|
}]);
|
|
722
753
|
}
|
|
@@ -726,13 +757,13 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
726
757
|
}
|
|
727
758
|
_logExtensionHostCrash(extensionHost) {
|
|
728
759
|
const activatedExtensions = [];
|
|
729
|
-
for (const extensionStatus of (
|
|
760
|
+
for (const extensionStatus of ( this._extensionStatus.values())) {
|
|
730
761
|
if (extensionStatus.activationStarted && extensionHost.containsExtension(extensionStatus.id)) {
|
|
731
762
|
activatedExtensions.push(extensionStatus.id);
|
|
732
763
|
}
|
|
733
764
|
}
|
|
734
765
|
if (activatedExtensions.length > 0) {
|
|
735
|
-
this._logService.error(`Extension host (${extensionHost.friendyName}) terminated unexpectedly. The following extensions were running: ${(
|
|
766
|
+
this._logService.error(`Extension host (${extensionHost.friendyName}) terminated unexpectedly. The following extensions were running: ${( activatedExtensions.map(id => id.value)).join(', ')}`);
|
|
736
767
|
}
|
|
737
768
|
else {
|
|
738
769
|
this._logService.error(`Extension host (${extensionHost.friendyName}) terminated unexpectedly. No extensions were activated.`);
|
|
@@ -741,19 +772,19 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
741
772
|
async startExtensionHosts(updates) {
|
|
742
773
|
await this._doStopExtensionHosts();
|
|
743
774
|
if (updates) {
|
|
744
|
-
await this._handleDeltaExtensions((
|
|
775
|
+
await this._handleDeltaExtensions(( new DeltaExtensionsQueueItem(updates.toAdd, updates.toRemove)));
|
|
745
776
|
}
|
|
746
777
|
const lock = await this._registry.acquireLock('startExtensionHosts');
|
|
747
778
|
try {
|
|
748
|
-
this._startExtensionHostsIfNecessary(false, Array.from((
|
|
749
|
-
const localProcessExtensionHosts = this._getExtensionHostManagers(
|
|
750
|
-
await Promise.all((
|
|
779
|
+
this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
|
|
780
|
+
const localProcessExtensionHosts = this._getExtensionHostManagers(ExtensionHostKind.LocalProcess);
|
|
781
|
+
await Promise.all(( localProcessExtensionHosts.map(extHost => extHost.ready())));
|
|
751
782
|
}
|
|
752
783
|
finally {
|
|
753
784
|
lock.dispose();
|
|
754
785
|
}
|
|
755
786
|
}
|
|
756
|
-
activateByEvent(activationEvent, activationKind =
|
|
787
|
+
activateByEvent(activationEvent, activationKind = ActivationKind.Normal) {
|
|
757
788
|
if (this._installedExtensionsReady.isOpen()) {
|
|
758
789
|
this._allRequestedActivateEvents.add(activationEvent);
|
|
759
790
|
if (!this._registry.containsActivationEvent(activationEvent)) {
|
|
@@ -763,16 +794,16 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
763
794
|
}
|
|
764
795
|
else {
|
|
765
796
|
this._allRequestedActivateEvents.add(activationEvent);
|
|
766
|
-
if (activationKind ===
|
|
797
|
+
if (activationKind === ActivationKind.Immediate) {
|
|
767
798
|
return this._activateByEvent(activationEvent, activationKind);
|
|
768
799
|
}
|
|
769
800
|
return this._installedExtensionsReady.wait().then(() => this._activateByEvent(activationEvent, activationKind));
|
|
770
801
|
}
|
|
771
802
|
}
|
|
772
803
|
_activateByEvent(activationEvent, activationKind) {
|
|
773
|
-
const result = Promise.all((
|
|
804
|
+
const result = Promise.all(( this._extensionHostManagers.map(
|
|
774
805
|
extHostManager => extHostManager.activateByEvent(activationEvent, activationKind)
|
|
775
|
-
)))
|
|
806
|
+
))).then(() => { });
|
|
776
807
|
this._onWillActivateByEvent.fire({
|
|
777
808
|
event: activationEvent,
|
|
778
809
|
activation: result
|
|
@@ -811,7 +842,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
811
842
|
const result = [];
|
|
812
843
|
for (const desc of availableExtensions) {
|
|
813
844
|
if (desc.contributes && hasOwnProperty.call(desc.contributes, extPoint.name)) {
|
|
814
|
-
result.push((
|
|
845
|
+
result.push(( new ExtensionPointContribution(desc, desc.contributes[extPoint.name])));
|
|
815
846
|
}
|
|
816
847
|
}
|
|
817
848
|
return result;
|
|
@@ -836,12 +867,12 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
836
867
|
return result;
|
|
837
868
|
}
|
|
838
869
|
async getInspectPorts(extensionHostKind, tryEnableInspector) {
|
|
839
|
-
const result = await Promise.all((
|
|
870
|
+
const result = await Promise.all(( this._getExtensionHostManagers(extensionHostKind).map(extHost => extHost.getInspectPort(tryEnableInspector))));
|
|
840
871
|
return result.filter(isDefined);
|
|
841
872
|
}
|
|
842
873
|
async setRemoteEnvironment(env) {
|
|
843
|
-
await (
|
|
844
|
-
.map(manager => manager.setRemoteEnvironment(env)))
|
|
874
|
+
await ( this._extensionHostManagers
|
|
875
|
+
.map(manager => manager.setRemoteEnvironment(env)));
|
|
845
876
|
}
|
|
846
877
|
_safeInvokeIsEnabled(extension) {
|
|
847
878
|
try {
|
|
@@ -851,7 +882,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
851
882
|
return false;
|
|
852
883
|
}
|
|
853
884
|
}
|
|
854
|
-
_doHandleExtensionPoints(affectedExtensions) {
|
|
885
|
+
_doHandleExtensionPoints(affectedExtensions, onlyResolverExtensionPoints) {
|
|
855
886
|
const affectedExtensionPoints = Object.create(null);
|
|
856
887
|
for (const extensionDescription of affectedExtensions) {
|
|
857
888
|
if (extensionDescription.contributes) {
|
|
@@ -865,19 +896,19 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
865
896
|
const messageHandler = (msg) => this._handleExtensionPointMessage(msg);
|
|
866
897
|
const availableExtensions = this._registry.getAllExtensionDescriptions();
|
|
867
898
|
const extensionPoints = ExtensionsRegistry.getExtensionPoints();
|
|
868
|
-
mark('code/willHandleExtensionPoints');
|
|
899
|
+
mark(onlyResolverExtensionPoints ? 'code/willHandleResolverExtensionPoints' : 'code/willHandleExtensionPoints');
|
|
869
900
|
for (const extensionPoint of extensionPoints) {
|
|
870
|
-
if (affectedExtensionPoints[extensionPoint.name]) {
|
|
901
|
+
if (affectedExtensionPoints[extensionPoint.name] && (!onlyResolverExtensionPoints || extensionPoint.canHandleResolver)) {
|
|
871
902
|
mark(`code/willHandleExtensionPoint/${extensionPoint.name}`);
|
|
872
903
|
AbstractExtensionService_1._handleExtensionPoint(extensionPoint, availableExtensions, messageHandler);
|
|
873
904
|
mark(`code/didHandleExtensionPoint/${extensionPoint.name}`);
|
|
874
905
|
}
|
|
875
906
|
}
|
|
876
|
-
mark('code/didHandleExtensionPoints');
|
|
907
|
+
mark(onlyResolverExtensionPoints ? 'code/didHandleResolverExtensionPoints' : 'code/didHandleExtensionPoints');
|
|
877
908
|
}
|
|
878
909
|
_getOrCreateExtensionStatus(extensionId) {
|
|
879
|
-
if (!(
|
|
880
|
-
this._extensionStatus.set(extensionId, (
|
|
910
|
+
if (!( this._extensionStatus.has(extensionId))) {
|
|
911
|
+
this._extensionStatus.set(extensionId, ( new ExtensionStatus(extensionId)));
|
|
881
912
|
}
|
|
882
913
|
return this._extensionStatus.get(extensionId);
|
|
883
914
|
}
|
|
@@ -886,15 +917,15 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
886
917
|
extensionStatus.addMessage(msg);
|
|
887
918
|
const extension = this._registry.getExtensionDescription(msg.extensionId);
|
|
888
919
|
const strMsg = `[${msg.extensionId.value}]: ${msg.message}`;
|
|
889
|
-
if (msg.type === Severity
|
|
920
|
+
if (msg.type === Severity.Error) {
|
|
890
921
|
if (extension && extension.isUnderDevelopment) {
|
|
891
|
-
this._notificationService.notify({ severity: Severity
|
|
922
|
+
this._notificationService.notify({ severity: Severity.Error, message: strMsg });
|
|
892
923
|
}
|
|
893
924
|
this._logService.error(strMsg);
|
|
894
925
|
}
|
|
895
|
-
else if (msg.type === Severity
|
|
926
|
+
else if (msg.type === Severity.Warning) {
|
|
896
927
|
if (extension && extension.isUnderDevelopment) {
|
|
897
|
-
this._notificationService.notify({ severity: Severity
|
|
928
|
+
this._notificationService.notify({ severity: Severity.Warning, message: strMsg });
|
|
898
929
|
}
|
|
899
930
|
this._logService.warn(strMsg);
|
|
900
931
|
}
|
|
@@ -915,7 +946,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
915
946
|
users.push({
|
|
916
947
|
description: desc,
|
|
917
948
|
value: desc.contributes[extensionPoint.name],
|
|
918
|
-
collector: (
|
|
949
|
+
collector: ( new ExtensionMessageCollector(messageHandler, desc, extensionPoint.name))
|
|
919
950
|
});
|
|
920
951
|
}
|
|
921
952
|
}
|
|
@@ -941,10 +972,10 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
941
972
|
};
|
|
942
973
|
}
|
|
943
974
|
async _activateById(extensionId, reason) {
|
|
944
|
-
const results = await Promise.all((
|
|
945
|
-
const activated = (
|
|
975
|
+
const results = await Promise.all(( this._extensionHostManagers.map(manager => manager.activate(extensionId, reason))));
|
|
976
|
+
const activated = ( results.some(e => e));
|
|
946
977
|
if (!activated) {
|
|
947
|
-
throw (
|
|
978
|
+
throw ( new Error(`Unknown extension ${extensionId.value}`));
|
|
948
979
|
}
|
|
949
980
|
}
|
|
950
981
|
_onWillActivateExtension(extensionId, runningLocation) {
|
|
@@ -954,7 +985,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
954
985
|
}
|
|
955
986
|
_onDidActivateExtension(extensionId, codeLoadingTime, activateCallTime, activateResolvedTime, activationReason) {
|
|
956
987
|
const extensionStatus = this._getOrCreateExtensionStatus(extensionId);
|
|
957
|
-
extensionStatus.setActivationTimes((
|
|
988
|
+
extensionStatus.setActivationTimes(( new ActivationTimes(codeLoadingTime, activateCallTime, activateResolvedTime, activationReason)));
|
|
958
989
|
this._onDidChangeExtensionsStatus.fire([extensionId]);
|
|
959
990
|
}
|
|
960
991
|
_onDidActivateExtensionError(extensionId, error) {
|
|
@@ -969,25 +1000,25 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
969
1000
|
this._onDidChangeExtensionsStatus.fire([extensionId]);
|
|
970
1001
|
}
|
|
971
1002
|
};
|
|
972
|
-
AbstractExtensionService = AbstractExtensionService_1 = (
|
|
973
|
-
(
|
|
974
|
-
(
|
|
975
|
-
(
|
|
976
|
-
(
|
|
977
|
-
(
|
|
978
|
-
(
|
|
979
|
-
(
|
|
980
|
-
(
|
|
981
|
-
(
|
|
982
|
-
(
|
|
983
|
-
(
|
|
984
|
-
(
|
|
985
|
-
(
|
|
986
|
-
(
|
|
987
|
-
(
|
|
988
|
-
(
|
|
989
|
-
(
|
|
990
|
-
], AbstractExtensionService))
|
|
1003
|
+
AbstractExtensionService = AbstractExtensionService_1 = ( __decorate([
|
|
1004
|
+
( __param(4, IInstantiationService)),
|
|
1005
|
+
( __param(5, INotificationService)),
|
|
1006
|
+
( __param(6, IWorkbenchEnvironmentService)),
|
|
1007
|
+
( __param(7, ITelemetryService)),
|
|
1008
|
+
( __param(8, IWorkbenchExtensionEnablementService)),
|
|
1009
|
+
( __param(9, IFileService)),
|
|
1010
|
+
( __param(10, IProductService)),
|
|
1011
|
+
( __param(11, IWorkbenchExtensionManagementService)),
|
|
1012
|
+
( __param(12, IWorkspaceContextService)),
|
|
1013
|
+
( __param(13, IConfigurationService)),
|
|
1014
|
+
( __param(14, IExtensionManifestPropertiesService)),
|
|
1015
|
+
( __param(15, ILogService)),
|
|
1016
|
+
( __param(16, IRemoteAgentService)),
|
|
1017
|
+
( __param(17, IRemoteExtensionsScannerService)),
|
|
1018
|
+
( __param(18, ILifecycleService)),
|
|
1019
|
+
( __param(19, IRemoteAuthorityResolverService)),
|
|
1020
|
+
( __param(20, IDialogService))
|
|
1021
|
+
], AbstractExtensionService));
|
|
991
1022
|
class ExtensionHostCollection extends Disposable {
|
|
992
1023
|
constructor() {
|
|
993
1024
|
super(...arguments);
|
|
@@ -1003,7 +1034,7 @@ class ExtensionHostCollection extends Disposable {
|
|
|
1003
1034
|
super.dispose();
|
|
1004
1035
|
}
|
|
1005
1036
|
add(extensionHostManager, disposableStore) {
|
|
1006
|
-
this._extensionHostManagers.push((
|
|
1037
|
+
this._extensionHostManagers.push(( new ExtensionHostManagerData(extensionHostManager, disposableStore)));
|
|
1007
1038
|
}
|
|
1008
1039
|
async stopAllInReverse() {
|
|
1009
1040
|
for (let i = this._extensionHostManagers.length - 1; i >= 0; i--) {
|
|
@@ -1038,17 +1069,13 @@ class ExtensionHostCollection extends Disposable {
|
|
|
1038
1069
|
}
|
|
1039
1070
|
}
|
|
1040
1071
|
map(callback) {
|
|
1041
|
-
return (
|
|
1042
|
-
(this._extensionHostManagers.map(el => callback(el.extensionHost)))
|
|
1043
|
-
);
|
|
1072
|
+
return ( this._extensionHostManagers.map(el => callback(el.extensionHost)));
|
|
1044
1073
|
}
|
|
1045
1074
|
every(callback) {
|
|
1046
1075
|
return this._extensionHostManagers.every(el => callback(el.extensionHost));
|
|
1047
1076
|
}
|
|
1048
1077
|
filter(callback) {
|
|
1049
|
-
return (
|
|
1050
|
-
(this._extensionHostManagers.filter(el => callback(el.extensionHost)).map(el => el.extensionHost))
|
|
1051
|
-
);
|
|
1078
|
+
return ( this._extensionHostManagers.filter(el => callback(el.extensionHost)).map(el => el.extensionHost));
|
|
1052
1079
|
}
|
|
1053
1080
|
}
|
|
1054
1081
|
class ExtensionHostManagerData {
|
|
@@ -1061,12 +1088,19 @@ class ExtensionHostManagerData {
|
|
|
1061
1088
|
this.extensionHost.dispose();
|
|
1062
1089
|
}
|
|
1063
1090
|
}
|
|
1064
|
-
class
|
|
1065
|
-
constructor(
|
|
1066
|
-
this.
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1091
|
+
class ResolverExtensions {
|
|
1092
|
+
constructor(extensions) {
|
|
1093
|
+
this.extensions = extensions;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
class LocalExtensions {
|
|
1097
|
+
constructor(extensions) {
|
|
1098
|
+
this.extensions = extensions;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
class RemoteExtensions {
|
|
1102
|
+
constructor(extensions) {
|
|
1103
|
+
this.extensions = extensions;
|
|
1070
1104
|
}
|
|
1071
1105
|
}
|
|
1072
1106
|
class DeltaExtensionsQueueItem {
|
|
@@ -1075,6 +1109,9 @@ class DeltaExtensionsQueueItem {
|
|
|
1075
1109
|
this.toRemove = toRemove;
|
|
1076
1110
|
}
|
|
1077
1111
|
}
|
|
1112
|
+
function isResolverExtension(extension) {
|
|
1113
|
+
return !!extension.activationEvents?.some(activationEvent => activationEvent.startsWith('onResolveRemoteAuthority:'));
|
|
1114
|
+
}
|
|
1078
1115
|
function checkEnabledAndProposedAPI(logService, extensionEnablementService, extensionsProposedApi, extensions, ignoreWorkspaceTrust) {
|
|
1079
1116
|
extensionsProposedApi.updateEnabledApiProposals(extensions);
|
|
1080
1117
|
return filterEnabledExtensions(logService, extensionEnablementService, extensions, ignoreWorkspaceTrust);
|
|
@@ -1185,7 +1222,7 @@ class ActivationFeatureMarkdowneRenderer extends Disposable {
|
|
|
1185
1222
|
}
|
|
1186
1223
|
render(manifest) {
|
|
1187
1224
|
const activationEvents = manifest.activationEvents || [];
|
|
1188
|
-
const data = (
|
|
1225
|
+
const data = ( new MarkdownString());
|
|
1189
1226
|
if (activationEvents.length) {
|
|
1190
1227
|
for (const activationEvent of activationEvents) {
|
|
1191
1228
|
data.appendMarkdown(`- \`${activationEvent}\`\n`);
|
|
@@ -1197,13 +1234,13 @@ class ActivationFeatureMarkdowneRenderer extends Disposable {
|
|
|
1197
1234
|
};
|
|
1198
1235
|
}
|
|
1199
1236
|
}
|
|
1200
|
-
(
|
|
1237
|
+
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
1201
1238
|
id: 'activationEvents',
|
|
1202
|
-
label: ( localize(
|
|
1239
|
+
label: ( localize(11484, "Activation Events")),
|
|
1203
1240
|
access: {
|
|
1204
1241
|
canToggle: false
|
|
1205
1242
|
},
|
|
1206
|
-
renderer: (
|
|
1243
|
+
renderer: ( new SyncDescriptor(ActivationFeatureMarkdowneRenderer)),
|
|
1207
1244
|
});
|
|
1208
1245
|
|
|
1209
|
-
export { AbstractExtensionService, DeltaExtensionsQueueItem, ExtensionHostCrashTracker, ExtensionStatus, ImplicitActivationAwareReader,
|
|
1246
|
+
export { AbstractExtensionService, DeltaExtensionsQueueItem, ExtensionHostCrashTracker, ExtensionStatus, ImplicitActivationAwareReader, LocalExtensions, RemoteExtensions, ResolverExtensions, checkEnabledAndProposedAPI, filterEnabledExtensions, isResolverExtension };
|