Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Examples/Streaming+Codable/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ let package = Package(
dependencies: [
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
.product(name: "AWSLambdaEvents", package: "swift-aws-lambda-events"),
]
],
swiftSettings: [.enableExperimentalFeature("NonisolatedNonsendingByDefault")]
),
.testTarget(
name: "Streaming+CodableTests",
dependencies: [
"StreamingCodable",
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
]
],
swiftSettings: [.enableUpcomingFeature("NonisolatedNonsendingByDefault")]
),
]
)
Expand Down
4 changes: 3 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ let defaultSwiftSettings: [SwiftSetting] =
[
.enableExperimentalFeature(
"AvailabilityMacro=LambdaSwift 2.0:macOS 15.0"
)
),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
.enableUpcomingFeature("InferIsolatedConformances"),
]

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion Sources/AWSLambdaRuntime/LambdaHandlers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public protocol StreamingLambdaHandler: _Lambda_SendableMetatype {

/// A writer object to write the Lambda response stream into. The HTTP response is started lazily.
/// before the first call to ``write(_:)`` or ``writeAndFinish(_:)``.
public protocol LambdaResponseStreamWriter {
public protocol LambdaResponseStreamWriter: Sendable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a Sendable requirement to a public protocol is definitely a breaking change. I do not understand the full implications of this, but it certainly has the potential to make it much harder for clients to conform to the protocol.

/// Write a response part into the stream. Bytes written are streamed continually.
/// - Parameter buffer: The buffer to write.
/// - Parameter hasCustomHeaders: If `true`, the response will be sent with custom HTTP status code and headers.
Expand Down
Loading
Loading