@codingame/monaco-vscode-extensions-service-override 9.0.3 → 10.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/_virtual/semver.js +5 -0
- package/assets/webWorkerExtensionHostIframe.esm.html +8 -4
- package/extensions.js +14 -5
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +1 -1
- package/package.json +3 -3
- package/vscode/src/vs/base/common/console.js +0 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +35 -35
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +0 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +54 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +9 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +9 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +16 -33
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +2 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +6 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +16 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +38 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +17 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +39 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +23 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +8 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +2 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +14 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +77 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +23 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +17 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +14 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +11 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +22 -10
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +1 -2
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +30 -33
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +19 -24
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +11 -15
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +32 -32
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +7 -8
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +2 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +5 -5
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +7 -9
|
@@ -4,13 +4,11 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
|
4
4
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
5
5
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
6
6
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
7
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
8
7
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
8
|
import { getLogs } from 'vscode/vscode/vs/platform/log/browser/log';
|
|
10
9
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
11
10
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
12
11
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
13
|
-
import { PersistentConnectionEventType } from 'vscode/vscode/vs/platform/remote/common/remoteAgentConnection';
|
|
14
12
|
import { RemoteAuthorityResolverError } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
15
13
|
import { IRemoteAuthorityResolverService } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver.service';
|
|
16
14
|
import { IRemoteExtensionsScannerService } from 'vscode/vscode/vs/platform/remote/common/remoteExtensionsScanner.service';
|
|
@@ -22,14 +20,13 @@ import { IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementServ
|
|
|
22
20
|
import { WebWorkerExtensionHost } from './webWorkerExtensionHost.js';
|
|
23
21
|
import { FetchFileSystemProvider } from './webWorkerFileSystemProvider.js';
|
|
24
22
|
import { AbstractExtensionService, ResolvedExtensions, checkEnabledAndProposedAPI } from '../common/abstractExtensionService.js';
|
|
25
|
-
import {
|
|
23
|
+
import { extensionRunningPreferenceToString, extensionHostKindToString } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostKind';
|
|
26
24
|
import { IExtensionManifestPropertiesService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
|
|
27
25
|
import { filterExtensionDescriptions } from '../common/extensionRunningLocationTracker.js';
|
|
28
|
-
import { toExtensionDescription,
|
|
26
|
+
import { toExtensionDescription, ExtensionHostExtensions } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
29
27
|
import '../common/extensionsProposedApi.js';
|
|
30
28
|
import { dedupExtensions } from '../common/extensionsUtil.js';
|
|
31
29
|
import { RemoteExtensionHost } from '../common/remoteExtensionHost.js';
|
|
32
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
33
30
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
34
31
|
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
35
32
|
import { IRemoteExplorerService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService.service';
|
|
@@ -46,7 +43,7 @@ let ExtensionService = class ExtensionService extends AbstractExtensionService {
|
|
|
46
43
|
this._userDataProfileService = _userDataProfileService;
|
|
47
44
|
this._workspaceTrustManagementService = _workspaceTrustManagementService;
|
|
48
45
|
this._remoteExplorerService = _remoteExplorerService;
|
|
49
|
-
lifecycleService.when(
|
|
46
|
+
lifecycleService.when(2 ).then(async () => {
|
|
50
47
|
await this._userDataInitializationService.initializeInstalledExtensions(this._instantiationService);
|
|
51
48
|
this._initialize();
|
|
52
49
|
});
|
|
@@ -105,7 +102,7 @@ let ExtensionService = class ExtensionService extends AbstractExtensionService {
|
|
|
105
102
|
const connection = this._remoteAgentService.getConnection();
|
|
106
103
|
if (connection) {
|
|
107
104
|
connection.onDidStateChange(async (e) => {
|
|
108
|
-
if (e.type ===
|
|
105
|
+
if (e.type === 0 ) {
|
|
109
106
|
this._remoteAuthorityResolverService._clearResolvedAuthority(remoteAuthority);
|
|
110
107
|
}
|
|
111
108
|
});
|
|
@@ -121,7 +118,7 @@ let ExtensionService = class ExtensionService extends AbstractExtensionService {
|
|
|
121
118
|
}
|
|
122
119
|
}
|
|
123
120
|
async _resolveAuthority(remoteAuthority) {
|
|
124
|
-
return this._resolveAuthorityOnExtensionHosts(
|
|
121
|
+
return this._resolveAuthorityOnExtensionHosts(2 , remoteAuthority);
|
|
125
122
|
}
|
|
126
123
|
};
|
|
127
124
|
ExtensionService = ( __decorate([
|
|
@@ -161,16 +158,14 @@ let BrowserExtensionHostFactory = class BrowserExtensionHostFactory {
|
|
|
161
158
|
}
|
|
162
159
|
createExtensionHost(runningLocations, runningLocation, isInitialStart) {
|
|
163
160
|
switch (runningLocation.kind) {
|
|
164
|
-
case
|
|
161
|
+
case 1 : {
|
|
165
162
|
return null;
|
|
166
163
|
}
|
|
167
|
-
case
|
|
168
|
-
const startup = (isInitialStart
|
|
169
|
-
? ExtensionHostStartup.EagerManualStart
|
|
170
|
-
: ExtensionHostStartup.EagerAutoStart);
|
|
164
|
+
case 2 : {
|
|
165
|
+
const startup = ((isInitialStart ? 2 : 1) );
|
|
171
166
|
return this._instantiationService.createInstance(WebWorkerExtensionHost, runningLocation, startup, this._createLocalExtensionHostDataProvider(runningLocations, runningLocation, isInitialStart));
|
|
172
167
|
}
|
|
173
|
-
case
|
|
168
|
+
case 3 : {
|
|
174
169
|
const remoteAgentConnection = this._remoteAgentService.getConnection();
|
|
175
170
|
if (remoteAgentConnection) {
|
|
176
171
|
return this._instantiationService.createInstance(RemoteExtensionHost, runningLocation, this._createRemoteExtensionHostDataProvider(runningLocations, remoteAgentConnection.remoteAuthority));
|
|
@@ -207,7 +202,7 @@ let BrowserExtensionHostFactory = class BrowserExtensionHostFactory {
|
|
|
207
202
|
if (!remoteEnv) {
|
|
208
203
|
throw ( new Error('Cannot provide init data for remote extension host!'));
|
|
209
204
|
}
|
|
210
|
-
const myExtensions = runningLocations.filterByExtensionHostKind(snapshot.extensions,
|
|
205
|
+
const myExtensions = runningLocations.filterByExtensionHostKind(snapshot.extensions, 3 );
|
|
211
206
|
const extensions = ( new ExtensionHostExtensions(snapshot.versionId, snapshot.extensions, ( myExtensions.map(extension => extension.identifier))));
|
|
212
207
|
return {
|
|
213
208
|
connectionData: this._remoteAuthorityResolverService.getConnectionData(remoteAuthority),
|
|
@@ -243,32 +238,32 @@ let BrowserExtensionHostKindPicker = BrowserExtensionHostKindPicker_1 = class Br
|
|
|
243
238
|
let canRunRemotely = false;
|
|
244
239
|
for (const extensionKind of extensionKinds) {
|
|
245
240
|
if (extensionKind === 'ui' && isInstalledRemotely) {
|
|
246
|
-
if (preference ===
|
|
247
|
-
return
|
|
241
|
+
if (preference === 2 ) {
|
|
242
|
+
return 3 ;
|
|
248
243
|
}
|
|
249
244
|
else {
|
|
250
245
|
canRunRemotely = true;
|
|
251
246
|
}
|
|
252
247
|
}
|
|
253
248
|
if (extensionKind === 'workspace' && isInstalledRemotely) {
|
|
254
|
-
if (preference ===
|
|
255
|
-
return
|
|
249
|
+
if (preference === 0 || preference === 2 ) {
|
|
250
|
+
return 3 ;
|
|
256
251
|
}
|
|
257
252
|
else {
|
|
258
|
-
result.push(
|
|
253
|
+
result.push(3 );
|
|
259
254
|
}
|
|
260
255
|
}
|
|
261
256
|
if (extensionKind === 'web' && (isInstalledLocally || isInstalledRemotely)) {
|
|
262
|
-
if (preference ===
|
|
263
|
-
return
|
|
257
|
+
if (preference === 0 || preference === 1 ) {
|
|
258
|
+
return 2 ;
|
|
264
259
|
}
|
|
265
260
|
else {
|
|
266
|
-
result.push(
|
|
261
|
+
result.push(2 );
|
|
267
262
|
}
|
|
268
263
|
}
|
|
269
264
|
}
|
|
270
265
|
if (canRunRemotely) {
|
|
271
|
-
result.push(
|
|
266
|
+
result.push(3 );
|
|
272
267
|
}
|
|
273
268
|
return (result.length > 0 ? result[0] : null);
|
|
274
269
|
}
|
|
@@ -2,7 +2,6 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { addDisposableListener } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
3
|
import { parentOriginHash } from 'vscode/vscode/vs/base/browser/iframe';
|
|
4
4
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
5
|
-
import 'vscode/vscode/vs/base/common/amd';
|
|
6
5
|
import { Barrier } from 'vscode/vscode/vs/base/common/async';
|
|
7
6
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
8
7
|
import { onUnexpectedError, canceled } from 'vscode/vscode/vs/base/common/errors';
|
|
@@ -18,16 +17,13 @@ import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.serv
|
|
|
18
17
|
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService.service';
|
|
19
18
|
import { ILogService, ILoggerService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
20
19
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
21
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
22
20
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
23
21
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
24
22
|
import { isLoggingOnly } from 'vscode/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
25
23
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
26
|
-
import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
27
24
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
28
25
|
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
29
|
-
import {
|
|
30
|
-
import { ExtensionHostStartup } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
26
|
+
import { isMessageOfType, createMessageOfType, UIKind } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostProtocol';
|
|
31
27
|
import { getNLSMessages, getNLSLanguage } from 'vscode/vscode/vs/nls.messages';
|
|
32
28
|
|
|
33
29
|
let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
@@ -70,10 +66,10 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
70
66
|
const quality = this._productService.quality;
|
|
71
67
|
if (webEndpointUrlTemplate && commit && quality) {
|
|
72
68
|
const key = 'webWorkerExtensionHostIframeStableOriginUUID';
|
|
73
|
-
let stableOriginUUID = this._storageService.get(key,
|
|
69
|
+
let stableOriginUUID = this._storageService.get(key, 1 );
|
|
74
70
|
if (typeof stableOriginUUID === 'undefined') {
|
|
75
71
|
stableOriginUUID = generateUuid();
|
|
76
|
-
this._storageService.store(key, stableOriginUUID,
|
|
72
|
+
this._storageService.store(key, stableOriginUUID, 1 , 1 );
|
|
77
73
|
}
|
|
78
74
|
const hash = await parentOriginHash(mainWindow.origin, stableOriginUUID);
|
|
79
75
|
const baseUrl = (webEndpointUrlTemplate
|
|
@@ -117,7 +113,7 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
117
113
|
barrierHasError = true;
|
|
118
114
|
onUnexpectedError(barrierError);
|
|
119
115
|
clearTimeout(startTimeout);
|
|
120
|
-
this._onDidExit.fire([
|
|
116
|
+
this._onDidExit.fire([81 , barrierError.message]);
|
|
121
117
|
barrier.open();
|
|
122
118
|
};
|
|
123
119
|
const resolveBarrier = (messagePort) => {
|
|
@@ -141,7 +137,7 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
141
137
|
err.message = message;
|
|
142
138
|
err.name = name;
|
|
143
139
|
err.stack = stack;
|
|
144
|
-
return rejectBarrier(
|
|
140
|
+
return rejectBarrier(81 , err);
|
|
145
141
|
}
|
|
146
142
|
if (event.data.type === 'vscode.bootstrap.nls') {
|
|
147
143
|
const baseUrl = undefined ;
|
|
@@ -163,7 +159,7 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
163
159
|
if (barrier.isOpen() || !(data instanceof MessagePort)) {
|
|
164
160
|
console.warn('UNEXPECTED message', event);
|
|
165
161
|
const err = ( new Error('UNEXPECTED message'));
|
|
166
|
-
return rejectBarrier(
|
|
162
|
+
return rejectBarrier(81 , err);
|
|
167
163
|
}
|
|
168
164
|
resolveBarrier(data);
|
|
169
165
|
}));
|
|
@@ -194,7 +190,7 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
194
190
|
return this._performHandshake(protocol);
|
|
195
191
|
}
|
|
196
192
|
async _performHandshake(protocol) {
|
|
197
|
-
await Event.toPromise(Event.filter(protocol.onMessage, msg => isMessageOfType(msg,
|
|
193
|
+
await Event.toPromise(Event.filter(protocol.onMessage, msg => isMessageOfType(msg, 1 )));
|
|
198
194
|
if (this._isTerminating) {
|
|
199
195
|
throw canceled();
|
|
200
196
|
}
|
|
@@ -202,7 +198,7 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
202
198
|
if (this._isTerminating) {
|
|
203
199
|
throw canceled();
|
|
204
200
|
}
|
|
205
|
-
await Event.toPromise(Event.filter(protocol.onMessage, msg => isMessageOfType(msg,
|
|
201
|
+
await Event.toPromise(Event.filter(protocol.onMessage, msg => isMessageOfType(msg, 0 )));
|
|
206
202
|
if (this._isTerminating) {
|
|
207
203
|
throw canceled();
|
|
208
204
|
}
|
|
@@ -213,7 +209,7 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
213
209
|
return;
|
|
214
210
|
}
|
|
215
211
|
this._isTerminating = true;
|
|
216
|
-
this._protocol?.send(createMessageOfType(
|
|
212
|
+
this._protocol?.send(createMessageOfType(2 ));
|
|
217
213
|
super.dispose();
|
|
218
214
|
}
|
|
219
215
|
getInspectPort() {
|
|
@@ -250,7 +246,7 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
250
246
|
workspaceStorageHome: this._environmentService.workspaceStorageHome,
|
|
251
247
|
extensionLogLevel: this._environmentService.extensionLogLevel
|
|
252
248
|
},
|
|
253
|
-
workspace: this._contextService.getWorkbenchState() ===
|
|
249
|
+
workspace: this._contextService.getWorkbenchState() === 1 ? undefined : {
|
|
254
250
|
configuration: workspace.configuration || undefined,
|
|
255
251
|
id: workspace.id,
|
|
256
252
|
name: this._labelService.getWorkspaceLabel(workspace),
|
|
@@ -273,7 +269,7 @@ let WebWorkerExtensionHost = class WebWorkerExtensionHost extends Disposable {
|
|
|
273
269
|
logLevel: this._logService.getLevel(),
|
|
274
270
|
loggers: [...this._loggerService.getRegisteredLoggers()],
|
|
275
271
|
logsLocation: this._extensionHostLogsLocation,
|
|
276
|
-
autoStart: (this.startup ===
|
|
272
|
+
autoStart: ((this.startup === 1) ),
|
|
277
273
|
remote: {
|
|
278
274
|
authority: this._environmentService.remoteAuthority,
|
|
279
275
|
connectionData: null,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createFileSystemProviderError, FileSystemProviderErrorCode, FileType } from 'vscode/vscode/vs/platform/files/common/files';
|
|
2
2
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { NotSupportedError } from 'vscode/vscode/vs/base/common/errors';
|
|
5
5
|
|
|
6
6
|
class FetchFileSystemProvider {
|
|
7
7
|
constructor() {
|
|
8
|
-
this.capabilities =
|
|
8
|
+
this.capabilities = 2048 + 2 + 1024 ;
|
|
9
9
|
this.onDidChangeCapabilities = Event.None;
|
|
10
10
|
this.onDidChangeFile = Event.None;
|
|
11
11
|
}
|
|
@@ -13,7 +13,6 @@ import { isDefined } from 'vscode/vscode/vs/base/common/types';
|
|
|
13
13
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
14
14
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
15
15
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
16
|
-
import { InstallOperation } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
17
16
|
import { ImplicitActivationEvents } from 'vscode/vscode/vs/platform/extensionManagement/common/implicitActivationEvents';
|
|
18
17
|
import { ExtensionIdentifierMap, ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
19
18
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
@@ -35,15 +34,13 @@ import { Extensions } from 'vscode/vscode/vs/workbench/services/extensionManagem
|
|
|
35
34
|
import { IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
36
35
|
import { LockableExtensionDescriptionRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionDescriptionRegistry';
|
|
37
36
|
import { parseExtensionDevOptions } from './extensionDevOptions.js';
|
|
38
|
-
import { ExtensionRunningPreference, ExtensionHostKind } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostKind';
|
|
39
37
|
import { ExtensionHostManager } from './extensionHostManager.js';
|
|
40
38
|
import { IExtensionManifestPropertiesService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
|
|
41
39
|
import { RemoteRunningLocation, LocalProcessRunningLocation, LocalWebWorkerRunningLocation } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionRunningLocation';
|
|
42
40
|
import { ExtensionRunningLocationTracker, filterExtensionIdentifiers } from './extensionRunningLocationTracker.js';
|
|
43
|
-
import { toExtensionDescription,
|
|
41
|
+
import { toExtensionDescription, ExtensionPointContribution, ActivationTimes, toExtension } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
44
42
|
import { ExtensionsRegistry, ExtensionMessageCollector } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
45
43
|
import { LazyCreateExtensionHostManager } from './lazyCreateExtensionHostManager.js';
|
|
46
|
-
import { ResponsiveState } from 'vscode/vscode/vs/workbench/services/extensions/common/rpcProtocol';
|
|
47
44
|
import { checkGlobFileExists, checkActivateWorkspaceContainsExtension } from 'vscode/vscode/vs/workbench/services/extensions/common/workspaceContains';
|
|
48
45
|
import { WillShutdownJoinerOrder } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
49
46
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
@@ -146,7 +143,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
146
143
|
this._register(this._extensionManagementService.onDidInstallExtensions((result) => {
|
|
147
144
|
const extensions = [];
|
|
148
145
|
for (const { local, operation } of result) {
|
|
149
|
-
if (local && local.isValid && operation !==
|
|
146
|
+
if (local && local.isValid && operation !== 4 && this._safeInvokeIsEnabled(local)) {
|
|
150
147
|
extensions.push(local);
|
|
151
148
|
}
|
|
152
149
|
}
|
|
@@ -173,14 +170,14 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
173
170
|
this._remoteAgentService.getConnection()?.dispose();
|
|
174
171
|
}, {
|
|
175
172
|
id: 'join.disconnectRemote',
|
|
176
|
-
label: ( localize(
|
|
173
|
+
label: ( localize(1143, "Disconnect Remote Agent")),
|
|
177
174
|
order: WillShutdownJoinerOrder.Last
|
|
178
175
|
});
|
|
179
176
|
}
|
|
180
177
|
else {
|
|
181
178
|
event.join(this._doStopExtensionHosts(), {
|
|
182
179
|
id: 'join.stopExtensionHosts',
|
|
183
|
-
label: ( localize(
|
|
180
|
+
label: ( localize(1144, "Stopping Extension Hosts")),
|
|
184
181
|
});
|
|
185
182
|
}
|
|
186
183
|
}));
|
|
@@ -251,7 +248,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
251
248
|
this._notificationService.notify({
|
|
252
249
|
severity: Severity$1.Error,
|
|
253
250
|
message: ( localize(
|
|
254
|
-
|
|
251
|
+
1145,
|
|
255
252
|
"The following extensions contain dependency loops and have been disabled: {0}",
|
|
256
253
|
( (result.removedDueToLooping.map(e => `'${e.identifier.value}'`))).join(', ')
|
|
257
254
|
))
|
|
@@ -297,7 +294,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
297
294
|
}
|
|
298
295
|
const extensionKinds = this._runningLocations.readExtensionKinds(extension);
|
|
299
296
|
const isRemote = extension.extensionLocation.scheme === Schemas.vscodeRemote;
|
|
300
|
-
const extensionHostKind = this._extensionHostKindPicker.pickExtensionHostKind(extension.identifier, extensionKinds, !isRemote, isRemote,
|
|
297
|
+
const extensionHostKind = this._extensionHostKindPicker.pickExtensionHostKind(extension.identifier, extensionKinds, !isRemote, isRemote, 0 );
|
|
301
298
|
if (extensionHostKind === null) {
|
|
302
299
|
return false;
|
|
303
300
|
}
|
|
@@ -371,7 +368,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
371
368
|
this._processExtensions(lock, resolvedExtensions);
|
|
372
369
|
const snapshot = this._registry.getSnapshot();
|
|
373
370
|
for (const extHostManager of this._extensionHostManagers) {
|
|
374
|
-
if (extHostManager.startup !==
|
|
371
|
+
if (extHostManager.startup !== 1 ) {
|
|
375
372
|
const extensions = this._runningLocations.filterByExtensionHostManager(snapshot.extensions, extHostManager);
|
|
376
373
|
extHostManager.start(snapshot.versionId, snapshot.extensions, ( (extensions.map(extension => extension.identifier))));
|
|
377
374
|
}
|
|
@@ -390,10 +387,10 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
390
387
|
let remoteExtensions = checkEnabledAndProposedAPI(this._logService, this._extensionEnablementService, this._extensionsProposedApi, resolvedExtensions.remote, false);
|
|
391
388
|
this._runningLocations.initializeRunningLocation(localExtensions, remoteExtensions);
|
|
392
389
|
this._startExtensionHostsIfNecessary(true, []);
|
|
393
|
-
const remoteExtensionsThatNeedToRunLocally = (allowRemoteExtensionsInLocalWebWorker ? this._runningLocations.filterByExtensionHostKind(remoteExtensions,
|
|
394
|
-
const localProcessExtensions = (hasLocalProcess ? this._runningLocations.filterByExtensionHostKind(localExtensions,
|
|
395
|
-
const localWebWorkerExtensions = this._runningLocations.filterByExtensionHostKind(localExtensions,
|
|
396
|
-
remoteExtensions = this._runningLocations.filterByExtensionHostKind(remoteExtensions,
|
|
390
|
+
const remoteExtensionsThatNeedToRunLocally = (allowRemoteExtensionsInLocalWebWorker ? this._runningLocations.filterByExtensionHostKind(remoteExtensions, 2 ) : []);
|
|
391
|
+
const localProcessExtensions = (hasLocalProcess ? this._runningLocations.filterByExtensionHostKind(localExtensions, 1 ) : []);
|
|
392
|
+
const localWebWorkerExtensions = this._runningLocations.filterByExtensionHostKind(localExtensions, 2 );
|
|
393
|
+
remoteExtensions = this._runningLocations.filterByExtensionHostKind(remoteExtensions, 3 );
|
|
397
394
|
for (const ext of remoteExtensionsThatNeedToRunLocally) {
|
|
398
395
|
if (!includes(localWebWorkerExtensions, ext.identifier)) {
|
|
399
396
|
localWebWorkerExtensions.push(ext);
|
|
@@ -405,7 +402,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
405
402
|
this._notificationService.notify({
|
|
406
403
|
severity: Severity$1.Error,
|
|
407
404
|
message: ( localize(
|
|
408
|
-
|
|
405
|
+
1145,
|
|
409
406
|
"The following extensions contain dependency loops and have been disabled: {0}",
|
|
410
407
|
( (result.removedDueToLooping.map(e => `'${e.identifier.value}'`))).join(', ')
|
|
411
408
|
))
|
|
@@ -420,7 +417,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
420
417
|
const extensionHostManager = this.findTestExtensionHost(this._environmentService.extensionTestsLocationURI);
|
|
421
418
|
if (!extensionHostManager) {
|
|
422
419
|
const msg = ( localize(
|
|
423
|
-
|
|
420
|
+
1146,
|
|
424
421
|
"No extension host found that can launch the test runner at {0}.",
|
|
425
422
|
(this._environmentService.extensionTestsLocationURI.toString())
|
|
426
423
|
));
|
|
@@ -569,6 +566,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
569
566
|
}
|
|
570
567
|
}
|
|
571
568
|
async _doStopExtensionHostsWithVeto(reason, auto = false) {
|
|
569
|
+
if (auto && this._environmentService.isExtensionDevelopment) {
|
|
570
|
+
return false;
|
|
571
|
+
}
|
|
572
572
|
const vetos = [];
|
|
573
573
|
const vetoReasons = ( (new Set()));
|
|
574
574
|
this._onWillStop.fire({
|
|
@@ -587,7 +587,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
587
587
|
vetoReasons.add(reason);
|
|
588
588
|
}
|
|
589
589
|
}).catch(error => {
|
|
590
|
-
vetoReasons.add(( localize(
|
|
590
|
+
vetoReasons.add(( localize(1147, "{0} (Error: {1})", reason, toErrorMessage(error))));
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
593
|
}
|
|
@@ -600,10 +600,10 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
600
600
|
if (!auto) {
|
|
601
601
|
const vetoReasonsArray = Array.from(vetoReasons);
|
|
602
602
|
this._logService.warn(`Extension host was not stopped because of veto (stop reason: ${reason}, veto reason: ${vetoReasonsArray.join(', ')})`);
|
|
603
|
-
await this._dialogService.warn(( localize(
|
|
604
|
-
( localize(
|
|
603
|
+
await this._dialogService.warn(( localize(1148, "The following operation was blocked: {0}", reason)), vetoReasonsArray.length === 1 ?
|
|
604
|
+
( localize(1149, "The reason for blocking the operation: {0}", vetoReasonsArray[0])) :
|
|
605
605
|
( localize(
|
|
606
|
-
|
|
606
|
+
1150,
|
|
607
607
|
"The reasons for blocking the operation:\n- {0}",
|
|
608
608
|
vetoReasonsArray.join('\n -')
|
|
609
609
|
)));
|
|
@@ -640,10 +640,10 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
640
640
|
const disposableStore = ( (new DisposableStore()));
|
|
641
641
|
disposableStore.add(processManager.onDidExit(([code, signal]) => this._onExtensionHostCrashOrExit(processManager, code, signal)));
|
|
642
642
|
disposableStore.add(processManager.onDidChangeResponsiveState((responsiveState) => {
|
|
643
|
-
this._logService.info(`Extension host (${processManager.friendyName}) is ${responsiveState ===
|
|
643
|
+
this._logService.info(`Extension host (${processManager.friendyName}) is ${responsiveState === 0 ? 'responsive' : 'unresponsive'}.`);
|
|
644
644
|
this._onDidChangeResponsiveChange.fire({
|
|
645
645
|
extensionHostKind: processManager.kind,
|
|
646
|
-
isResponsive: responsiveState ===
|
|
646
|
+
isResponsive: responsiveState === 0 ,
|
|
647
647
|
getInspectListener: (tryEnableInspector) => {
|
|
648
648
|
return processManager.getInspectPort(tryEnableInspector);
|
|
649
649
|
}
|
|
@@ -653,7 +653,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
653
653
|
}
|
|
654
654
|
_doCreateExtensionHostManager(extensionHost, initialActivationEvents) {
|
|
655
655
|
const internalExtensionService = this._acquireInternalAPI(extensionHost);
|
|
656
|
-
if (extensionHost.startup ===
|
|
656
|
+
if (extensionHost.startup === 3 && initialActivationEvents.length === 0) {
|
|
657
657
|
return this._instantiationService.createInstance(LazyCreateExtensionHostManager, extensionHost, internalExtensionService);
|
|
658
658
|
}
|
|
659
659
|
return this._instantiationService.createInstance(ExtensionHostManager, extensionHost, initialActivationEvents, internalExtensionService);
|
|
@@ -668,10 +668,10 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
668
668
|
}
|
|
669
669
|
_onExtensionHostCrashed(extensionHost, code, signal) {
|
|
670
670
|
console.error(`Extension host (${extensionHost.friendyName}) terminated unexpectedly. Code: ${code}, Signal: ${signal}`);
|
|
671
|
-
if (extensionHost.kind ===
|
|
671
|
+
if (extensionHost.kind === 1 ) {
|
|
672
672
|
this._doStopExtensionHosts();
|
|
673
673
|
}
|
|
674
|
-
else if (extensionHost.kind ===
|
|
674
|
+
else if (extensionHost.kind === 3 ) {
|
|
675
675
|
if (signal) {
|
|
676
676
|
this._onRemoteExtensionHostCrashed(extensionHost, signal);
|
|
677
677
|
}
|
|
@@ -701,15 +701,15 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
701
701
|
this._remoteCrashTracker.registerCrash();
|
|
702
702
|
if (this._remoteCrashTracker.shouldAutomaticallyRestart()) {
|
|
703
703
|
this._logService.info(`Automatically restarting the remote extension host.`);
|
|
704
|
-
this._notificationService.status(( localize(
|
|
704
|
+
this._notificationService.status(( localize(1151, "The remote extension host terminated unexpectedly. Restarting...")), { hideAfter: 5000 });
|
|
705
705
|
this._startExtensionHostsIfNecessary(false, Array.from(( (this._allRequestedActivateEvents.keys()))));
|
|
706
706
|
}
|
|
707
707
|
else {
|
|
708
708
|
this._notificationService.prompt(Severity$1.Error, ( localize(
|
|
709
|
-
|
|
709
|
+
1152,
|
|
710
710
|
"Remote Extension host terminated unexpectedly 3 times within the last 5 minutes."
|
|
711
711
|
)), [{
|
|
712
|
-
label: ( localize(
|
|
712
|
+
label: ( localize(1153, "Restart Remote Extension Host")),
|
|
713
713
|
run: () => {
|
|
714
714
|
this._startExtensionHostsIfNecessary(false, Array.from(( (this._allRequestedActivateEvents.keys()))));
|
|
715
715
|
}
|
|
@@ -741,14 +741,14 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
741
741
|
const lock = await this._registry.acquireLock('startExtensionHosts');
|
|
742
742
|
try {
|
|
743
743
|
this._startExtensionHostsIfNecessary(false, Array.from(( (this._allRequestedActivateEvents.keys()))));
|
|
744
|
-
const localProcessExtensionHosts = this._getExtensionHostManagers(
|
|
744
|
+
const localProcessExtensionHosts = this._getExtensionHostManagers(1 );
|
|
745
745
|
await Promise.all(( (localProcessExtensionHosts.map(extHost => extHost.ready()))));
|
|
746
746
|
}
|
|
747
747
|
finally {
|
|
748
748
|
lock.dispose();
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
activateByEvent(activationEvent, activationKind =
|
|
751
|
+
activateByEvent(activationEvent, activationKind = 0 ) {
|
|
752
752
|
if (this._installedExtensionsReady.isOpen()) {
|
|
753
753
|
this._allRequestedActivateEvents.add(activationEvent);
|
|
754
754
|
if (!this._registry.containsActivationEvent(activationEvent)) {
|
|
@@ -758,7 +758,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
758
758
|
}
|
|
759
759
|
else {
|
|
760
760
|
this._allRequestedActivateEvents.add(activationEvent);
|
|
761
|
-
if (activationKind ===
|
|
761
|
+
if (activationKind === 1 ) {
|
|
762
762
|
return this._activateByEvent(activationEvent, activationKind);
|
|
763
763
|
}
|
|
764
764
|
return this._installedExtensionsReady.wait().then(() => this._activateByEvent(activationEvent, activationKind));
|
|
@@ -1194,7 +1194,7 @@ class ActivationFeatureMarkdowneRenderer extends Disposable {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
( (Registry.as(Extensions.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
1196
1196
|
id: 'activationEvents',
|
|
1197
|
-
label: ( localize(
|
|
1197
|
+
label: ( localize(1154, "Activation Events")),
|
|
1198
1198
|
access: {
|
|
1199
1199
|
canToggle: false
|
|
1200
1200
|
},
|
|
@@ -16,8 +16,7 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
16
16
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
17
17
|
import { ExtHostCustomersRegistry } from './extHostCustomers.js';
|
|
18
18
|
import { extensionHostKindToString } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostKind';
|
|
19
|
-
import {
|
|
20
|
-
import { RPCProtocol, RequestInitiator } from 'vscode/vscode/vs/workbench/services/extensions/common/rpcProtocol';
|
|
19
|
+
import { RPCProtocol } from 'vscode/vscode/vs/workbench/services/extensions/common/rpcProtocol';
|
|
21
20
|
|
|
22
21
|
var ExtensionHostManager_1;
|
|
23
22
|
let ExtensionHostManager = ExtensionHostManager_1 = class ExtensionHostManager extends Disposable {
|
|
@@ -85,7 +84,7 @@ let ExtensionHostManager = ExtensionHostManager_1 = class ExtensionHostManager e
|
|
|
85
84
|
return null;
|
|
86
85
|
});
|
|
87
86
|
this._proxy.then(() => {
|
|
88
|
-
initialActivationEvents.forEach((activationEvent) => this.activateByEvent(activationEvent,
|
|
87
|
+
initialActivationEvents.forEach((activationEvent) => this.activateByEvent(activationEvent, 0 ));
|
|
89
88
|
this._register(registerLatencyTestProvider({
|
|
90
89
|
measure: () => this.measure()
|
|
91
90
|
}));
|
|
@@ -227,7 +226,7 @@ let ExtensionHostManager = ExtensionHostManager_1 = class ExtensionHostManager e
|
|
|
227
226
|
return proxy.activate(extension, reason);
|
|
228
227
|
}
|
|
229
228
|
activateByEvent(activationEvent, activationKind) {
|
|
230
|
-
if (activationKind ===
|
|
229
|
+
if (activationKind === 1 && !this._hasStarted) {
|
|
231
230
|
return Promise.resolve();
|
|
232
231
|
}
|
|
233
232
|
if (!( (this._cachedActivationEvents.has(activationEvent)))) {
|
|
@@ -433,7 +432,7 @@ let TelemetryRPCLogger = class TelemetryRPCLogger {
|
|
|
433
432
|
this._pendingRequests = ( (new Map()));
|
|
434
433
|
}
|
|
435
434
|
logIncoming(msgLength, req, initiator, str) {
|
|
436
|
-
if (initiator ===
|
|
435
|
+
if (initiator === 0 && /^receiveReply(Err)?:/.test(str)) {
|
|
437
436
|
const requestStr = this._pendingRequests.get(req) ?? 'unknown_reply';
|
|
438
437
|
this._pendingRequests.delete(req);
|
|
439
438
|
this._telemetryService.publicLog2('extensionhost.incoming', {
|
|
@@ -441,7 +440,7 @@ let TelemetryRPCLogger = class TelemetryRPCLogger {
|
|
|
441
440
|
length: msgLength
|
|
442
441
|
});
|
|
443
442
|
}
|
|
444
|
-
if (initiator ===
|
|
443
|
+
if (initiator === 1 && /^receiveRequest /.test(str)) {
|
|
445
444
|
this._telemetryService.publicLog2('extensionhost.incoming', {
|
|
446
445
|
type: `${str}`,
|
|
447
446
|
length: msgLength
|
|
@@ -449,7 +448,7 @@ let TelemetryRPCLogger = class TelemetryRPCLogger {
|
|
|
449
448
|
}
|
|
450
449
|
}
|
|
451
450
|
logOutgoing(msgLength, req, initiator, str) {
|
|
452
|
-
if (initiator ===
|
|
451
|
+
if (initiator === 0 && str.startsWith('request: ')) {
|
|
453
452
|
this._pendingRequests.set(req, str);
|
|
454
453
|
this._telemetryService.publicLog2('extensionhost.outgoing', {
|
|
455
454
|
type: str,
|
|
@@ -482,7 +481,7 @@ registerAction2(class MeasureExtHostLatencyAction extends Action2 {
|
|
|
482
481
|
constructor() {
|
|
483
482
|
super({
|
|
484
483
|
id: 'editor.action.measureExtHostLatency',
|
|
485
|
-
title: ( localize2(
|
|
484
|
+
title: ( localize2(4829, "Measure Extension Host Latency")),
|
|
486
485
|
category: Categories.Developer,
|
|
487
486
|
f1: true
|
|
488
487
|
});
|
package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js
CHANGED
|
@@ -4,7 +4,7 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
|
|
|
4
4
|
import { ExtensionIdentifierMap } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
5
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
6
6
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
7
|
-
import { determineExtensionHostKinds
|
|
7
|
+
import { determineExtensionHostKinds } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostKind';
|
|
8
8
|
import { IExtensionManifestPropertiesService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
|
|
9
9
|
import { RemoteRunningLocation, LocalProcessRunningLocation, LocalWebWorkerRunningLocation } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionRunningLocation';
|
|
10
10
|
|
|
@@ -171,29 +171,29 @@ let ExtensionRunningLocationTracker = class ExtensionRunningLocationTracker {
|
|
|
171
171
|
const localWebWorkerExtensions = [];
|
|
172
172
|
for (const [extensionIdKey, extensionHostKind] of extensionHostKinds) {
|
|
173
173
|
let runningLocation = null;
|
|
174
|
-
if (extensionHostKind ===
|
|
174
|
+
if (extensionHostKind === 1 ) {
|
|
175
175
|
const extensionDescription = extensions.get(extensionIdKey);
|
|
176
176
|
if (extensionDescription) {
|
|
177
177
|
localProcessExtensions.push(extensionDescription);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
else if (extensionHostKind ===
|
|
180
|
+
else if (extensionHostKind === 2 ) {
|
|
181
181
|
const extensionDescription = extensions.get(extensionIdKey);
|
|
182
182
|
if (extensionDescription) {
|
|
183
183
|
localWebWorkerExtensions.push(extensionDescription);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
else if (extensionHostKind ===
|
|
186
|
+
else if (extensionHostKind === 3 ) {
|
|
187
187
|
runningLocation = ( new RemoteRunningLocation());
|
|
188
188
|
}
|
|
189
189
|
result.set(extensionIdKey, runningLocation);
|
|
190
190
|
}
|
|
191
|
-
const { affinities, maxAffinity } = this._computeAffinity(localProcessExtensions,
|
|
191
|
+
const { affinities, maxAffinity } = this._computeAffinity(localProcessExtensions, 1 , isInitialAllocation);
|
|
192
192
|
for (const extension of localProcessExtensions) {
|
|
193
193
|
const affinity = affinities.get(extension.identifier) || 0;
|
|
194
194
|
result.set(extension.identifier, ( new LocalProcessRunningLocation(affinity)));
|
|
195
195
|
}
|
|
196
|
-
const { affinities: localWebWorkerAffinities, maxAffinity: maxLocalWebWorkerAffinity } = this._computeAffinity(localWebWorkerExtensions,
|
|
196
|
+
const { affinities: localWebWorkerAffinities, maxAffinity: maxLocalWebWorkerAffinity } = this._computeAffinity(localWebWorkerExtensions, 2 , isInitialAllocation);
|
|
197
197
|
for (const extension of localWebWorkerExtensions) {
|
|
198
198
|
const affinity = localWebWorkerAffinities.get(extension.identifier) || 0;
|
|
199
199
|
result.set(extension.identifier, ( new LocalWebWorkerRunningLocation(affinity)));
|
|
@@ -227,25 +227,25 @@ let ExtensionRunningLocationTracker = class ExtensionRunningLocationTracker {
|
|
|
227
227
|
for (const extension of toAdd) {
|
|
228
228
|
const extensionKind = this.readExtensionKinds(extension);
|
|
229
229
|
const isRemote = extension.extensionLocation.scheme === Schemas.vscodeRemote;
|
|
230
|
-
const extensionHostKind = this._extensionHostKindPicker.pickExtensionHostKind(extension.identifier, extensionKind, !isRemote, isRemote,
|
|
230
|
+
const extensionHostKind = this._extensionHostKindPicker.pickExtensionHostKind(extension.identifier, extensionKind, !isRemote, isRemote, 0 );
|
|
231
231
|
let runningLocation = null;
|
|
232
|
-
if (extensionHostKind ===
|
|
232
|
+
if (extensionHostKind === 1 ) {
|
|
233
233
|
localProcessExtensions.push(extension);
|
|
234
234
|
}
|
|
235
|
-
else if (extensionHostKind ===
|
|
235
|
+
else if (extensionHostKind === 2 ) {
|
|
236
236
|
localWebWorkerExtensions.push(extension);
|
|
237
237
|
}
|
|
238
|
-
else if (extensionHostKind ===
|
|
238
|
+
else if (extensionHostKind === 3 ) {
|
|
239
239
|
runningLocation = ( new RemoteRunningLocation());
|
|
240
240
|
}
|
|
241
241
|
this._runningLocation.set(extension.identifier, runningLocation);
|
|
242
242
|
}
|
|
243
|
-
const { affinities } = this._computeAffinity(localProcessExtensions,
|
|
243
|
+
const { affinities } = this._computeAffinity(localProcessExtensions, 1 , false);
|
|
244
244
|
for (const extension of localProcessExtensions) {
|
|
245
245
|
const affinity = affinities.get(extension.identifier) || 0;
|
|
246
246
|
this._runningLocation.set(extension.identifier, ( new LocalProcessRunningLocation(affinity)));
|
|
247
247
|
}
|
|
248
|
-
const { affinities: webWorkerExtensionsAffinities } = this._computeAffinity(localWebWorkerExtensions,
|
|
248
|
+
const { affinities: webWorkerExtensionsAffinities } = this._computeAffinity(localWebWorkerExtensions, 2 , false);
|
|
249
249
|
for (const extension of localWebWorkerExtensions) {
|
|
250
250
|
const affinity = webWorkerExtensionsAffinities.get(extension.identifier) || 0;
|
|
251
251
|
this._runningLocation.set(extension.identifier, ( new LocalWebWorkerRunningLocation(affinity)));
|