Skip to content

Commit 699ada1

Browse files
Add guards for code that relies on _Concurrency (#237)
This allows Xcode 13 to still compile on macOS 11 which does not have symbols for Concurrency yet See swift-server/swift-service-lifecycle#110
1 parent dc37ade commit 699ada1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: Sources/AWSLambdaRuntimeCore/LambdaHandler.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ extension LambdaHandler {
8888

8989
// MARK: - AsyncLambdaHandler
9090

91-
#if compiler(>=5.5)
91+
#if compiler(>=5.5) && canImport(_Concurrency)
9292
/// Strongly typed, processing protocol for a Lambda that takes a user defined `In` and returns a user defined `Out` async.
9393
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
9494
public protocol AsyncLambdaHandler: EventLoopLambdaHandler {

Diff for: Tests/AWSLambdaRuntimeCoreTests/LambdaHandlerTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class LambdaHandlerTest: XCTestCase {
7979
assertLambdaLifecycleResult(result, shoudHaveRun: maxTimes)
8080
}
8181

82-
#if compiler(>=5.5)
82+
#if compiler(>=5.5) && canImport(_Concurrency)
8383

8484
// MARK: - AsyncLambdaHandler
8585

0 commit comments

Comments
 (0)