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

Raise minimum Swift version for async/await (#1379)

Motivation:

The latest 5.5 Swift compiler is not too pleased with some of the
`Sendable` annotations which causes the compiler to crash. This is fixed
in 5.6. Given we haven't released this to 'main' yet and Swift 5.6 has
been around for a little while we should just raise the minimum Swift
version which supports async/await.

Modifications:

- Raise the minimum Swift version for async/await to 5.6.

Result:

Compiler is happier.
George Barnett преди 3 години
родител
ревизия
3c14378116
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      Sources/protoc-gen-grpc-swift/Generator.swift

+ 2 - 2
Sources/protoc-gen-grpc-swift/Generator.swift

@@ -170,10 +170,10 @@ class Generator {
   }
 
   func printIfCompilerGuardForAsyncAwait() {
-    self.println("#if compiler(>=5.5.2) && canImport(_Concurrency)")
+    self.println("#if compiler(>=5.6)")
   }
 
   func printEndCompilerGuardForAsyncAwait() {
-    self.println("#endif // compiler(>=5.5.2) && canImport(_Concurrency)")
+    self.println("#endif // compiler(>=5.6)")
   }
 }