Browse Source

Use more specific NIO imports (#1239)

Motivation:

The `NIO` module is now a 'shell' module which re-exports `NIOCore`,
`NIOPosix` and `NIOEmbeeded`.

Modifications:

For the GRPC and GRPCTests modules:
- Replace "import NIO" with "import NIOCore"
- Add imports for NIOEmbeeded and NIOPosix as necessary

Result:

Imports are closer to what we actually use.
George Barnett 4 years ago
parent
commit
c88f038cde
100 changed files with 134 additions and 104 deletions
  1. 11 5
      Package.swift
  2. 1 1
      Sources/GRPC/CallHandlers/BidirectionalStreamingServerHandler.swift
  3. 1 1
      Sources/GRPC/CallHandlers/ClientStreamingServerHandler.swift
  4. 1 1
      Sources/GRPC/CallHandlers/ServerHandlerProtocol.swift
  5. 1 1
      Sources/GRPC/CallHandlers/ServerStreamingServerHandler.swift
  6. 1 1
      Sources/GRPC/CallHandlers/UnaryServerHandler.swift
  7. 1 1
      Sources/GRPC/CallOptions.swift
  8. 1 1
      Sources/GRPC/ClientCalls/BidirectionalStreamingCall.swift
  9. 1 1
      Sources/GRPC/ClientCalls/Call.swift
  10. 1 1
      Sources/GRPC/ClientCalls/ClientCall.swift
  11. 1 1
      Sources/GRPC/ClientCalls/ClientStreamingCall.swift
  12. 1 1
      Sources/GRPC/ClientCalls/LazyEventLoopPromise.swift
  13. 1 1
      Sources/GRPC/ClientCalls/ResponseContainers.swift
  14. 1 1
      Sources/GRPC/ClientCalls/ResponsePartContainer.swift
  15. 1 1
      Sources/GRPC/ClientCalls/ServerStreamingCall.swift
  16. 1 1
      Sources/GRPC/ClientCalls/UnaryCall.swift
  17. 1 1
      Sources/GRPC/ClientConnection.swift
  18. 1 1
      Sources/GRPC/Compression/Zlib.swift
  19. 1 1
      Sources/GRPC/ConnectionKeepalive.swift
  20. 1 1
      Sources/GRPC/ConnectionManager.swift
  21. 2 1
      Sources/GRPC/ConnectionManagerChannelProvider.swift
  22. 1 1
      Sources/GRPC/ConnectionPool/ConnectionPool+Waiter.swift
  23. 1 1
      Sources/GRPC/ConnectionPool/ConnectionPool.swift
  24. 1 1
      Sources/GRPC/ConnectionPool/PoolManager.swift
  25. 1 1
      Sources/GRPC/ConnectionPool/PoolManagerStateMachine+PerPoolState.swift
  26. 1 1
      Sources/GRPC/ConnectionPool/PoolManagerStateMachine.swift
  27. 1 1
      Sources/GRPC/ConnectivityState.swift
  28. 1 1
      Sources/GRPC/DelegatingErrorHandler.swift
  29. 2 1
      Sources/GRPC/FakeChannel.swift
  30. 2 1
      Sources/GRPC/GRPCChannel/EmbeddedGRPCChannel.swift
  31. 1 1
      Sources/GRPC/GRPCChannel/GRPCChannel.swift
  32. 1 1
      Sources/GRPC/GRPCChannel/GRPCChannelBuilder.swift
  33. 1 1
      Sources/GRPC/GRPCClient.swift
  34. 1 1
      Sources/GRPC/GRPCClientChannelHandler.swift
  35. 1 1
      Sources/GRPC/GRPCClientStateMachine.swift
  36. 1 1
      Sources/GRPC/GRPCIdleHandler.swift
  37. 1 1
      Sources/GRPC/GRPCIdleHandlerStateMachine.swift
  38. 1 1
      Sources/GRPC/GRPCKeepaliveHandlers.swift
  39. 1 1
      Sources/GRPC/GRPCLogger.swift
  40. 1 1
      Sources/GRPC/GRPCPayload.swift
  41. 1 1
      Sources/GRPC/GRPCServerPipelineConfigurator.swift
  42. 1 1
      Sources/GRPC/GRPCServerRequestRoutingHandler.swift
  43. 1 1
      Sources/GRPC/GRPCStatus.swift
  44. 1 1
      Sources/GRPC/GRPCTimeout.swift
  45. 1 1
      Sources/GRPC/GRPCWebToHTTP2ServerCodec.swift
  46. 1 1
      Sources/GRPC/HTTP2ToRawGRPCServerCodec.swift
  47. 1 1
      Sources/GRPC/HTTP2ToRawGRPCStateMachine.swift
  48. 1 1
      Sources/GRPC/Interceptor/ClientInterceptorContext.swift
  49. 1 1
      Sources/GRPC/Interceptor/ClientInterceptorPipeline.swift
  50. 1 1
      Sources/GRPC/Interceptor/ClientInterceptorProtocol.swift
  51. 1 1
      Sources/GRPC/Interceptor/ClientInterceptors.swift
  52. 1 1
      Sources/GRPC/Interceptor/ClientTransport.swift
  53. 1 1
      Sources/GRPC/Interceptor/ClientTransportFactory.swift
  54. 1 1
      Sources/GRPC/Interceptor/ServerInterceptorContext.swift
  55. 1 1
      Sources/GRPC/Interceptor/ServerInterceptorPipeline.swift
  56. 1 1
      Sources/GRPC/Interceptor/ServerInterceptors.swift
  57. 1 1
      Sources/GRPC/LengthPrefixedMessageReader.swift
  58. 1 1
      Sources/GRPC/LengthPrefixedMessageWriter.swift
  59. 1 1
      Sources/GRPC/Logger.swift
  60. 2 1
      Sources/GRPC/PlatformSupport.swift
  61. 1 1
      Sources/GRPC/ReadWriteStates.swift
  62. 1 1
      Sources/GRPC/Serialization.swift
  63. 2 1
      Sources/GRPC/Server.swift
  64. 1 1
      Sources/GRPC/ServerBuilder.swift
  65. 1 1
      Sources/GRPC/ServerCallContexts/ServerCallContext.swift
  66. 1 1
      Sources/GRPC/ServerCallContexts/StreamingResponseCallContext.swift
  67. 1 1
      Sources/GRPC/ServerCallContexts/UnaryResponseCallContext.swift
  68. 1 1
      Sources/GRPC/ServerChannelErrorHandler.swift
  69. 1 1
      Sources/GRPC/ServerErrorDelegate.swift
  70. 1 1
      Sources/GRPC/TLSVerificationHandler.swift
  71. 1 1
      Sources/GRPC/TimeLimit.swift
  72. 1 1
      Sources/GRPC/WebCORSHandler.swift
  73. 1 1
      Sources/GRPC/WriteCapturingHandler.swift
  74. 2 1
      Sources/GRPC/_EmbeddedThroughput.swift
  75. 2 1
      Sources/GRPC/_FakeResponseStream.swift
  76. 1 1
      Sources/GRPC/_GRPCClientCodecHandler.swift
  77. 1 1
      Tests/GRPCTests/BasicEchoTestCase.swift
  78. 2 1
      Tests/GRPCTests/CallStartBehaviorTests.swift
  79. 2 1
      Tests/GRPCTests/ClientCallTests.swift
  80. 1 1
      Tests/GRPCTests/ClientClosedChannelTests.swift
  81. 2 1
      Tests/GRPCTests/ClientConnectionBackoffTests.swift
  82. 2 1
      Tests/GRPCTests/ClientEventLoopPreferenceTests.swift
  83. 2 1
      Tests/GRPCTests/ClientInterceptorPipelineTests.swift
  84. 2 1
      Tests/GRPCTests/ClientTLSFailureTests.swift
  85. 2 1
      Tests/GRPCTests/ClientTLSTests.swift
  86. 2 1
      Tests/GRPCTests/ClientTimeoutTests.swift
  87. 2 1
      Tests/GRPCTests/ClientTransportTests.swift
  88. 1 1
      Tests/GRPCTests/Codegen/Normalization/NormalizationProvider.swift
  89. 2 1
      Tests/GRPCTests/Codegen/Normalization/NormalizationTests.swift
  90. 2 1
      Tests/GRPCTests/CompressionTests.swift
  91. 2 1
      Tests/GRPCTests/ConnectionFailingTests.swift
  92. 2 1
      Tests/GRPCTests/ConnectionManagerTests.swift
  93. 2 1
      Tests/GRPCTests/ConnectionPool/ConnectionPoolTests.swift
  94. 2 1
      Tests/GRPCTests/ConnectionPool/PoolManagerStateMachineTests.swift
  95. 2 1
      Tests/GRPCTests/DebugChannelInitializerTests.swift
  96. 2 1
      Tests/GRPCTests/DelegatingErrorHandlerTests.swift
  97. 1 1
      Tests/GRPCTests/EchoHelpers/Interceptors/DelegatingClientInterceptor.swift
  98. 1 1
      Tests/GRPCTests/EchoHelpers/Providers/DelegatingOnCloseEchoProvider.swift
  99. 1 1
      Tests/GRPCTests/EchoHelpers/Providers/FailingEchoProvider.swift
  100. 1 1
      Tests/GRPCTests/EchoHelpers/Providers/NeverResolvingEchoProvider.swift

+ 11 - 5
Package.swift

@@ -26,13 +26,13 @@ let package = Package(
   dependencies: [
     // GRPC dependencies:
     // Main SwiftNIO package
-    .package(url: "https://github.com/apple/swift-nio.git", from: "2.28.0"),
+    .package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"),
     // HTTP2 via SwiftNIO
-    .package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.17.0"),
+    .package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.18.2"),
     // TLS via SwiftNIO
     .package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.14.0"),
     // Support for Network.framework where possible.
-    .package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.6.0"),
+    .package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.11.1"),
     // Extra NIO stuff; quiescing helpers.
     .package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.4.0"),
 
@@ -46,8 +46,8 @@ let package = Package(
     // Logging API.
     .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
 
-    // Argument parsering: only for internal targets (i.e. examples).
-    // swift-argument-parser only provides source compatability guarantees between minor version.
+    // Argument parsing: only for internal targets (i.e. examples).
+    // swift-argument-parser only provides source compatibility guarantees between minor version.
     .package(url: "https://github.com/apple/swift-argument-parser", "0.3.0" ..< "0.5.0"),
   ],
   targets: [
@@ -56,6 +56,9 @@ let package = Package(
       name: "GRPC",
       dependencies: [
         .product(name: "NIO", package: "swift-nio"),
+        .product(name: "NIOCore", package: "swift-nio"),
+        .product(name: "NIOPosix", package: "swift-nio"),
+        .product(name: "NIOEmbedded", package: "swift-nio"),
         .product(name: "NIOFoundationCompat", package: "swift-nio"),
         .product(name: "NIOTransportServices", package: "swift-nio-transport-services"),
         .product(name: "NIOHTTP1", package: "swift-nio"),
@@ -76,6 +79,9 @@ let package = Package(
         .target(name: "GRPCSampleData"),
         .target(name: "GRPCInteroperabilityTestsImplementation"),
         .target(name: "HelloWorldModel"),
+        .product(name: "NIOCore", package: "swift-nio"),
+        .product(name: "NIOPosix", package: "swift-nio"),
+        .product(name: "NIOEmbedded", package: "swift-nio"),
       ]
     ),
 

+ 1 - 1
Sources/GRPC/CallHandlers/BidirectionalStreamingServerHandler.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHPACK
 
 public final class BidirectionalStreamingServerHandler<

+ 1 - 1
Sources/GRPC/CallHandlers/ClientStreamingServerHandler.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHPACK
 
 public final class ClientStreamingServerHandler<

+ 1 - 1
Sources/GRPC/CallHandlers/ServerHandlerProtocol.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHPACK
 
 /// This protocol lays out the inbound interface between the gRPC module and generated server code.

+ 1 - 1
Sources/GRPC/CallHandlers/ServerStreamingServerHandler.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHPACK
 
 public final class ServerStreamingServerHandler<

+ 1 - 1
Sources/GRPC/CallHandlers/UnaryServerHandler.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHPACK
 
 public final class UnaryServerHandler<

+ 1 - 1
Sources/GRPC/CallOptions.swift

@@ -15,7 +15,7 @@
  */
 import struct Foundation.UUID
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import NIOHTTP2

+ 1 - 1
Sources/GRPC/ClientCalls/BidirectionalStreamingCall.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP2
 

+ 1 - 1
Sources/GRPC/ClientCalls/Call.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP2
 import protocol SwiftProtobuf.Message

+ 1 - 1
Sources/GRPC/ClientCalls/ClientCall.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Foundation
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import NIOHTTP2

+ 1 - 1
Sources/GRPC/ClientCalls/ClientStreamingCall.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP2
 

+ 1 - 1
Sources/GRPC/ClientCalls/LazyEventLoopPromise.swift

@@ -13,8 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
 
 extension EventLoop {
   internal func makeLazyPromise<Value>(of: Value.Type = Value.self) -> LazyEventLoopPromise<Value> {

+ 1 - 1
Sources/GRPC/ClientCalls/ResponseContainers.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHPACK
 
 /// A bucket of promises for a unary-response RPC.

+ 1 - 1
Sources/GRPC/ClientCalls/ResponsePartContainer.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHPACK
 
 /// A container for RPC response parts.

+ 1 - 1
Sources/GRPC/ClientCalls/ServerStreamingCall.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP2
 

+ 1 - 1
Sources/GRPC/ClientCalls/UnaryCall.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import NIOHTTP2

+ 1 - 1
Sources/GRPC/ClientConnection.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOHTTP2
 import NIOSSL
 import NIOTLS

+ 1 - 1
Sources/GRPC/Compression/Zlib.swift

@@ -15,7 +15,7 @@
  */
 import CGRPCZlib
 import struct Foundation.Data
-import NIO
+import NIOCore
 
 /// Provides minimally configurable wrappers around zlib's compression and decompression
 /// functionality.

+ 1 - 1
Sources/GRPC/ConnectionKeepalive.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 /// Provides keepalive pings.
 ///

+ 1 - 1
Sources/GRPC/ConnectionManager.swift

@@ -15,8 +15,8 @@
  */
 import Foundation
 import Logging
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
 import NIOHTTP2
 
 internal final class ConnectionManager {

+ 2 - 1
Sources/GRPC/ConnectionManagerChannelProvider.swift

@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
+import NIOPosix
 import NIOSSL
 import NIOTransportServices
 

+ 1 - 1
Sources/GRPC/ConnectionPool/ConnectionPool+Waiter.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHTTP2
 
 extension ConnectionPool {

+ 1 - 1
Sources/GRPC/ConnectionPool/ConnectionPool.swift

@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 import Logging
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
 import NIOHTTP2
 
 internal final class ConnectionPool {

+ 1 - 1
Sources/GRPC/ConnectionPool/PoolManager.swift

@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 import Logging
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
 
 internal final class PoolManager {
   /// Configuration used for each connection pool.

+ 1 - 1
Sources/GRPC/ConnectionPool/PoolManagerStateMachine+PerPoolState.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 extension PoolManagerStateMachine.ActiveState {
   internal struct PerPoolState {

+ 1 - 1
Sources/GRPC/ConnectionPool/PoolManagerStateMachine.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 internal struct PoolManagerStateMachine {
   /// The current state.

+ 1 - 1
Sources/GRPC/ConnectivityState.swift

@@ -15,8 +15,8 @@
  */
 import Foundation
 import Logging
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
 
 /// The connectivity state of a client connection. Note that this is heavily lifted from the gRPC
 /// documentation: https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md.

+ 1 - 1
Sources/GRPC/DelegatingErrorHandler.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOSSL
 
 /// A channel handler which allows caught errors to be passed to a `ClientErrorDelegate`. This

+ 2 - 1
Sources/GRPC/FakeChannel.swift

@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
+import NIOEmbedded
 import SwiftProtobuf
 
 /// A fake channel for use with generated test clients.

+ 2 - 1
Sources/GRPC/GRPCChannel/EmbeddedGRPCChannel.swift

@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
+import NIOEmbedded
 import NIOHTTP2
 import SwiftProtobuf
 

+ 1 - 1
Sources/GRPC/GRPCChannel/GRPCChannel.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHTTP2
 import NIOSSL
 import SwiftProtobuf

+ 1 - 1
Sources/GRPC/GRPCChannel/GRPCChannelBuilder.swift

@@ -15,7 +15,7 @@
  */
 import Dispatch
 import Logging
-import NIO
+import NIOCore
 import NIOSSL
 
 #if canImport(Security)

+ 1 - 1
Sources/GRPC/GRPCClient.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHTTP2
 import SwiftProtobuf
 

+ 1 - 1
Sources/GRPC/GRPCClientChannelHandler.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import NIOHTTP2

+ 1 - 1
Sources/GRPC/GRPCClientStateMachine.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import SwiftProtobuf

+ 1 - 1
Sources/GRPC/GRPCIdleHandler.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHTTP2
 
 internal final class GRPCIdleHandler: ChannelInboundHandler {

+ 1 - 1
Sources/GRPC/GRPCIdleHandlerStateMachine.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHTTP2
 
 /// Holds state for the 'GRPCIdleHandler', this isn't really just the idleness of the connection,

+ 1 - 1
Sources/GRPC/GRPCKeepaliveHandlers.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHTTP2
 
 struct PingHandler {

+ 1 - 1
Sources/GRPC/GRPCLogger.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 
 /// Wraps `Logger` to always provide the source as "GRPC".
 ///

+ 1 - 1
Sources/GRPC/GRPCPayload.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 /// A data type which may be serialized into and out from a `ByteBuffer` in order to be sent between
 /// gRPC peers.

+ 1 - 1
Sources/GRPC/GRPCServerPipelineConfigurator.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import NIOHTTP2

+ 1 - 1
Sources/GRPC/GRPCServerRequestRoutingHandler.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import NIOHTTP2

+ 1 - 1
Sources/GRPC/GRPCStatus.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Foundation
-import NIO
+import NIOCore
 import NIOHTTP1
 import NIOHTTP2
 

+ 1 - 1
Sources/GRPC/GRPCTimeout.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Dispatch
-import NIO
+import NIOCore
 
 /// A timeout for a gRPC call.
 ///

+ 1 - 1
Sources/GRPC/GRPCWebToHTTP2ServerCodec.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import struct Foundation.Data
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import NIOHTTP2

+ 1 - 1
Sources/GRPC/HTTP2ToRawGRPCServerCodec.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP2
 

+ 1 - 1
Sources/GRPC/HTTP2ToRawGRPCStateMachine.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP2
 

+ 1 - 1
Sources/GRPC/Interceptor/ClientInterceptorContext.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 
 public struct ClientInterceptorContext<Request, Response> {
   /// The interceptor this context is for.

+ 1 - 1
Sources/GRPC/Interceptor/ClientInterceptorPipeline.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP2
 

+ 1 - 1
Sources/GRPC/Interceptor/ClientInterceptorProtocol.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 internal protocol ClientInterceptorProtocol {
   associatedtype Request

+ 1 - 1
Sources/GRPC/Interceptor/ClientInterceptors.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 /// A base class for client interceptors.
 ///

+ 1 - 1
Sources/GRPC/Interceptor/ClientTransport.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP2
 

+ 1 - 1
Sources/GRPC/Interceptor/ClientTransportFactory.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHTTP2
 import protocol SwiftProtobuf.Message
 

+ 1 - 1
Sources/GRPC/Interceptor/ServerInterceptorContext.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 
 public struct ServerInterceptorContext<Request, Response> {
   /// The interceptor this context is for.

+ 1 - 1
Sources/GRPC/Interceptor/ServerInterceptorPipeline.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 
 @usableFromInline
 internal final class ServerInterceptorPipeline<Request, Response> {

+ 1 - 1
Sources/GRPC/Interceptor/ServerInterceptors.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 /// A base class for server interceptors.
 ///

+ 1 - 1
Sources/GRPC/LengthPrefixedMessageReader.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOHTTP1
 
 /// This class reads and decodes length-prefixed gRPC messages.

+ 1 - 1
Sources/GRPC/LengthPrefixedMessageWriter.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Foundation
-import NIO
+import NIOCore
 
 internal struct LengthPrefixedMessageWriter {
   static let metadataLength = 5

+ 1 - 1
Sources/GRPC/Logger.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 
 /// Keys for `Logger` metadata.
 enum MetadataKey {

+ 2 - 1
Sources/GRPC/PlatformSupport.swift

@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
+import NIOPosix
 import NIOSSL
 import NIOTransportServices
 

+ 1 - 1
Sources/GRPC/ReadWriteStates.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import SwiftProtobuf
 
 /// Number of messages expected on a stream.

+ 1 - 1
Sources/GRPC/Serialization.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOFoundationCompat
 import SwiftProtobuf
 

+ 2 - 1
Sources/GRPC/Server.swift

@@ -15,10 +15,11 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOExtras
 import NIOHTTP1
 import NIOHTTP2
+import NIOPosix
 import NIOSSL
 import NIOTransportServices
 #if canImport(Network)

+ 1 - 1
Sources/GRPC/ServerBuilder.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
 import NIOSSL
 
 #if canImport(Network)

+ 1 - 1
Sources/GRPC/ServerCallContexts/ServerCallContext.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import SwiftProtobuf

+ 1 - 1
Sources/GRPC/ServerCallContexts/StreamingResponseCallContext.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import SwiftProtobuf

+ 1 - 1
Sources/GRPC/ServerCallContexts/UnaryResponseCallContext.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 import SwiftProtobuf

+ 1 - 1
Sources/GRPC/ServerChannelErrorHandler.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 /// A handler that passes errors thrown into the server channel to the server error delegate.
 ///

+ 1 - 1
Sources/GRPC/ServerErrorDelegate.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Foundation
-import NIO
+import NIOCore
 import NIOHPACK
 import NIOHTTP1
 

+ 1 - 1
Sources/GRPC/TLSVerificationHandler.swift

@@ -15,7 +15,7 @@
  */
 import Foundation
 import Logging
-import NIO
+import NIOCore
 import NIOSSL
 import NIOTLS
 

+ 1 - 1
Sources/GRPC/TimeLimit.swift

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 import Dispatch
-import NIO
+import NIOCore
 
 /// A time limit for an RPC.
 ///

+ 1 - 1
Sources/GRPC/WebCORSHandler.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 import NIOHTTP1
 
 /// Handler that manages the CORS protocol for requests incoming from the browser.

+ 1 - 1
Sources/GRPC/WriteCapturingHandler.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 /// A handler which redirects all writes into a callback until the `.end` part is seen, after which
 /// all writes will be failed.

+ 2 - 1
Sources/GRPC/_EmbeddedThroughput.swift

@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 import Logging
-import NIO
+import NIOCore
+import NIOEmbedded
 import SwiftProtobuf
 
 extension EmbeddedChannel {

+ 2 - 1
Sources/GRPC/_FakeResponseStream.swift

@@ -13,7 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
+import NIOEmbedded
 import NIOHPACK
 
 public enum FakeRequestPart<Request> {

+ 1 - 1
Sources/GRPC/_GRPCClientCodecHandler.swift

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import NIO
+import NIOCore
 
 internal class GRPCClientCodecHandler<
   Serializer: MessageSerializer,

+ 1 - 1
Tests/GRPCTests/BasicEchoTestCase.swift

@@ -19,7 +19,7 @@ import EchoModel
 import Foundation
 import GRPC
 import GRPCSampleData
-import NIO
+import NIOCore
 import NIOSSL
 import XCTest
 

+ 2 - 1
Tests/GRPCTests/CallStartBehaviorTests.swift

@@ -15,7 +15,8 @@
  */
 import EchoModel
 import GRPC
-import NIO
+import NIOCore
+import NIOPosix
 import XCTest
 
 class CallStartBehaviorTests: GRPCTestCase {

+ 2 - 1
Tests/GRPCTests/ClientCallTests.swift

@@ -16,7 +16,8 @@
 import EchoImplementation
 import EchoModel
 @testable import GRPC
-import NIO
+import NIOCore
+import NIOPosix
 import XCTest
 
 class ClientCallTests: GRPCTestCase {

+ 1 - 1
Tests/GRPCTests/ClientClosedChannelTests.swift

@@ -16,7 +16,7 @@
 import EchoModel
 import Foundation
 import GRPC
-import NIO
+import NIOCore
 import XCTest
 
 class ClientClosedChannelTests: EchoTestCaseBase {

+ 2 - 1
Tests/GRPCTests/ClientConnectionBackoffTests.swift

@@ -17,8 +17,9 @@ import EchoImplementation
 import EchoModel
 import Foundation
 import GRPC
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
+import NIOPosix
 import XCTest
 
 class ClientConnectionBackoffTests: GRPCTestCase {

+ 2 - 1
Tests/GRPCTests/ClientEventLoopPreferenceTests.swift

@@ -16,7 +16,8 @@
 import EchoImplementation
 import EchoModel
 import GRPC
-import NIO
+import NIOCore
+import NIOPosix
 import XCTest
 
 final class ClientEventLoopPreferenceTests: GRPCTestCase {

+ 2 - 1
Tests/GRPCTests/ClientInterceptorPipelineTests.swift

@@ -15,7 +15,8 @@
  */
 @testable import GRPC
 import Logging
-import NIO
+import NIOCore
+import NIOEmbedded
 import NIOHPACK
 import XCTest
 

+ 2 - 1
Tests/GRPCTests/ClientTLSFailureTests.swift

@@ -18,8 +18,9 @@ import EchoModel
 @testable import GRPC
 import GRPCSampleData
 import Logging
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
+import NIOPosix
 import NIOSSL
 import XCTest
 

+ 2 - 1
Tests/GRPCTests/ClientTLSTests.swift

@@ -18,7 +18,8 @@ import EchoModel
 import Foundation
 import GRPC
 import GRPCSampleData
-import NIO
+import NIOCore
+import NIOPosix
 import NIOSSL
 import XCTest
 

+ 2 - 1
Tests/GRPCTests/ClientTimeoutTests.swift

@@ -16,7 +16,8 @@
 import EchoModel
 import Foundation
 @testable import GRPC
-import NIO
+import NIOCore
+import NIOEmbedded
 import XCTest
 
 class ClientTimeoutTests: GRPCTestCase {

+ 2 - 1
Tests/GRPCTests/ClientTransportTests.swift

@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 @testable import GRPC
-import NIO
+import NIOCore
+import NIOEmbedded
 import XCTest
 
 class ClientTransportTests: GRPCTestCase {

+ 1 - 1
Tests/GRPCTests/Codegen/Normalization/NormalizationProvider.swift

@@ -15,7 +15,7 @@
  */
 
 import GRPC
-import NIO
+import NIOCore
 import SwiftProtobuf
 
 final class NormalizationProvider: Normalization_NormalizationProvider {

+ 2 - 1
Tests/GRPCTests/Codegen/Normalization/NormalizationTests.swift

@@ -15,7 +15,8 @@
  */
 
 import GRPC
-import NIO
+import NIOCore
+import NIOPosix
 import XCTest
 
 /// These tests validate that:

+ 2 - 1
Tests/GRPCTests/CompressionTests.swift

@@ -16,8 +16,9 @@
 import EchoImplementation
 import EchoModel
 import GRPC
-import NIO
+import NIOCore
 import NIOHPACK
+import NIOPosix
 import XCTest
 
 class MessageCompressionTests: GRPCTestCase {

+ 2 - 1
Tests/GRPCTests/ConnectionFailingTests.swift

@@ -15,7 +15,8 @@
  */
 import EchoModel
 import GRPC
-import NIO
+import NIOCore
+import NIOPosix
 import XCTest
 
 class ConnectionFailingTests: GRPCTestCase {

+ 2 - 1
Tests/GRPCTests/ConnectionManagerTests.swift

@@ -16,7 +16,8 @@
 import EchoModel
 @testable import GRPC
 import Logging
-import NIO
+import NIOCore
+import NIOEmbedded
 import NIOHTTP2
 import XCTest
 

+ 2 - 1
Tests/GRPCTests/ConnectionPool/ConnectionPoolTests.swift

@@ -15,7 +15,8 @@
  */
 @testable import GRPC
 import Logging
-import NIO
+import NIOCore
+import NIOEmbedded
 import NIOHTTP2
 import XCTest
 

+ 2 - 1
Tests/GRPCTests/ConnectionPool/PoolManagerStateMachineTests.swift

@@ -14,8 +14,9 @@
  * limitations under the License.
  */
 @testable import GRPC
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
+import NIOEmbedded
 import XCTest
 
 class PoolManagerStateMachineTests: GRPCTestCase {

+ 2 - 1
Tests/GRPCTests/DebugChannelInitializerTests.swift

@@ -16,8 +16,9 @@
 import EchoImplementation
 import EchoModel
 import GRPC
-import NIO
 import NIOConcurrencyHelpers
+import NIOCore
+import NIOPosix
 import XCTest
 
 class DebugChannelInitializerTests: GRPCTestCase {

+ 2 - 1
Tests/GRPCTests/DelegatingErrorHandlerTests.swift

@@ -16,7 +16,8 @@
 import Foundation
 @testable import GRPC
 import Logging
-import NIO
+import NIOCore
+import NIOEmbedded
 import NIOSSL
 import XCTest
 

+ 1 - 1
Tests/GRPCTests/EchoHelpers/Interceptors/DelegatingClientInterceptor.swift

@@ -15,7 +15,7 @@
  */
 import EchoModel
 import GRPC
-import NIO
+import NIOCore
 import SwiftProtobuf
 
 /// A client interceptor which delegates the implementation of `send` and `receive` to callbacks.

+ 1 - 1
Tests/GRPCTests/EchoHelpers/Providers/DelegatingOnCloseEchoProvider.swift

@@ -15,7 +15,7 @@
  */
 import EchoModel
 import GRPC
-import NIO
+import NIOCore
 
 /// An `Echo_EchoProvider` which sets `onClose` for each RPC and then calls a delegate to provide
 /// the RPC implementation.

+ 1 - 1
Tests/GRPCTests/EchoHelpers/Providers/FailingEchoProvider.swift

@@ -15,7 +15,7 @@
  */
 import EchoModel
 import GRPC
-import NIO
+import NIOCore
 
 /// An `Echo_EchoProvider` which always returns failed future for each RPC.
 class FailingEchoProvider: Echo_EchoProvider {

+ 1 - 1
Tests/GRPCTests/EchoHelpers/Providers/NeverResolvingEchoProvider.swift

@@ -15,7 +15,7 @@
  */
 import EchoModel
 import GRPC
-import NIO
+import NIOCore
 
 /// An `Echo_EchoProvider` which returns a failed future for each RPC which resolves in the distant
 /// future.

Some files were not shown because too many files changed in this diff