extensionsScannerService.ts ×7

Frontier kind: Code frontier

unlabeled · c_63580c3d2e86

8 tests · 18767 LOC · 82 files · introduces 0 tests · 27 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges27 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2928 ranges18767 lines · 82 files · Browse complete extent
All tests (intent)
8 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 27 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/extensionManagement/common/extensionsScannerService.ts 27 introduced LOC · 7 ranges

Open complete file

214
215 async scanSystemExtensions(scanOptions: SystemExtensionsScanOptions): Promise<IScannedExtension[]> {
216 > const promises: Promise<IRelaxedScannedExtension[]>[] = []; extensionsScannerService.ts
217 > promises.push(this.scanDefaultSystemExtensions(scanOptions.language));
218 > promises.push(this.scanDevSystemExtensions(scanOptions.language, !!scanOptions.checkControlFile));
219 > const [defaultSystemExtensions, devSystemExtensions] = await Promise.all(promises);
220 > let allSystemExtensions = [...defaultSystemExtensions, ...devSystemExtensions];
221 >
222 > if (this.environmentService.skipBuiltinExtensions?.length) {
223 const skipSet = new Set(this.environmentService.skipBuiltinExtensions.map(id => id.toLowerCase()));
224 allSystemExtensions = allSystemExtensions.filter(ext => !skipSet.has(ext.identifier.id.toLowerCase()));
225 }
227 > return this.applyScanOptions(allSystemExtensions, ExtensionType.System, { pickLatest: false });
228 > }
229
230 async scanUserExtensions(scanOptions: UserExtensionsScanOptions): Promise<IScannedExtension[]> {
409 const result = new ExtensionIdentifierMap<IScannedExtension>();
410 system?.forEach((extension) => {
411 > const existing = result.get(extension.identifier.id); extensionsScannerService.ts
412 > if (!existing || pick(existing, extension, false)) {
413 > result.set(extension.identifier.id, extension);
414 > }
415 });
416 const productBuiltInExtensionsEnabledWithAutoUpdates = getProductBuiltInExtensionsEnabledWithAutoUpdates(this.productService, this.environmentService);
440
441 private async scanDefaultSystemExtensions(language: string | undefined): Promise<IRelaxedScannedExtension[]> {
442 > this.logService.trace('Started scanning system extensions'); extensionsScannerService.ts
443 > const extensionsScannerInput = await this.createExtensionScannerInput(this.systemExtensionsLocation, false, ExtensionType.System, language, true, undefined, this.getProductVersion());
444 > const extensionsScanner = extensionsScannerInput.devMode ? this.extensionsScanner : this.systemExtensionsCachedScanner;
445 > const result = await extensionsScanner.scanExtensions(extensionsScannerInput);
446 > this.logService.trace('Scanned system extensions:', result.length);
447 > return result;
448 > }
449
450 private async scanDevSystemExtensions(language: string | undefined, checkControlFile: boolean): Promise<IRelaxedScannedExtension[]> {
451 > const devSystemExtensionsList = this.environmentService.isBuilt ? [] : this.productService.builtInExtensions; extensionsScannerService.ts
452 > if (!devSystemExtensionsList?.length) {
453 return [];
454 }
456 this.logService.trace('Started scanning dev system extensions');
457 const builtinExtensionControl = checkControlFile ? await this.getBuiltInExtensionControl() : {};
458 > const devSystemExtensionsLocations: URI[] = []; extensionsScannerService.ts
459 > const devSystemExtensionsLocation = URI.file(path.normalize(path.join(FileAccess.asFileUri('').fsPath, '..', '.build', 'builtInExtensions')));
460 > for (const extension of devSystemExtensionsList) {
461 const controlState = builtinExtensionControl[extension.name] || 'marketplace';
462 switch (controlState) {
474 this.logService.trace('Scanned dev system extensions:', result.length);
475 return coalesce(result);
477
478 private async getBuiltInExtensionControl(): Promise<IBuiltInExtensionControl> {