File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Sources/SWBTaskConstruction/ProductPlanning Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -467,6 +467,10 @@ package final class GlobalProductPlan: GlobalTargetInfoProvider
467467 }
468468 let settings = buildRequestContext. getCachedSettings ( configuredTarget. parameters, target: configuredTarget. target, provisioningTaskInputs: provisioningInputs [ configuredTarget] )
469469 let scope = settings. globalScope
470+ let specLookupContext = SpecLookupCtxt ( specRegistry: workspaceContext. core. specRegistry, platform: settings. platform)
471+ guard let artifactBundleFileType = specLookupContext. lookupFileType ( identifier: " wrapper.artifactbundle " ) else {
472+ continue
473+ }
470474
471475 // Parse artifact bundle info from any bundles this target directly depends upon.
472476 //
@@ -480,7 +484,8 @@ package final class GlobalProductPlan: GlobalTargetInfoProvider
480484 guard case . reference( let referenceGUID) = buildFile. buildableItem else { continue }
481485 guard let reference = workspaceContext. workspace. lookupReference ( for: referenceGUID) else { continue }
482486 let resolvedPath = settings. filePathResolver. resolveAbsolutePath ( reference)
483- if resolvedPath. fileExtension == " artifactbundle " {
487+ // TODO: Remove the fileExtension check once SwiftPM has been updated to consistently set the file type on artifact bundle references in PIF
488+ if resolvedPath. fileExtension == " artifactbundle " || specLookupContext. lookupFileType ( reference: reference) ? . conformsTo ( artifactBundleFileType) == true {
484489 do {
485490 let metadata = try metadataCache. getOrInsert ( resolvedPath) {
486491 try ArtifactBundleMetadata . parse ( at: resolvedPath, fileSystem: buildRequestContext. fs)
You can’t perform that action at this time.
0 commit comments