From b8b9f4eac3617fed35690cf04079e9cfff2550ad Mon Sep 17 00:00:00 2001 From: pjechris Date: Fri, 12 Jun 2026 17:37:52 +0200 Subject: [PATCH 1/3] [package] change package to Swift 6.2 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 8b1d861..51fc057 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.5 +// swift-tools-version:6.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription From 56cda929960569146a730c772e8c205df80e36d5 Mon Sep 17 00:00:00 2001 From: pjechris Date: Fri, 12 Jun 2026 17:44:41 +0200 Subject: [PATCH 2/3] [misc] added Sendable --- .../SimpleHTTP/MultipartForm/MultipartFormData.swift | 12 ++++++------ Sources/SimpleHTTP/Request/Path.swift | 2 +- Sources/SimpleHTTP/Request/Request.swift | 2 +- Sources/SimpleHTTP/Response/DataResponse.swift | 2 +- .../SimpleHTTPFoundation/HTTP/HTTPContentType.swift | 2 +- Sources/SimpleHTTPFoundation/HTTP/HTTPHeader.swift | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources/SimpleHTTP/MultipartForm/MultipartFormData.swift b/Sources/SimpleHTTP/MultipartForm/MultipartFormData.swift index 3fe7e6b..38d732c 100644 --- a/Sources/SimpleHTTP/MultipartForm/MultipartFormData.swift +++ b/Sources/SimpleHTTP/MultipartForm/MultipartFormData.swift @@ -7,7 +7,7 @@ import MobileCoreServices import CoreServices #endif -struct Header: Hashable { +struct Header: Hashable, Sendable { let name: HTTPHeader let value: String } @@ -16,9 +16,9 @@ enum EncodingCharacters { static let crlf = "\r\n" } -enum Boundary { +enum Boundary: Sendable { - enum `Type` { + enum `Type`: Sendable { case initial case encapsulated case final @@ -49,19 +49,19 @@ enum Boundary { struct BodyPart { let headers: [Header] let length: Int - let stream: () throws -> InputStream + let stream: @Sendable () throws -> InputStream var hasInitialBoundary = false var hasFinalBoundary = false - private init(headers: [Header], stream: @escaping () throws -> InputStream, length: Int) { + private init(headers: [Header], stream: @Sendable @escaping () throws -> InputStream, length: Int) { self.headers = headers self.length = length self.stream = stream } init(headers: [Header], url: URL, length: Int) { - let stream: () throws -> InputStream = { + let stream: @Sendable () throws -> InputStream = { guard let stream = InputStream(url: url) else { throw MultipartFormData.Error.inputStreamCreationFailed(url) } diff --git a/Sources/SimpleHTTP/Request/Path.swift b/Sources/SimpleHTTP/Request/Path.swift index 3cfc1fd..52ce478 100644 --- a/Sources/SimpleHTTP/Request/Path.swift +++ b/Sources/SimpleHTTP/Request/Path.swift @@ -21,7 +21,7 @@ import Foundation /// /// let user: Path = .myPaths.user /// ``` -public struct Path: Equatable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation { +public struct Path: Equatable, Sendable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation { /// relative path public let value: String diff --git a/Sources/SimpleHTTP/Request/Request.swift b/Sources/SimpleHTTP/Request/Request.swift index 269954c..b579ad0 100644 --- a/Sources/SimpleHTTP/Request/Request.swift +++ b/Sources/SimpleHTTP/Request/Request.swift @@ -1,6 +1,6 @@ import Foundation -public enum Method: String { +public enum Method: String, Sendable { case get case post case put diff --git a/Sources/SimpleHTTP/Response/DataResponse.swift b/Sources/SimpleHTTP/Response/DataResponse.swift index bf90cb5..b7b27b7 100644 --- a/Sources/SimpleHTTP/Response/DataResponse.swift +++ b/Sources/SimpleHTTP/Response/DataResponse.swift @@ -1,6 +1,6 @@ import Foundation -public struct URLDataResponse { +public struct URLDataResponse: Sendable { public let data: Data public let response: HTTPURLResponse diff --git a/Sources/SimpleHTTPFoundation/HTTP/HTTPContentType.swift b/Sources/SimpleHTTPFoundation/HTTP/HTTPContentType.swift index 7eaf3bb..1af6ac7 100644 --- a/Sources/SimpleHTTPFoundation/HTTP/HTTPContentType.swift +++ b/Sources/SimpleHTTPFoundation/HTTP/HTTPContentType.swift @@ -1,7 +1,7 @@ import Foundation /// A struct representing a http header content type value -public struct HTTPContentType: Hashable, ExpressibleByStringLiteral { +public struct HTTPContentType: Hashable, Sendable, ExpressibleByStringLiteral { public let value: String public init(value: String) { diff --git a/Sources/SimpleHTTPFoundation/HTTP/HTTPHeader.swift b/Sources/SimpleHTTPFoundation/HTTP/HTTPHeader.swift index f1c3f1f..b4b9eb1 100644 --- a/Sources/SimpleHTTPFoundation/HTTP/HTTPHeader.swift +++ b/Sources/SimpleHTTPFoundation/HTTP/HTTPHeader.swift @@ -4,7 +4,7 @@ import Foundation public typealias HTTPHeaderFields = [HTTPHeader: String] /// A struct representing a http request header key -public struct HTTPHeader: Hashable, ExpressibleByStringLiteral { +public struct HTTPHeader: Hashable, Sendable, ExpressibleByStringLiteral { public let key: String public init(stringLiteral value: StringLiteralType) { @@ -17,7 +17,7 @@ extension HTTPHeader { public static let authentication: Self = "Authentication" public static let authorization: Self = "Authorization" public static let contentType: Self = "Content-Type" - public static var contentDisposition: Self = "Content-Disposition" + public static let contentDisposition: Self = "Content-Disposition" } // swiftlint:disable line_length From fa0cfd04e0d1109d33f9d533d98a141a9d442cfe Mon Sep 17 00:00:00 2001 From: pjechris Date: Mon, 15 Jun 2026 10:15:33 +0200 Subject: [PATCH 3/3] [ci] specify macos26 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 89d0484..74d09d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ on: jobs: test: - runs-on: macos-latest + runs-on: macos-26 steps: - name: Checkout repo