-
Notifications
You must be signed in to change notification settings - Fork 113
Drop sync and closure APIs #222
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
Changes from 9 commits
71ea055
18737c8
ac89982
aebc527
23944a3
19b03ed
9305495
3e280e5
c043f6c
27e6486
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ extension Lambda { | |
/// `ByteBufferAllocator` to allocate `ByteBuffer` | ||
public let allocator: ByteBufferAllocator | ||
|
||
internal init(logger: Logger, eventLoop: EventLoop, allocator: ByteBufferAllocator) { | ||
public init(logger: Logger, eventLoop: EventLoop, allocator: ByteBufferAllocator) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tomerd We probably need to discuss this one! Maybe we want to add a __forTest_Only() helper method instead of the public initializer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes this not ideal. why is it needed? |
||
self.eventLoop = eventLoop | ||
self.logger = logger | ||
self.allocator = allocator | ||
|
@@ -138,15 +138,15 @@ extension Lambda { | |
self.storage.allocator | ||
} | ||
|
||
internal init(requestID: String, | ||
traceID: String, | ||
invokedFunctionARN: String, | ||
deadline: DispatchWallTime, | ||
cognitoIdentity: String? = nil, | ||
clientContext: String? = nil, | ||
logger: Logger, | ||
eventLoop: EventLoop, | ||
allocator: ByteBufferAllocator) { | ||
public init(requestID: String, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tomerd We probably need to discuss this one! Maybe we want to add a |
||
traceID: String, | ||
invokedFunctionARN: String, | ||
deadline: DispatchWallTime, | ||
cognitoIdentity: String? = nil, | ||
clientContext: String? = nil, | ||
logger: Logger, | ||
eventLoop: EventLoop, | ||
allocator: ByteBufferAllocator) { | ||
self.storage = _Storage(requestID: requestID, | ||
traceID: traceID, | ||
invokedFunctionARN: invokedFunctionARN, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just require 5.5? feels wrong to drop support for closures and support < 5.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about this last time. We wanted to stay with
5.2
to allow existing frameworks (Vapor, Noze, Hummingbird, Smoke, and friends) to integrate with Lambda without needing to bump their requirements. For integration into those frameworks developers will nearly always use theLambda.Lifecycle
APIs.Normal Lambda users should require 5.5 and just use the async APIs.
I guess with this we will do what most of the Swift Server ecosystem is going todo... Make async/await the normal, leave escape hatch for advanced use cases using futures.