mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-06-02 07:27:33 +00:00
This is a proposal to fix issue #507 **changes** - `LambdaRuntime.init()` uses a `Mutex<Bool>` to make sure only one instance is created - `LambdaRuntime.init()` can now throw an error in case an instance already exists (I did not use `fatalError()` to make it easier to test) - All `convenience init()` methods catch possible errors instead of re-throwing it to a void breaking the user-facing API - Renamed existing `LambdaRuntimeError` to `LambdaRuntimeClientError` - Introduced a new type `LambdaRuntimeError` to represent the double initialization error --------- Co-authored-by: Fabian Fett <fabianfett@apple.com> Co-authored-by: Adam Fowler <adamfowler71@gmail.com>
This commit is contained in:
co-authored by
Fabian Fett
Adam Fowler
parent
bf2385ae08
commit
344d30b401
@@ -15,10 +15,7 @@ let package = Package(
|
||||
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
|
||||
.package(
|
||||
url: "https://github.com/swift-server/swift-aws-lambda-runtime.git",
|
||||
branch: "ff-package-traits",
|
||||
traits: [
|
||||
.trait(name: "FoundationJSONSupport")
|
||||
]
|
||||
branch: "main"
|
||||
)
|
||||
],
|
||||
targets: [
|
||||
|
||||
Reference in New Issue
Block a user