Skip to content

Commit

Permalink
Fix crash building a module map for a product with an iOS-only Intero…
Browse files Browse the repository at this point in the history
…p dependency (#11620)
  • Loading branch information
paulb777 authored Jul 27, 2023
1 parent 5d395ae commit d89d65e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ReleaseTooling/Sources/ZipBuilder/ModuleMapBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,14 @@ struct ModuleMapBuilder {
/// to make sure we install the right version and from the right location.
private func generate(framework: FrameworkInfo) {
let podName = framework.versionedPod.name
let deps = CocoaPodUtils.transitiveVersionedPodDependencies(for: podName, in: allPods)
let deps = CocoaPodUtils.transitiveVersionedPodDependencies(for: podName, in: allPods).filter {
// Don't include Interop pods in the module map calculation since they shouldn't add anything
// and it uses the platform-independent version of the dependency list, which causes a crash
// for the iOS-only RecaptchaInterop pod when the subsequent code tries to `pod install` it
// for macOS. All this module code should go away when we switch to building dynamic
// frameworks.
!$0.name.hasSuffix("Interop")
}

CocoaPodUtils.installPods(allSubspecList(framework: framework) + deps,
inDir: projectDir,
Expand Down

0 comments on commit d89d65e

Please sign in to comment.