Browse Source

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 years ago
parent
commit
3c14378116
1 changed files with 2 additions and 2 deletions
  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() {
   func printIfCompilerGuardForAsyncAwait() {
-    self.println("#if compiler(>=5.5.2) && canImport(_Concurrency)")
+    self.println("#if compiler(>=5.6)")
   }
   }
 
 
   func printEndCompilerGuardForAsyncAwait() {
   func printEndCompilerGuardForAsyncAwait() {
-    self.println("#endif // compiler(>=5.5.2) && canImport(_Concurrency)")
+    self.println("#endif // compiler(>=5.6)")
   }
   }
 }
 }