-
Notifications
You must be signed in to change notification settings - Fork 133
Description
Hey folks. This is a bit more specific feature request for a set of issues:
- [SR-15154] ObjC projects using SPM fail when we expose our models into another module swift#57480
- [SR-15718] Swift references with '@objc' in a swift package cannot be exposed in ObjC headers that are visible to swift. Module not found build error. swift-package-manager#4362
- https://forums.swift.org/t/importing-swift-types-exposed-in-an-objective-c-api-back-into-swift/83492
When building SwiftPM targets in Xcode, it is challenging to enable the Swift consumer to see Swift types from transitive Swift modules when they are exposed through an Objective-C API, which makes the API itself uncallable.
My specific use case: we in Kotlin are building a SwiftPM interop for our native backend. When we emit a header file with types that we imported from SwiftPM, such APIs become uncallable in the final application.
I've built the reproduction for this issue here, and it's identical to the one described in the forum thread above.
Would it be possible to pass the -Xcc -fmodule-map-file to the consuming Swift compilations from transitive SwiftPM Swift targets to enable this use case?