Hi Keith, thanks for the ideas there.
It's hard for me to say how many conformances we have; we are dynamically linking all of our internal libraries and frameworks. When I pipe the release build of our application to otool, I get 2,885 protocol conformances, however, that's not actually correct; since all of our internal dependencies are linked dynamically, they don't appear in this count. When I pull the counts for our two generated frameworks, I get: 19,967 and 14,872 conformances (which tracks with my rough estimate of ~35,000).
How is it failing specifically for you?
The protocol conformances aren't being recognized. Let's say our generated type is called MyDataType. I'll write a function that's something like this:
func transform<T: ExternalProtocol>(value: ExternalProtocol.AssociatedValue) -> MyObject<T> where ExternalProtocol.AssociatedValue: MyDataType { ... }
This will give the following error:
Instance method 'transform(value:)' requires that 'ConcreteType.AssociatedValue' conform to 'MyDataType'
In my generated framework, I have the following:
public protocol MyDataType { ... }
extension ConcreteTypeAssociatedValue: MyDataType { } // all properties being added are `public`
// Where the definition for `ConcreteType` in an external framework is such that its `AssociatedValue` is specifically of type `ConcreteTypeAssociatedValue`
Simply copying over the extension from the framework files to the main app target allows it to successfully build.
Depending on how your library is being linked they could be being dropped because they appear unused
I tried changing the linking from dynamic to static, and still arrive at the same error. In case of a symbol conflict, I also renamed the generated protocol names -- to no avail.