Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Sources/SwiftDriver/Jobs/PrebuiltModulesJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,16 @@ public struct SDKPrebuiltModuleInputsCollector {
}

private func sanitizeInterfaceMap(_ map: [String: [PrebuiltModuleInput]]) -> [String: [PrebuiltModuleInput]] {
return map.filter {
return map.compactMapValues { inputs in
// Filter out .package.swiftinterface files
return inputs.filter { input in
!(input.path.file.extension == "swiftinterface" &&
input.path.file.basenameWithoutExt.hasSuffix(".package"))
}
}.filter { key, value in
// Remove modules without associated .swiftinterface files and diagnose.
if $0.value.isEmpty {
diagEngine.emit(.warning("\($0.key) has no associated .swiftinterface files"),
if value.isEmpty {
diagEngine.emit(.warning("\(key) has no associated .swiftinterface files"),
location: nil)
return false
}
Expand Down
Loading