Skip to content

Commit 476c074

Browse files
add logs
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent ca80540 commit 476c074

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

code/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ CommandsRegistry.registerCommand({
397397
const [id, version] = getIdAndVersion(arg);
398398
const extension = extensionsWorkbenchService.local.find(e => areSameExtensions(e.identifier, { id, uuid: version }));
399399
if (extension?.enablementState === EnablementState.DisabledByExtensionKind) {
400+
console.error('===== 11111 extensionGalleryService.getExtensions');
400401
const [gallery] = await extensionGalleryService.getExtensions([{ id, preRelease: options?.installPreReleaseVersion }], CancellationToken.None);
401402
if (!gallery) {
402403
throw new Error(localize('notFound', "Extension '{0}' not found.", arg));

code/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,7 @@ class Extensions extends Disposable {
788788
comment: 'Report when a request is made to update metadata of an installed extension';
789789
};
790790
this.telemetryService.publicLog2<{}, GalleryServiceMatchInstalledExtensionClassification>('galleryService:updateMetadata');
791+
console.error('===== 2222 extensionGalleryService.getExtensions');
791792
const galleryWithLocalVersion: IGalleryExtension | undefined = (await this.galleryService.getExtensions([{ ...localExtension.identifier, version: localExtension.manifest.version }], CancellationToken.None))[0];
792793
isPreReleaseVersion = !!galleryWithLocalVersion?.properties?.isPreReleaseVersion;
793794
}
@@ -1402,6 +1403,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
14021403
}
14031404

14041405
async getResourceExtensions(locations: URI[], isWorkspaceScoped: boolean): Promise<IExtension[]> {
1406+
console.error('===== 333 getExtensions');
14051407
const resourceExtensions = await this.extensionManagementService.getExtensions(locations);
14061408
return resourceExtensions.map(resourceExtension => this.getInstalledExtensionMatchingLocation(resourceExtension.location)
14071409
?? this.instantiationService.createInstance(Extension, ext => this.getExtensionState(ext), ext => this.getRuntimeState(ext), undefined, undefined, undefined, { resourceExtension, isWorkspaceScoped }));
@@ -1973,6 +1975,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
19731975
const extensionInfo = version ? { id: extensionId, version } : { id: extensionId, preRelease: versionKind === 'prerelease' };
19741976
const queryOptions: IExtensionQueryOptions = version ? {} : { compatible: true };
19751977

1978+
console.error('===== 4444 downloadVSIX extensionGalleryService.getExtensions');
19761979
let [galleryExtension] = await this.galleryService.getExtensions([extensionInfo], queryOptions, CancellationToken.None);
19771980
if (!galleryExtension) {
19781981
throw new Error(nls.localize('extension not found', "Extension '{0}' not found.", extensionId));
@@ -1998,6 +2001,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
19982001
}
19992002

20002003
if (targetPlatform !== galleryExtension.properties.targetPlatform) {
2004+
console.error('===== 5555 downloadVSIX extensionGalleryService.getExtensions');
20012005
[galleryExtension] = await this.galleryService.getExtensions([extensionInfo], { ...queryOptions, targetPlatform }, CancellationToken.None);
20022006
}
20032007

@@ -2465,6 +2469,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
24652469

24662470
if (installableInfo) {
24672471
const targetPlatform = extension?.server ? await extension.server.extensionManagementService.getTargetPlatform() : undefined;
2472+
console.error('===== 666 extensionGalleryService.getExtensions');
24682473
gallery = (await this.galleryService.getExtensions([installableInfo], { targetPlatform }, CancellationToken.None)).at(0);
24692474
}
24702475

code/src/vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export class NativeRemoteExtensionManagementService extends RemoteExtensionManag
129129
let compatibleExtension: IGalleryExtension | null = null;
130130

131131
if (extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion !== includePreRelease) {
132+
console.error('===== 7777 extensionGalleryService.getExtensions');
132133
compatibleExtension = (await this.galleryService.getExtensions([{ ...extension.identifier, preRelease: includePreRelease }], { targetPlatform, compatible: true }, CancellationToken.None))[0] || null;
133134
}
134135

@@ -146,6 +147,7 @@ export class NativeRemoteExtensionManagementService extends RemoteExtensionManag
146147
throw new ExtensionManagementError(localize('incompatibleAPI', "Can't install '{0}' extension. {1}", extension.displayName ?? extension.identifier.id, incompatibleApiProposalsMessages[0]), ExtensionManagementErrorCode.IncompatibleApi);
147148
}
148149
/** If no compatible release version is found, check if the extension has a release version or not and throw relevant error */
150+
console.error('===== 9999 extensionGalleryService.getExtensions');
149151
if (!includePreRelease && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
150152
throw new ExtensionManagementError(localize('notFoundReleaseExtension', "Can't install release version of '{0}' extension because it has no release version.", extension.identifier.id), ExtensionManagementErrorCode.ReleaseVersionNotFound);
151153
}
@@ -189,6 +191,7 @@ export class NativeRemoteExtensionManagementService extends RemoteExtensionManag
189191
return Promise.resolve();
190192
}
191193

194+
console.error('===== 8888 extensionGalleryService.getExtensions');
192195
const extensions = await this.galleryService.getExtensions(toGet.map(id => ({ id })), token);
193196
const manifests = await Promise.all(extensions.map(e => this.galleryService.getManifest(e, token)));
194197
const extensionsManifests: IExtensionManifest[] = [];

code/src/vs/workbench/services/userDataProfile/browser/extensionsResource.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export class ExtensionsResourceInitializer implements IProfileResourceInitialize
6969
}
7070
}
7171
if (extensionsToInstall.length) {
72+
console.error('===== qqqq extensionGalleryService.getExtensions');
7273
const galleryExtensions = await this.extensionGalleryService.getExtensions(extensionsToInstall.map(e => ({ ...e.identifier, version: e.version, hasPreRelease: e.version ? undefined : e.preRelease })), CancellationToken.None);
7374
await Promise.all(extensionsToInstall.map(async e => {
7475
const extension = galleryExtensions.find(galleryExtension => areSameExtensions(galleryExtension.identifier, e.identifier));
@@ -147,6 +148,7 @@ export class ExtensionsResource implements IProfileResource {
147148
}
148149
if (extensionsToInstall.length) {
149150
this.logService.info(`Importing Profile (${profile.name}): Started installing extensions.`);
151+
console.error('===== ttttextensionGalleryService.getExtensions');
150152
const galleryExtensions = await this.extensionGalleryService.getExtensions(extensionsToInstall.map(e => ({ ...e.identifier, version: e.version, hasPreRelease: e.version ? undefined : e.preRelease })), CancellationToken.None);
151153
const installExtensionInfos: InstallExtensionInfo[] = [];
152154
await Promise.all(extensionsToInstall.map(async e => {

0 commit comments

Comments
 (0)