You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Apr 10, 2020
· 2 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of softwareIRGenLLVM IR generation
Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
Target: x86_64-apple-darwin19.5.0
Xcode: 11.4 (11E146)
macOS: 19F53f
Additional Detail from JIRA
Votes
0
Component/s
Labels
Bug, Crash
Assignee
None
Priority
Medium
md5: 9b989802327c1fb0039fb2ecf633ee21
Issue Description:
Description
The Swift compiler (5.2) can crash with extensions declared outside a framework target in archive mode only (works in debug).
Example (see the project in attachments)
Create a simple iOS app project, and create 2 others frameworks targets (in the attachments, SubscriptionKit and ResourceKit).
In the first framework target, declare:
In the second framework target, declare 2 protocols:
the first needs to add a conformance (like to NSObject)
the second needs to have a method with the first protocol as parameter
import Foundation
publicprotocolResourceKitProtocol:NSObject{}publicprotocolResourceKitDelegate{func subscriptionViewController(for resourceKit:ResourceKitProtocol)}
Inside the app target:
create an extension of the object used as conformance of the first protocol inside the second framework, and implement the protocol inside the first framework
implement the second protocol of the second framework inside the default ViewController class, and use your previous class declaration with the parameter of the protocol method.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of softwareIRGenLLVM IR generation
Attachment: Download
Environment
Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
Target: x86_64-apple-darwin19.5.0
Xcode: 11.4 (11E146)
macOS: 19F53f
Additional Detail from JIRA
md5: 9b989802327c1fb0039fb2ecf633ee21
Issue Description:
Description
The Swift compiler (5.2) can crash with extensions declared outside a framework target in archive mode only (works in debug).
Example (see the project in attachments)
Create a simple iOS app project, and create 2 others frameworks targets (in the attachments, SubscriptionKit and ResourceKit).
In the first framework target, declare:
an empty protocol
an empty class
In the second framework target, declare 2 protocols:
the first needs to add a conformance (like to NSObject)
the second needs to have a method with the first protocol as parameter
Inside the app target:
create an extension of the object used as conformance of the first protocol inside the second framework, and implement the protocol inside the first framework
declare a new class, and inside this one, declare a property with the protocol of the first framework as type
implement the second protocol of the second framework inside the default ViewController class, and use your previous class declaration with the parameter of the protocol method.
Full code inside the iOS target:
Now, try to compile:
in debug mode, the compile process will succeed
when you try to archive this project, you will get a compiler crash
Compile logs (from the attached project)
The text was updated successfully, but these errors were encountered: