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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ DerivedData/
.netrc
Package.resolved
.swiftpm/xcode/
.vscode
.swift-version
4 changes: 3 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import PackageDescription
let extraSettings: [SwiftSetting] = [
.enableExperimentalFeature("SuppressedAssociatedTypes"),
.enableExperimentalFeature("LifetimeDependence"),
.enableExperimentalFeature("NonescapableTypes"),
.enableUpcomingFeature("LifetimeDependence"),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
.enableUpcomingFeature("InferIsolatedConformances"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("MemberImportVisibility"),
.enableUpcomingFeature("InternalImportsByDefault")
.enableUpcomingFeature("InternalImportsByDefault"),
.unsafeFlags(["-Xfrontend", "-require-explicit-sendable", "-warnings-as-errors"])
]

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion Sources/HTTPServer/HTTPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import Synchronization
/// }
/// ```
@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
public final class Server<RequestHandler: HTTPServerRequestHandler> {
public final class Server<RequestHandler: HTTPServerRequestHandler>: Sendable {
/// Starts an HTTP server with a closure-based request handler.
///
/// This method provides a convenient way to start an HTTP server using a closure to handle incoming requests.
Expand Down
2 changes: 1 addition & 1 deletion Sources/HTTPServer/HTTPServerClosureRequestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public import HTTPTypes
/// }
/// ```
@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
public struct HTTPServerClosureRequestHandler: HTTPServerRequestHandler {
public struct HTTPServerClosureRequestHandler: HTTPServerRequestHandler, Sendable {
/// The underlying closure that handles HTTP requests
private let _handler:
nonisolated(nonsending) @Sendable (
Expand Down
2 changes: 1 addition & 1 deletion Sources/Middleware/MiddlewareBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// }
/// ```
@resultBuilder
public struct MiddlewareChainBuilder {
public struct MiddlewareChainBuilder: Sendable {
/// Builds a middleware chain from a single middleware component.
///
/// This is the base case for the result builder pattern, handling a single middleware.
Expand Down
Loading