Skip to content

Commit

Permalink
Add guards for code that relies on _Concurrency (#237)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
programmarchy authored Oct 5, 2021
1 parent dc37ade commit 699ada1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/AWSLambdaRuntimeCore/LambdaHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extension LambdaHandler {

// MARK: - AsyncLambdaHandler

#if compiler(>=5.5)
#if compiler(>=5.5) && canImport(_Concurrency)
/// Strongly typed, processing protocol for a Lambda that takes a user defined `In` and returns a user defined `Out` async.
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
public protocol AsyncLambdaHandler: EventLoopLambdaHandler {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AWSLambdaRuntimeCoreTests/LambdaHandlerTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class LambdaHandlerTest: XCTestCase {
assertLambdaLifecycleResult(result, shoudHaveRun: maxTimes)
}

#if compiler(>=5.5)
#if compiler(>=5.5) && canImport(_Concurrency)

// MARK: - AsyncLambdaHandler

Expand Down

0 comments on commit 699ada1

Please sign in to comment.