Skip to content

Commit 568897c

Browse files
authored
Update readme (#269)
* Fix compiler warning 'MyLambda' was identified as an executable target given the presence of a 'main.swift' file. Starting with tools version 5.4.0 executable targets should be declared as 'executableTarget()' * Fix package dependency for swift-aws-lambda-events The swift-aws-lambda-events repo has not yet pushed tag 0.1.0 so the build fails, see output from swift build: Computing version for https://github.com/swift-server/swift-aws-lambda-events.git error: Dependencies could not be resolved because no versions of 'swift-aws-lambda-events' match the requirement 0.1.0..<1.0.0 and root depends on 'swift-aws-lambda-events' 0.1.0..<1.0.0. This commit adds the workaround mentioned in the issue for the missing tag swift-server/swift-aws-lambda-events#3 * Fix multiple products and targets build error
1 parent cb340de commit 568897c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

readme.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ First, create a SwiftPM project and pull Swift AWS Lambda Runtime as dependency
3030
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "0.1.0"),
3131
],
3232
targets: [
33-
.target(name: "MyLambda", dependencies: [
33+
.executableTarget(name: "MyLambda", dependencies: [
3434
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
3535
]),
3636
]
@@ -91,12 +91,11 @@ First, add a dependency on the event packages:
9191
],
9292
dependencies: [
9393
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "0.1.0"),
94-
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "0.1.0"),
9594
],
9695
targets: [
97-
.target(name: "MyLambda", dependencies: [
96+
.executableTarget(name: "MyLambda", dependencies: [
9897
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
99-
.product(name: "AWSLambdaEvents", package: "swift-aws-lambda-events"),
98+
.product(name: "AWSLambdaEvents", package: "swift-aws-lambda-runtime"),
10099
]),
101100
]
102101
)

0 commit comments

Comments
 (0)