Skip to content

Add support for Swift 6 concurrency #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sebsto opened this issue Jan 12, 2025 · 4 comments
Closed

Add support for Swift 6 concurrency #462

sebsto opened this issue Jan 12, 2025 · 4 comments
Labels
kind/enhancement Improvements to existing feature. semver/none No version bump required. size/S Small task. (A couple of hours of work.) status/blocked Waiting for another issue.
Milestone

Comments

@sebsto
Copy link
Contributor

sebsto commented Jan 12, 2025

Expected behavior

The project must compile in Swift 6 language mode with no warnings

Actual behavior

We enforce Swift 5 language mode on AWSLambdaRuntimeCore target because of concurrency warnings / errors on

Steps to reproduce

swift build -Xswiftc -strict-concurrency=complete

If possible, minimal yet complete reproducer code (or URL to code)

n/a

What version of this project (swift-aws-lambda-runtime) are you using?

main

Swift version

swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0

Amazon Linux 2 docker image version

swift:amazonlinux2

@sebsto sebsto added kind/enhancement Improvements to existing feature. status/blocked Waiting for another issue. semver/none No version bump required. size/S Small task. (A couple of hours of work.) labels Jan 12, 2025
@sebsto sebsto added this to the 2.0 milestone Jan 12, 2025
@sebsto
Copy link
Contributor Author

sebsto commented Jan 15, 2025

sebsto added a commit that referenced this issue Jan 22, 2025
This PR updates the 4 years old Lambda Local Server for Swift 6
concurrency.

This contributes to
#462
@sebsto
Copy link
Contributor Author

sebsto commented Jan 26, 2025

Compiling the library in Swift 6 mode causes the compiler to crash on Linux and macOS
see swiftlang/swift#78926

@sebsto
Copy link
Contributor Author

sebsto commented Jan 26, 2025

I think the LambdaHandlers.swift warning can be suppressed by just removing the sending keyword here

I tried and, all compiler errors / warning are gone and I can see any side effect on the examples.

I think it's safe to remove sending there. wdyt @fabianfett ?

@sebsto
Copy link
Contributor Author

sebsto commented Feb 27, 2025

Solved by #482

@sebsto sebsto closed this as completed Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements to existing feature. semver/none No version bump required. size/S Small task. (A couple of hours of work.) status/blocked Waiting for another issue.
Projects
None yet
Development

No branches or pull requests

1 participant