rules_swift icon indicating copy to clipboard operation
rules_swift copied to clipboard

Add a `SwiftInfo` provider field to propagate framework files

Open allevato opened this issue 5 years ago • 0 comments

The ObjcProvider framework migration stuffs everything in the Modules directory of a framework into the modulemap key, but that's not correct for Swift modules/interfaces. A workaround for this is currently being implemented in https://github.com/bazelbuild/rules_apple/pull/479, but stuffing module/interface files into headers is a hack.

Instead, SwiftInfo should have a transitive_framework_swiftmodules key (or something like that) that propagates the .swiftmodule or .swiftinterface files of frameworks. The Apple framework rules can then propagate a SwiftInfo provider with this field populated, and the Swift build rules can take those files and derive the correct -F flag based on their paths, like we currently do for C-language frameworks.

allevato avatar Jun 18 '19 19:06 allevato