Browse Source

Lower availability/compiler guards (#1364)

Motivation:

Concurrency support was backported to older OS versions in Swift 5.5.2;
we should lower our availability guards accordingly.

Modifications:

- Update compiler guards and availability in GRPC
- Update generated guards

Result:

Async gRPC is availabile on older OSs.
George Barnett 3 years ago
parent
commit
c1e892b4db
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Sources/protoc-gen-grpc-swift/Generator.swift

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

@@ -166,14 +166,14 @@ class Generator {
   }
 
   func printAvailabilityForAsyncAwait() {
-    self.println("@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)")
+    self.println("@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)")
   }
 
   func printIfCompilerGuardForAsyncAwait() {
-    self.println("#if compiler(>=5.5) && canImport(_Concurrency)")
+    self.println("#if compiler(>=5.5.2) && canImport(_Concurrency)")
   }
 
   func printEndCompilerGuardForAsyncAwait() {
-    self.println("#endif // compiler(>=5.5) && canImport(_Concurrency)")
+    self.println("#endif // compiler(>=5.5.2) && canImport(_Concurrency)")
   }
 }