File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 88import OpenAPIKitCore
99import Foundation
1010
11+ // Once we hit language version 6.2 we get warnings (errors for Swift 6
12+ // language mode) if the ExternalLoader is not a SendableMetatype. We just
13+ // split this conformance requirement out into a trivial base protocol to make
14+ // it easy to have different behavior for different language versions. Prior to
15+ // Swift 6.2, SendableMetatype is not even available.
16+ #if compiler(>=6.2.0)
17+ public protocol _ExternalLoaderMetatype : SendableMetatype { }
18+ #else
19+ public protocol _ExternalLoaderMetatype { }
20+ #endif
21+
1122/// An `ExternalLoader` enables `OpenAPIKit` to load external references
1223/// without knowing the details of what decoder is being used or how new internal
1324/// references should be named.
14- public protocol ExternalLoader where Message: Sendable {
25+ public protocol ExternalLoader : _ExternalLoaderMetatype where Message: Sendable {
1526 /// This can be anything that an implementor of this protocol wants to pass back from
1627 /// the `load()` function and have available after all external loading has been done.
1728 ///
Original file line number Diff line number Diff line change 88import OpenAPIKitCore
99import Foundation
1010
11+ // Once we hit language version 6.2 we get warnings (errors for Swift 6
12+ // language mode) if the ExternalLoader is not a SendableMetatype. We just
13+ // split this conformance requirement out into a trivial base protocol to make
14+ // it easy to have different behavior for different language versions. Prior to
15+ // Swift 6.2, SendableMetatype is not even available.
16+ #if compiler(>=6.2.0)
17+ public protocol _ExternalLoaderMetatype : SendableMetatype { }
18+ #else
19+ public protocol _ExternalLoaderMetatype { }
20+ #endif
21+
1122/// An `ExternalLoader` enables `OpenAPIKit` to load external references
1223/// without knowing the details of what decoder is being used or how new internal
1324/// references should be named.
14- public protocol ExternalLoader where Message: Sendable {
25+ public protocol ExternalLoader : _ExternalLoaderMetatype where Message: Sendable {
1526 /// This can be anything that an implementor of this protocol wants to pass back from
1627 /// the `load()` function and have available after all external loading has been done.
1728 ///
You can’t perform that action at this time.
0 commit comments