Skip to content

Commit 23ac8dd

Browse files
committed
Adopt Concurrency adoption guidelines
1 parent 011e8dd commit 23ac8dd

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

Sources/AWSLambdaRuntimeCore/Lambda.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public enum Lambda {
5353
return String(cString: value)
5454
}
5555

56-
#if swift(>=5.5)
56+
#if compiler(>=5.5) && canImport(_Concurrency)
5757
// for testing and internal use
5858
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
5959
internal static func run<Handler: LambdaHandler>(configuration: Configuration = .init(), handlerType: Handler.Type) -> Result<Int, Error> {

Sources/AWSLambdaRuntimeCore/LambdaHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import NIOCore
1717

1818
// MARK: - LambdaHandler
1919

20-
#if compiler(>=5.5)
20+
#if compiler(>=5.5) && canImport(_Concurrency)
2121
/// Strongly typed, processing protocol for a Lambda that takes a user defined `Event` and returns a user defined `Output` async.
2222
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
2323
public protocol LambdaHandler: EventLoopLambdaHandler {

Sources/AWSLambdaTesting/Lambda+Testing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// XCTAssertEqual(result, "echo" + input)
3434
// }
3535

36-
#if swift(>=5.5)
36+
#if compiler(>=5.5) && canImport(_Concurrency)
3737
import AWSLambdaRuntime
3838
import AWSLambdaRuntimeCore
3939
import Dispatch

Tests/AWSLambdaRuntimeCoreTests/LambdaHandlerTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import NIOCore
1717
import XCTest
1818

1919
class LambdaHandlerTest: XCTestCase {
20-
#if compiler(>=5.5)
20+
#if compiler(>=5.5) && canImport(_Concurrency)
2121

2222
// MARK: - LambdaHandler
2323

Tests/AWSLambdaRuntimeTests/Lambda+CodeableTest.swift renamed to Tests/AWSLambdaRuntimeTests/Lambda+CodableTest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class CodableLambdaTest: XCTestCase {
8282
XCTAssertEqual(response?.requestId, request.requestId)
8383
}
8484

85-
#if swift(>=5.5)
85+
#if compiler(>=5.5) && canImport(_Concurrency)
8686
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
8787
func testCodableVoidHandler() {
8888
struct Handler: LambdaHandler {
@@ -183,7 +183,7 @@ private struct Response: Codable, Equatable {
183183
}
184184
}
185185

186-
#if swift(>=5.5)
186+
#if compiler(>=5.5) && canImport(_Concurrency)
187187
// NOTE: workaround until we have async test support on linux
188188
// https://github.com/apple/swift-corelibs-xctest/pull/326
189189
extension XCTestCase {

Tests/AWSLambdaTestingTests/Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
#if swift(>=5.5)
15+
#if compiler(>=5.5) && canImport(_Concurrency)
1616
import AWSLambdaRuntime
1717
import AWSLambdaTesting
1818
import NIOCore

0 commit comments

Comments
 (0)