Skip to content

Commit

Permalink
Remove preconcurrency imports of NIOHPACK (#1435)
Browse files Browse the repository at this point in the history
Motivation:

Support for Sendable was added to swift-nio-http2 in 1.22.0 so the
`@preconcurrency` import of `NIOHPACK` is no longer required (and
produces warnings).

Modifications:

- Update minimum HTTP/2 version
- Remove `@preconcurrency` from `NIOHPACK` imports

Result:

Fewer warnings
  • Loading branch information
glbrntt authored Jun 9, 2022
1 parent 39dde7a commit 41b9c16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let packageDependencies: [Package.Dependency] = [
),
.package(
url: "https://github.com/apple/swift-nio-http2.git",
from: "1.19.2"
from: "1.22.0"
),
.package(
url: "https://github.com/apple/swift-nio-transport-services.git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@preconcurrency import Logging
import NIOConcurrencyHelpers
@preconcurrency import NIOHPACK
import NIOHPACK

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public struct GRPCAsyncServerCallContext: Sendable {
Expand Down
3 changes: 1 addition & 2 deletions Sources/GRPC/CallOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ import struct Foundation.UUID
#if swift(>=5.6)
@preconcurrency import Logging
@preconcurrency import NIOCore
@preconcurrency import NIOHPACK
#else
import Logging
import NIOCore
import NIOHPACK
#endif // swift(>=5.6)

import NIOHPACK
import NIOHTTP1
import NIOHTTP2

Expand Down

0 comments on commit 41b9c16

Please sign in to comment.