- 
                Notifications
    
You must be signed in to change notification settings  - Fork 177
 
Open
Description
Several errors (redacted version pasted below) pop up when following the Approach #2 instructions here. When using Swift 5 the errors go away, but the warnings still exist.
<path>/ViewInspection.swift:12:1: warning: extension declares a conformance of imported type 'Inspection' to imported protocols 'InspectionEmissary', 'Sendable'; this will not behave correctly if the owners of 'RocketTracker' introduce this conformance in the future
extension Inspection: InspectionEmissary {}
^
<path>/ViewInspection.swift:12:1: note: add '@retroactive' to silence this warning
extension Inspection: InspectionEmissary {}
^                     ~~~~~~~~~~~~~~~~~~
                      @retroactive InspectionEmissary
<path>/ViewInspection.swift:12:1: error: conformance to 'Sendable' must occur in the same source file as generic class 'Inspection'; use '@unchecked Sendable' for retroactive conformance
extension Inspection: InspectionEmissary {}
^
<App>.Inspection.notice:2:14: error: stored property 'notice' of 'Sendable'-conforming generic class 'Inspection' has non-Sendable type 'PassthroughSubject<UInt, Never>'
internal let notice: PassthroughSubject<UInt, Never>}
             ^
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
                   ^
<App>.Inspection.callbacks:2:14: error: stored property 'callbacks' of 'Sendable'-conforming generic class 'Inspection' is mutable
internal var callbacks: [UInt : (V) -> Void]}
Metadata
Metadata
Assignees
Labels
No labels