Skip to content

Commit

Permalink
Merge pull request ably#63 from ably-labs/remove-swift-version-check
Browse files Browse the repository at this point in the history
Remove Swift version check
  • Loading branch information
lawrence-forooghian authored Sep 24, 2024
2 parents dc2a7d0 + 0904bfe commit 83a3542
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Sources/AblyChat/AblyCocoaExtensions/Ably+Dependencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@ import Ably

// TODO: remove "@unchecked Sendable" once https://github.com/ably/ably-cocoa/issues/1962 done

#if swift(>=6)
// This @retroactive is needed to silence the Swift 6 compiler error "extension declares a conformance of imported type 'ARTRealtimeChannels' to imported protocol 'Sendable'; this will not behave correctly if the owners of 'Ably' introduce this conformance in the future (…) add '@retroactive' to silence this warning". I don’t fully understand the implications of this but don’t really mind since both libraries are in our control.
extension ARTRealtime: RealtimeClientProtocol, @retroactive @unchecked Sendable {}
// This @retroactive is needed to silence the Swift 6 compiler error "extension declares a conformance of imported type 'ARTRealtimeChannels' to imported protocol 'Sendable'; this will not behave correctly if the owners of 'Ably' introduce this conformance in the future (…) add '@retroactive' to silence this warning". I don’t fully understand the implications of this but don’t really mind since both libraries are in our control.
extension ARTRealtime: RealtimeClientProtocol, @retroactive @unchecked Sendable {}

extension ARTRealtimeChannels: RealtimeChannelsProtocol, @retroactive @unchecked Sendable {}
extension ARTRealtimeChannels: RealtimeChannelsProtocol, @retroactive @unchecked Sendable {}

extension ARTRealtimeChannel: RealtimeChannelProtocol, @retroactive @unchecked Sendable {}
#else
extension ARTRealtime: RealtimeClientProtocol, @unchecked Sendable {}

extension ARTRealtimeChannels: RealtimeChannelsProtocol, @unchecked Sendable {}

extension ARTRealtimeChannel: RealtimeChannelProtocol, @unchecked Sendable {}
#endif
extension ARTRealtimeChannel: RealtimeChannelProtocol, @retroactive @unchecked Sendable {}

0 comments on commit 83a3542

Please sign in to comment.