Преглед на файлове

import FoundationNetworking if possible (#586)

Motivation:

On Swift 5.1 for Linux, `URLSession` has moved to a new
`FoundationNetworking` module.

Modifications:

Import the module when it's present.

Result:

grpc-swift compiles on Swift 5.1 for Linux
Kevin Sweeney преди 6 години
родител
ревизия
847a977798
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      Tests/GRPCTests/ServerWebTests.swift

+ 3 - 0
Tests/GRPCTests/ServerWebTests.swift

@@ -14,6 +14,9 @@
  * limitations under the License.
  */
 import Foundation
+#if canImport(FoundationNetworking)
+import FoundationNetworking
+#endif
 import NIO
 @testable import GRPC
 import EchoModel