Description
Previous ID | SR-13050 |
Radar | rdar://problem/51994654 |
Original Reporter | khose (JIRA User) |
Type | Bug |
Attachment: Download
Environment
MacOS Catalina 10.15.5 (19F101)
XCode 11.5 (11E608c)
Ruby 2.6.4
The attachment includes both the app project and the library project, including Gemfiles and Podfiles to fix versions as much as possible.
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug |
Assignee | @beccadax |
Priority | Medium |
md5: c8192564d3ce9290205bc02403bb0bdf
Issue Description:
Previously raised in: https://forums.swift.org/t/swifinterface-undeclared-generic-types/37706
Good afternoon.
I'm trying to extract some internal frameworks from our project and move them to their own repository. I've started with a framework which is a dependency of both the app and most of the other internal frameworks in the app (yes exactly, the "utils" library 🙂).
The utils library also have other third party dependencies, which are resolved using Cocoapods. The library is compiled into an XCFramework correctly. This XCFramework is then linked back to the main app and to every internal framework depending on it. "Utils" dependencies are added to the main app and the internal frameworks using Cocoapods as well.
When I try to compile the app, the compilation of the swiftinterface fails, as it can't infer the types being used in a generic class's extension. This generic class is Result, which is part of Swift. The interface file contains import Swift so I have the impression some of the other imports may be failing and causing this, but my knowledge of how the compiler works is pretty limited.
I understand this is a pretty specific case of interface, as it contains imports of third parties, but I'd assume this is a pretty standard setup in big projects. I also understand the setup might be wrong, in which case I'd need to understand where the error is.
I've attached a test project with an app/ and a library/ folders containing a __ minimal version of this setup. Run bundler install and bundle exec pod install in both projects beforehand. The library one contains the standard script to create xcframeworks, and the one included in the app has been generated in this way.
Please, do let me know if I can provide more info and help. I hope it's a setup error in the end. Thanks!