Skip to content

Commit b25ec0c

Browse files
committed
remove deprecated code and update to swift 6.1 minimum
1 parent 6d940b5 commit b25ec0c

7 files changed

Lines changed: 6 additions & 26 deletions

File tree

.github/workflows/integration_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ on:
4242
matrix_linux_swift_container_image:
4343
type: string
4444
# Note: we don't use Amazon Linux 2 here because zip is not installed by default.
45-
description: "Container image for the matrix test jobs. Defaults to Swift 6.2"
46-
default: "swift:6.2"
45+
description: "Container image for the matrix test jobs. Defaults to Swift 6.3"
46+
default: "swift:6.3"
4747

4848
## We are cancelling previously triggered workflow runs
4949
concurrency:

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
2626
with:
2727
enable_windows_checks: false
28-
linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}]"
28+
linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"6.0\"}]"
2929
swift_flags: "--explicit-target-dependency-import-check error"
3030
swift_nightly_flags: "--explicit-target-dependency-import-check error"
3131
enable_linux_static_sdk_build: true

Examples/ManagedInstances/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This example demonstrates deploying Swift Lambda functions to Lambda Managed Ins
1212

1313
- AWS CLI configured with appropriate permissions
1414
- SAM CLI installed
15-
- Swift 6.0+ installed
15+
- Swift 6.1+ installed
1616
- An existing [Lambda Managed Instances capacity provider](https://docs.aws.amazon.com/lambda/latest/dg/lambda-managed-instances-capacity-providers.html)
1717

1818
## Capacity Provider Configuration

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.2
1+
// swift-tools-version:6.1
22

33
import PackageDescription
44

Tests/AWSLambdaRuntimeTests/LocalServerPoolCancellationTests.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ struct LocalServerPoolCancellationTests {
3434
@Test("Cancelling one task should not affect other waiting tasks")
3535
@available(LambdaSwift 2.0, *)
3636
func testCancellationOnlyAffectsOwnTask() async throws {
37-
#if compiler(>=6.0)
3837
let pool = LambdaHTTPServer.Pool<TestItem>(name: "Test Pool")
3938

4039
let cancelledFlags = Mutex<[Bool]>([false, false, false])
@@ -95,9 +94,6 @@ struct LocalServerPoolCancellationTests {
9594
_ = await task2.result
9695
_ = await task3.result
9796

98-
#else
99-
throw XCTSkip("This test requires Swift 6.0 or later")
100-
#endif
10197
}
10298

10399
/// Test concurrent invocations with one being cancelled
@@ -107,8 +103,6 @@ struct LocalServerPoolCancellationTests {
107103
@Test("Multiple concurrent invocations with one cancellation")
108104
@available(LambdaSwift 2.0, *)
109105
func testConcurrentInvocationsWithCancellation() async throws {
110-
#if compiler(>=6.0)
111-
112106
try await withThrowingTaskGroup(of: Void.self) { group in
113107
// Timeout task
114108
group.addTask {
@@ -169,10 +163,6 @@ struct LocalServerPoolCancellationTests {
169163
try await group.next()
170164
group.cancelAll()
171165
}
172-
173-
#else
174-
throw XCTSkip("This test requires Swift 6.0 or later")
175-
#endif
176166
}
177167

178168
/// Test that FIFO mode doesn't have the same issue
@@ -181,7 +171,6 @@ struct LocalServerPoolCancellationTests {
181171
@Test("FIFO mode cancellation works correctly")
182172
@available(LambdaSwift 2.0, *)
183173
func testFIFOModeCancellation() async throws {
184-
#if compiler(>=6.0)
185174
let pool = LambdaHTTPServer.Pool<TestItem>(name: "FIFO Test Pool")
186175

187176
try await withThrowingTaskGroup(of: Void.self) { group in
@@ -222,9 +211,6 @@ struct LocalServerPoolCancellationTests {
222211
try await group.next()
223212
group.cancelAll()
224213
}
225-
#else
226-
throw XCTSkip("This test requires Swift 6.0 or later")
227-
#endif
228214
}
229215
}
230216

Tests/AWSLambdaRuntimeTests/PoolTests.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ struct PoolTests {
163163
#expect(Set(receivedValues).count == producerCount * messagesPerProducer)
164164
}
165165

166-
// in Swift 6.0, the error returned by #expect(throwing:) macro is a tuple ()
167-
// I decided to skip these tests on Swift 6.0
168-
#if swift(>=6.1)
169-
170166
@Test
171167
@available(LambdaSwift 2.0, *)
172168
func testConcurrentNext() async throws {
@@ -514,7 +510,5 @@ struct PoolTests {
514510
let third = try await pool.next(for: "req1")
515511
#expect(String(buffer: third.body!) == "third")
516512
}
517-
#endif //swift >= 6.1
518-
519513
}
520514
#endif // trait

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ swift package init --type executable --name MyLambda
8888
2.3 Your `Package.swift` file must look like this
8989

9090
```swift
91-
// swift-tools-version: 6.0
91+
// swift-tools-version: 6.1
9292
9393
import PackageDescription
9494

0 commit comments

Comments
 (0)