swift-server / swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Apache License 2.0
1.13k stars 102 forks source link

Renamed completeWithAsync to completeWithTask #221

Closed saltzmanjoelh closed 3 years ago

saltzmanjoelh commented 3 years ago

In swift-nio completeWithAsync was renamed to completeWithTask https://github.com/apple/swift-nio/commit/e66b64e4e3e3409729befb31d894b89062e003dc

Motivation:

completeWithAsync causes build errors on macOS 12 and Xcode 13

Modifications:

Renamed completeWithAsync to completeWithTask

Result:

No more build errors

swift-server-bot commented 3 years ago

Can one of the admins verify this patch?

swift-server-bot commented 3 years ago

Can one of the admins verify this patch?

swift-server-bot commented 3 years ago

Can one of the admins verify this patch?

swift-server-bot commented 3 years ago

Can one of the admins verify this patch?

swift-server-bot commented 3 years ago

Can one of the admins verify this patch?

swift-server-bot commented 3 years ago

Can one of the admins verify this patch?

swift-server-bot commented 3 years ago

Can one of the admins verify this patch?

fabianfett commented 3 years ago

@swift-server-bot test this please

fabianfett commented 3 years ago

@tomerd I think we should cherry-pick this with #218 into a patch release.

saltzmanjoelh commented 3 years ago

@saltzmanjoelh Thanks for providing this fix. Since this change was made in the latest SwiftNIO release, we will need to update the SwiftNIO requirement to 2.32.0 in the Package.swift as well.

On it...

saltzmanjoelh commented 3 years ago

@fabianfett Done.

https://github.com/swift-server/swift-aws-lambda-runtime/pull/221/commits/e78f903c3e018b73502df8faf74682cfb77c938f

fabianfett commented 3 years ago

@swift-server-bot test this please

tomerd commented 3 years ago

thanks @saltzmanjoelh

saltzmanjoelh commented 3 years ago

@tomerd My pleasure.

Is it failing on 5.6 though? https://ci.swiftserver.group/job/swift-aws-lambda-runtime-swift-nightly-prb/86/console

12:42:48 [187/219] Compiling _NIOConcurrency AsyncAwaitSupport.swift
12:42:48 /code/.build/checkouts/swift-nio/Sources/_NIOConcurrency/AsyncAwaitSupport.swift:72:39: error: cannot use parameter 'body' with a non-sendable type '() async throws -> Value' from concurrently-executed code
12:42:48                 let value = try await body()
12:42:48                                       ^

12:42:48 /code/.build/checkouts/swift-nio/Sources/_NIOConcurrency/AsyncAwaitSupport.swift:72:39: note: a function type must be marked '@Sendable' to conform to 'Sendable'
12:42:48                 let value = try await body()
12:42:48                                       ^
12:42:48 error: fatalError
12:42:49 Build step 'Execute shell' marked build as failure
fabianfett commented 3 years ago

@saltzmanjoelh this is an issue in SwiftNIO: https://github.com/apple/swift-nio/pull/1943

saltzmanjoelh commented 3 years ago

@fabianfett Ah! Ok thanks!