File tree Expand file tree Collapse file tree 8 files changed +29
-28
lines changed Expand file tree Collapse file tree 8 files changed +29
-28
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ let includeNIOSSL = ProcessInfo.processInfo.environment["GRPC_NO_NIO_SSL"] == ni
3232let packageDependencies : [ Package . Dependency ] = [
3333 . package (
3434 url: " https://github.com/apple/swift-nio.git " ,
35- from: " 2.36.0 "
35+ from: " 2.41.1 "
3636 ) ,
3737 . package (
3838 url: " https://github.com/apple/swift-nio-http2.git " ,
@@ -52,7 +52,7 @@ let packageDependencies: [Package.Dependency] = [
5252 ) ,
5353 . package (
5454 url: " https://github.com/apple/swift-log.git " ,
55- from: " 1.4.0 "
55+ from: " 1.4.4 "
5656 ) ,
5757 . package (
5858 url: " https://github.com/apple/swift-argument-parser.git " ,
Original file line number Diff line number Diff line change 1515 */
1616#if compiler(>=5.6)
1717
18- @ preconcurrency import Logging
18+ import Logging
1919import NIOConcurrencyHelpers
2020import NIOHPACK
2121
Original file line number Diff line number Diff line change 1515 */
1616import struct Foundation. UUID
1717
18- #if swift(>=5.6)
19- @preconcurrency import Logging
20- @preconcurrency import NIOCore
21- #else
22- import Logging
2318import NIOCore
24- #endif // swift(>=5.6)
2519
20+ import Logging
2621import NIOHPACK
2722import NIOHTTP1
2823import NIOHTTP2
Original file line number Diff line number Diff line change 1515 */
1616#if swift(>=5.6)
1717@preconcurrency import Foundation
18- @preconcurrency import Logging
19- @preconcurrency import NIOCore
2018#else
2119import Foundation
22- import Logging
23- import NIOCore
2420#endif // swift(>=5.6)
2521
22+ import Logging
23+ import NIOCore
2624import NIOHPACK
2725import NIOHTTP2
2826#if canImport(NIOSSL)
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- #if swift(>=5.6)
17- @preconcurrency import NIOCore
18- #else
1916import NIOCore
20- #endif // swift(>=5.6)
2117
2218/// Provides keepalive pings.
2319///
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- #if swift(>=5.6)
17- @preconcurrency import Logging
18- @preconcurrency import NIOCore
19- #else
2016import Logging
2117import NIOCore
22- #endif // swift(>=5.6)
2318import NIOPosix
2419
2520public enum GRPCChannelPool {
Original file line number Diff line number Diff line change @@ -121,7 +121,13 @@ public protocol ClientBootstrapProtocol {
121121
122122 func connectTimeout( _ timeout: TimeAmount ) -> Self
123123 func channelOption< T> ( _ option: T , value: T . Value ) -> Self where T: ChannelOption
124+
125+ #if swift(>=5.7)
126+ @preconcurrency
127+ func channelInitializer( _ handler: @escaping @Sendable ( Channel ) -> EventLoopFuture < Void > ) -> Self
128+ #else
124129 func channelInitializer( _ handler: @escaping ( Channel ) -> EventLoopFuture < Void > ) -> Self
130+ #endif
125131}
126132
127133extension ClientBootstrapProtocol {
@@ -149,10 +155,25 @@ public protocol ServerBootstrapProtocol {
149155 func bind( unixDomainSocketPath: String ) -> EventLoopFuture < Channel >
150156 func withBoundSocket( _ connectedSocket: NIOBSDSocket . Handle ) -> EventLoopFuture < Channel >
151157
152- func serverChannelInitializer( _ initializer: @escaping ( Channel ) -> EventLoopFuture < Void > ) -> Self
158+ #if swift(>=5.7)
159+ @preconcurrency
160+ func serverChannelInitializer(
161+ _ handler: @escaping @Sendable ( Channel ) -> EventLoopFuture < Void >
162+ ) -> Self
163+ #else
164+ func serverChannelInitializer( _ handler: @escaping ( Channel ) -> EventLoopFuture < Void > ) -> Self
165+ #endif
166+
153167 func serverChannelOption< T> ( _ option: T , value: T . Value ) -> Self where T: ChannelOption
154168
155- func childChannelInitializer( _ initializer: @escaping ( Channel ) -> EventLoopFuture < Void > ) -> Self
169+ #if swift(>=5.7)
170+ @preconcurrency
171+ func childChannelInitializer( _ handler: @escaping @Sendable ( Channel ) -> EventLoopFuture < Void > )
172+ -> Self
173+ #else
174+ func childChannelInitializer( _ handler: @escaping ( Channel ) -> EventLoopFuture < Void > ) -> Self
175+ #endif
176+
156177 func childChannelOption< T> ( _ option: T , value: T . Value ) -> Self where T: ChannelOption
157178}
158179
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616import Dispatch
17- #if swift(>=5.6)
18- @preconcurrency import NIOCore
19- #else
2017import NIOCore
21- #endif // swift(>=5.6)
2218
2319/// A time limit for an RPC.
2420///
You can’t perform that action at this time.
0 commit comments