Hey,
I'm having troubles archiving my App using WeakArray (https://github.com/zaubara/WeakArray) that's included in a different framework. It looks a little like this:
App
Crashlytics etc.
Library (framework)
MyPrivateFramework
WeakArray
SwiftyJSON
PromiseKit
PureLayout
LotsOfOthers
I'd like to use WeakArray in Library and the App as well, and however I include the framework, the app builds and runs fine; archiving however throws this seg fault:
1. While running pass #4733 SILModuleTransform "Mandatory Inlining".
2. While deserializing decl #900 (XREF)
3. Cross-reference to module 'WeakArray'
... WeakArray
... items
I updated the framework only crudely to Swift 3, but it seems to run fine. The likely offending code:
public struct WeakArray<T: AnyObject>: Sequence, CustomDebugStringConvertible, ExpressibleByArrayLiteral {
// MARK: Private
fileprivate typealias WeakObject = Weak<T>
fileprivate var items = [WeakObject]()
I can use WeakArray in MyPrivateFramework just fine, however reusing it in the Library or the App - no matter how I try and link or embed it again - doesn't seem to work. I had no issues in XC7.
Maybe some compiler bug relating to generics? Thanks!