Skip to content

Commit 61d9ff2

Browse files
committed
differentiate swift 6
1 parent 099f4ca commit 61d9ff2

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

Package-5.10.swift

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "swift-openapi-lambda",
8+
platforms: [
9+
.macOS(.v12), .iOS(.v15), .tvOS(.v15), .watchOS(.v8),
10+
],
11+
products: [.library(name: "OpenAPILambda", targets: ["OpenAPILambda"])],
12+
dependencies: [
13+
.package(url: "https://github.com/apple/swift-openapi-runtime.git", from: "1.0.0"),
14+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha.3"),
15+
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "0.3.0"),
16+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
17+
],
18+
targets: [
19+
.target(
20+
name: "OpenAPILambda",
21+
dependencies: [
22+
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
23+
.product(name: "AWSLambdaEvents", package: "swift-aws-lambda-events"),
24+
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
25+
],
26+
path: "Sources",
27+
swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")]
28+
),
29+
// test targets
30+
.testTarget(
31+
name: "OpenAPILambdaTests",
32+
dependencies: [
33+
.byName(name: "OpenAPILambda"),
34+
]
35+
),
36+
]
37+
)

Tests/OpenAPILambdaTests/Router/RouterGraphTest.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import HTTPTypes
1616
import OpenAPIRuntime
1717

18+
#if swift(>=6.0)
1819
import Testing
1920
@testable import OpenAPILambda
2021

@@ -425,3 +426,4 @@ struct RouterGraphTests {
425426
}
426427

427428
}
429+
#endif

Tests/OpenAPILambdaTests/Router/RouterNodeTest.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
import HTTPTypes
1616
import OpenAPIRuntime
1717

18-
import Testing
1918
@testable import OpenAPILambda
2019

20+
#if swift(>=6.0)
21+
import Testing
22+
2123
struct RouterNodeTests {
2224
@Test("First node is root")
2325
func testFirstNodeIsRoot() throws {
@@ -209,3 +211,4 @@ struct RouterNodeTests {
209211
}
210212

211213
}
214+
#endif

0 commit comments

Comments
 (0)