src/vs/platform/extensionManagement/common/extensionsScannerService.ts/ExtensionsScanner/scanExtension
class ExtensionsScanner:	async scanExtension(input: ExtensionScannerInput): Promise<IRelaxedScannedExtension | null> {
		try {
			let manifest = await this.scanExtensionManifest(input.location);
			if (manifest) {
				// allow publisher to be undefined to make the initial extension authoring experience smoother
				if (!manifest.publisher) {
					manifest.publisher = UNDEFINED_PUBLISHER;
				}
				const identifier = { id: getGalleryExtensionId(manifest.publisher, manifest.name) };
				const metadata = manifest.__metadata;
				delete manifest.__metadata;
				const type = metadata?.isSystem ? ExtensionType.System : input.type;
				const isBuiltin = type === ExtensionType.System || !!metadata?.isBuiltin;
				const validations = validateExtensionManifest(input.productVersion, input.productDate, input.location, manifest, isBuiltin);
				let isValid = true;
				for (const [severity, message] of validations) {
					if (severity === Severity.Error) {
						isValid = false;
						this.logService.error(this.formatMessage(input.location, message));
					}
				}
				manifest = await this.translateManifest(input.location, manifest, ExtensionScannerInput.createNlsConfiguration(input));
				return {
					type,
					identifier,
					manifest,
					location: input.location,
					isBuiltin,
					targetPlatform: metadata?.targetPlatform ?? TargetPlatform.UNDEFINED,
					metadata,
					isValid,
					validations
				};
			}
		} catch (e) {
			if (input.type !== ExtensionType.System) {
				this.logService.error(e);
			}
		}
		return null;
	}