Skip to content

Commit d89d65e

Browse files
authored
Fix crash building a module map for a product with an iOS-only Interop dependency (#11620)
1 parent 5d395ae commit d89d65e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ReleaseTooling/Sources/ZipBuilder/ModuleMapBuilder.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,14 @@ struct ModuleMapBuilder {
128128
/// to make sure we install the right version and from the right location.
129129
private func generate(framework: FrameworkInfo) {
130130
let podName = framework.versionedPod.name
131-
let deps = CocoaPodUtils.transitiveVersionedPodDependencies(for: podName, in: allPods)
131+
let deps = CocoaPodUtils.transitiveVersionedPodDependencies(for: podName, in: allPods).filter {
132+
// Don't include Interop pods in the module map calculation since they shouldn't add anything
133+
// and it uses the platform-independent version of the dependency list, which causes a crash
134+
// for the iOS-only RecaptchaInterop pod when the subsequent code tries to `pod install` it
135+
// for macOS. All this module code should go away when we switch to building dynamic
136+
// frameworks.
137+
!$0.name.hasSuffix("Interop")
138+
}
132139

133140
CocoaPodUtils.installPods(allSubspecList(framework: framework) + deps,
134141
inDir: projectDir,

0 commit comments

Comments
 (0)