fireblade-engine / ecs

A dependency free, lightweight, fast Entity-Component System (ECS) implementation in Swift
MIT License
110 stars 11 forks source link

Segmentation fault during compile for Swift 5.3 (XCode 12 Beta) #21

Closed Kaspik closed 4 years ago

Kaspik commented 4 years ago

Hey!

When trying to compile the project with XCode 12 and Swift 5.3 with SPM integration, XCode can't compile the project because of Segmentation fault:

CompileSwift normal x86_64 /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family5.swift (in target 'FirebladeECS' from project 'FirebladeECS')
    cd /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Component.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/ComponentIdentifier.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Entity+Component.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Entity.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/EntityIdentifier.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/EntityIdentifierGenerator.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family+Coding.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family1.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family2.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family3.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family4.swift -primary-file /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family5.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/FamilyProtocols.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/FamilyTraitSet.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Foundation+Extensions.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Hashing.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/ManagedContiguousArray.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+Component.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+ComponentsBuilder.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+Entity.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+Family.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+Internal.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+SceneGraph.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/NexusEventDelegate.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/NexusEvents.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Single.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/UnorderedSparseSet.swift -emit-module-path /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Family5\~partial.swiftmodule -emit-module-doc-path /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Family5\~partial.swiftdoc -emit-module-source-info-path /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Family5\~partial.swiftsourceinfo -serialize-diagnostics-path /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Family5.dia -emit-dependencies-path /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Family5.d -emit-reference-dependencies-path /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Family5.swiftdeps -target x86_64-apple-macos10.10 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -I /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Products/Debug -I /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Products/Debug -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/kaspik/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity\=checked -Onone -D SWIFT_PACKAGE -D DEBUG -D Xcode -serialize-debugging-options -Xcc -working-directory -Xcc /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs -enable-anonymous-context-mangled-names -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/swift-overrides.hmap -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Products/Debug/include -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/DerivedSources-normal/x86_64 -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/DerivedSources/x86_64 -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -target-sdk-version 11.0 -module-name FirebladeECS -o /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Family5.o -index-store-path /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Index/DataStore -index-system-modules

Stack dump:
0.  Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Component.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/ComponentIdentifier.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Entity+Component.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Entity.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/EntityIdentifier.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/EntityIdentifierGenerator.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family+Coding.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family1.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family2.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family3.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family4.swift -primary-file /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family5.swift -primary-file /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/FamilyProtocols.swift -primary-file /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/FamilyTraitSet.swift -primary-file /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Foundation+Extensions.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Hashing.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/ManagedContiguousArray.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+Component.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+ComponentsBuilder.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+Entity.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+Family.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+Internal.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus+SceneGraph.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Nexus.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/NexusEventDelegate.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/NexusEvents.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Single.swift /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/UnorderedSparseSet.swift -supplementary-output-file-map /var/folders/z7/pq6rp3ss6ks4gm6bdnw7tpzr0000gn/T/supplementaryOutputs-2158a9 -target x86_64-apple-macos10.10 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -I /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Products/Debug -I /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Products/Debug -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/kaspik/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity=checked -Onone -D SWIFT_PACKAGE -D DEBUG -D Xcode -serialize-debugging-options -Xcc -working-directory -Xcc /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs -enable-anonymous-context-mangled-names -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/swift-overrides.hmap -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Products/Debug/include -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/DerivedSources-normal/x86_64 -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/DerivedSources/x86_64 -Xcc -I/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG=1 -target-sdk-version 11.0 -module-name FirebladeECS -o /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Family5.o -o /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/FamilyProtocols.o -o /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/FamilyTraitSet.o -o /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Build/Intermediates.noindex/FirebladeECS.build/Debug/FirebladeECS.build/Objects-normal/x86_64/Foundation+Extensions.o -index-store-path /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/Index/DataStore -index-system-modules 
1.  Apple Swift version 5.3 (swiftlang-1200.0.22.4 clang-1200.0.25.1)
2.  While evaluating request TypeCheckSourceFileRequest(source_file "/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family5.swift")
3.  While type-checking extension of Requires5 (at /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family5.swift:59:1)
4.  While type-checking protocol conformance to 'FamilyEncoding' (at /Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/FamilyProtocols.swift:25:8) for type 'Requires5<A, B, C, D, E>' (declared at [/Users/kaspik/Library/Developer/Xcode/DerivedData/MonsterWorld-bvwotptpsysxciczgxwvsgdqzbpe/SourcePackages/checkouts/ecs/Sources/FirebladeECS/Family5.swift:12:8 - line:57:1] RangeText="struct Requires5<A, B, C, D, E>: FamilyRequirementsManaging where A: Component, B: Component, C: Component, D: Component, E: Component {
    public let componentTypes: [Component.Type]

    public init(_ types: (A.Type, B.Type, C.Type, D.Type, E.Type)) {
        componentTypes = [A.self, B.self, C.self, D.self, E.self]
    }

    public static func components(nexus: Nexus, entityId: EntityIdentifier) -> (A, B, C, D, E) {
        let compA: A = nexus.get(unsafeComponentFor: entityId)
        let compB: B = nexus.get(unsafeComponentFor: entityId)
        let compC: C = nexus.get(unsafeComponentFor: entityId)
        let compD: D = nexus.get(unsafeComponentFor: entityId)
        let compE: E = nexus.get(unsafeComponentFor: entityId)
        return (compA, compB, compC, compD, compE)
    }

    public static func entityAndComponents(nexus: Nexus, entityId: EntityIdentifier) -> (Entity, A, B, C, D, E) {
        let entity = nexus.get(unsafeEntity: entityId)
        let compA: A = nexus.get(unsafeComponentFor: entityId)
        let compB: B = nexus.get(unsafeComponentFor: entityId)
        let compC: C = nexus.get(unsafeComponentFor: entityId)
        let compD: D = nexus.get(unsafeComponentFor: entityId)
        let compE: E = nexus.get(unsafeComponentFor: entityId)
        return (entity, compA, compB, compC, compD, compE)
    }

    public static func relativesDescending(nexus: Nexus, parentId: EntityIdentifier, childId: EntityIdentifier) ->
        (parent: (A, B, C, D, E), child: (A, B, C, D, E)) {
            let pcA: A = nexus.get(unsafeComponentFor: parentId)
            let pcB: B = nexus.get(unsafeComponentFor: parentId)
            let pcC: C = nexus.get(unsafeComponentFor: parentId)
            let pcD: D = nexus.get(unsafeComponentFor: parentId)
            let pcE: E = nexus.get(unsafeComponentFor: parentId)
            let ccA: A = nexus.get(unsafeComponentFor: childId)
            let ccB: B = nexus.get(unsafeComponentFor: childId)
            let ccC: C = nexus.get(unsafeComponentFor: childId)
            let ccD: D = nexus.get(unsafeComponentFor: childId)
            let ccE: E = nexus.get(unsafeComponentFor: childId)
            return (parent: (pcA, pcB, pcC, pcD, pcE),
                    child: (ccA, ccB, ccC, ccD, ccE))
    }

    public static func createMember(nexus: Nexus, components: (A, B, C, D, E)) -> Entity {
        nexus.createEntity(with: components.0, components.1, components.2, components.3, components.4)
    }
")
0  swift                    0x0000000105c394c5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  swift                    0x0000000105c384c5 llvm::sys::RunSignalHandlers() + 85
2  swift                    0x0000000105c39a7f SignalHandler(int) + 111
3  libsystem_platform.dylib 0x00007fff68731d7d _sigtramp + 29
4  libsystem_platform.dylib 0x00007fe400d0a360 _sigtramp + 18446743956006733312
5  swift                    0x00000001024ee53b swift::constraints::ConstraintSystem::simplifyRestrictedConstraint(swift::constraints::ConversionRestrictionKind, swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder) + 779
6  swift                    0x00000001024de0f0 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder) + 14960
7  swift                    0x00000001024e93d5 swift::constraints::ConstraintSystem::repairFailures(swift::Type, swift::Type, swift::constraints::ConstraintKind, llvm::SmallVectorImpl<swift::constraints::RestrictionOrFix>&, swift::constraints::ConstraintLocatorBuilder) + 12677
8  swift                    0x00000001024de085 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder) + 14853
9  swift                    0x00000001024de4a9 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder) + 15913
10 swift                    0x0000000102502e70 swift::constraints::ConstraintSystem::addConstraintImpl(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool) + 96
11 swift                    0x00000001024d9e82 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool) + 66
12 swift                    0x000000010270a9bd llvm::Optional<swift::RequirementMatch> llvm::function_ref<llvm::Optional<swift::RequirementMatch> (swift::Type, swift::Type)>::callback_fn<swift::matchWitness(llvm::DenseMap<std::__1::pair<swift::GenericSignatureImpl const*, swift::ClassDecl const*>, swift::RequirementEnvironment, llvm::DenseMapInfo<std::__1::pair<swift::GenericSignatureImpl const*, swift::ClassDecl const*> >, llvm::detail::DenseMapPair<std::__1::pair<swift::GenericSignatureImpl const*, swift::ClassDecl const*>, swift::RequirementEnvironment> >&, swift::ProtocolDecl*, swift::ProtocolConformance*, swift::DeclContext*, swift::ValueDecl*, swift::ValueDecl*)::$_1>(long, swift::Type, swift::Type) + 93
13 swift                    0x00000001026ebe5a swift::matchWitness(swift::DeclContext*, swift::ValueDecl*, swift::ValueDecl*, llvm::function_ref<std::__1::tuple<llvm::Optional<swift::RequirementMatch>, swift::Type, swift::Type> ()>, llvm::function_ref<llvm::Optional<swift::RequirementMatch> (swift::Type, swift::Type)>, llvm::function_ref<swift::RequirementMatch (bool, llvm::ArrayRef<swift::OptionalAdjustment>)>) + 8778
14 swift                    0x00000001026ed993 swift::matchWitness(llvm::DenseMap<std::__1::pair<swift::GenericSignatureImpl const*, swift::ClassDecl const*>, swift::RequirementEnvironment, llvm::DenseMapInfo<std::__1::pair<swift::GenericSignatureImpl const*, swift::ClassDecl const*> >, llvm::detail::DenseMapPair<std::__1::pair<swift::GenericSignatureImpl const*, swift::ClassDecl const*>, swift::RequirementEnvironment> >&, swift::ProtocolDecl*, swift::ProtocolConformance*, swift::DeclContext*, swift::ValueDecl*, swift::ValueDecl*) + 1187
15 swift                    0x00000001026ee4e2 swift::WitnessChecker::findBestWitness(swift::ValueDecl*, bool*, swift::NormalProtocolConformance*, llvm::SmallVectorImpl<swift::RequirementMatch>&, unsigned int&, unsigned int&, bool&) + 946
16 swift                    0x00000001026f8b83 swift::ConformanceChecker::resolveWitnessViaLookup(swift::ValueDecl*) + 643
17 swift                    0x00000001026f3a65 swift::MultiConformanceChecker::checkIndividualConformance(swift::NormalProtocolConformance*, bool) + 14821
18 swift                    0x00000001026efb23 swift::MultiConformanceChecker::checkAllConformances() + 147
19 swift                    0x00000001026ff6d7 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) + 8295
20 swift                    0x00000001026abba8 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 18344
21 swift                    0x000000010276f401 swift::TypeCheckSourceFileRequest::evaluate(swift::Evaluator&, swift::SourceFile*) const + 753
22 swift                    0x0000000102772289 llvm::Expected<swift::TypeCheckSourceFileRequest::OutputType> swift::Evaluator::getResultUncached<swift::TypeCheckSourceFileRequest>(swift::TypeCheckSourceFileRequest const&) + 953
23 swift                    0x000000010276ef84 swift::TypeCheckSourceFileRequest::OutputType swift::evaluateOrDefault<swift::TypeCheckSourceFileRequest>(swift::Evaluator&, swift::TypeCheckSourceFileRequest, swift::TypeCheckSourceFileRequest::OutputType) + 164
24 swift                    0x00000001018f04eb swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 6859
25 swift                    0x00000001017b1801 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6849
26 swift                    0x0000000101736157 main + 1255
27 libdyld.dylib            0x00007fff68503851 start + 1
error: Segmentation fault: 11 (in target 'FirebladeECS' from project 'FirebladeECS')
ctreffs commented 4 years ago

Hi @Kaspik,

this is, sadly, a known issue right now that is a regression introduced with Swift 5.3. I've reported the issue as part of a beta feedback some time ago (FB8101511) (2020-07-22). Up until now there is no working fix for the issue. I will however keep working on the problem from my end (i.e. try restructuring or renaming code). If you have any insight into what could help here or what is the actual reason for the compiler crash your help would be much appreciated.

Other than that the official recommendation is to compile with a Swift version < 5.3 I'm afraid.

Just as an addition I attached my stack trace dump here: stack.dump.log

There are other projects facing similar issues it seems:

A related Swift compiler bug issue could be:

Kaspik commented 4 years ago

Just FYI - Version 12.1 didn't have this issue, so maybe let's dig into what has changed between 12.1 and 14?

Also seem like Eureka found a workaround for now - https://github.com/xmartlabs/Eureka/pull/2061

ctreffs commented 4 years ago

Files changed between 0.12.1 and 0.14.0 are comparable here: https://github.com/fireblade-engine/ecs/compare/0.12.1...0.14.0

The only type system heavy introductions where:

ctreffs commented 4 years ago

So I just verified the regression was introduced with 0.13.0, which 0.12.2 still working. So the failing code must be part of this diff https://github.com/fireblade-engine/ecs/compare/0.12.2...0.13.0

Kaspik commented 4 years ago

Yes, from the stack it's FamilyProtocols.swift:25:8, - While type-checking protocol conformance to 'FamilyEncoding'.

Do you have XCode 12 available to poke around?

ctreffs commented 4 years ago

So I tracked the issue down to the FamilyEncoding implementation and conformance. I will have to take a closer look into this implementation. Using Xcode 12 beta 4. But I do not have time to work on that right now. Maybe you find something in particular. Will come back to you soon.

Kaspik commented 4 years ago

I have an idea:

public static func decode(componentsIn container: KeyedDecodingContainer<DynamicCodingKey>, using strategy: CodingStrategy) throws -> (A, B, C, D, E) {
        let compA = try container.decode(A.self, forKey: strategy.codingKey(for: A.self))
        let compB = try container.decode(B.self, forKey: strategy.codingKey(for: B.self))
        let compC = try container.decode(C.self, forKey: strategy.codingKey(for: C.self))
        let compD = try container.decode(D.self, forKey: strategy.codingKey(for: D.self))
        let compE = try container.decode(E.self, forKey: strategy.codingKey(for: E.self))
        return Components(compA, compB, compC, compD, compE)
    }

uses A,B,C,D,E, but:

public static func encode(components: (A, B, C, D, E), into container: inout KeyedEncodingContainer<DynamicCodingKey>, using strategy: CodingStrategy) throws {
        try container.encode(components.0, forKey: strategy.codingKey(for: A.self))
        try container.encode(components.1, forKey: strategy.codingKey(for: B.self))
        try container.encode(components.2, forKey: strategy.codingKey(for: C.self))
        try container.encode(components.3, forKey: strategy.codingKey(for: D.self))
        try container.encode(components.4, forKey: strategy.codingKey(for: E.self))
    }

uses 1,2,3,4,5 even tho it has A,B,C,D,E params?

EDIT: Ohh nvm, I read it wrong ...

ctreffs commented 4 years ago

@Kaspik I found a fix - see https://github.com/fireblade-engine/ecs/pull/22 Will merge as soon as you confirm that it works on your end and provide a new path version 0.14.1

Kaspik commented 4 years ago

@ctreffs Still seeing the issue. It seems like Parent1 - Parent5 protocol methods are not updated?

ctreffs commented 4 years ago

Hi @Kaspik, make sure you clear your derived data folder and clean your project, re-open Xcode and try again. Just checked again: the current release (0.14.1) builds and tests without a problem using Xcode 12 beta 4.

Please verify again, and if the issue persists report your crash-log and Xcode version. Thank you.

Kaspik commented 4 years ago

Yeah sorry for that, issue on my end (none of the mentioned above). Thanks!