From fb2c325d3c5f56713e141e43a8dbc356768e162c Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Mon, 14 Oct 2024 11:42:45 +0100 Subject: [PATCH 1/2] Remove Package@swift-6.0.swift We can enable swift 6 mode using swiftLanguageVersions --- Package.swift | 3 +- Package@swift-6.0.swift | 149 ---------------------------------------- 2 files changed, 2 insertions(+), 150 deletions(-) delete mode 100644 Package@swift-6.0.swift diff --git a/Package.swift b/Package.swift index 4ca8c904..9f8655bc 100644 --- a/Package.swift +++ b/Package.swift @@ -145,5 +145,6 @@ let package = Package( ], resources: [.process("Certificates")] ), - ] + ], + swiftLanguageVersions: [.v5, .version("6")] ) diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift deleted file mode 100644 index 87f4f0a9..00000000 --- a/Package@swift-6.0.swift +++ /dev/null @@ -1,149 +0,0 @@ -// swift-tools-version:6.0 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let swiftSettings: [SwiftSetting] = [.enableExperimentalFeature("StrictConcurrency=complete")] - -let package = Package( - name: "hummingbird", - platforms: [.macOS(.v14), .iOS(.v17), .tvOS(.v17)], - products: [ - .library(name: "Hummingbird", targets: ["Hummingbird"]), - .library(name: "HummingbirdCore", targets: ["HummingbirdCore"]), - .library(name: "HummingbirdHTTP2", targets: ["HummingbirdHTTP2"]), - .library(name: "HummingbirdTLS", targets: ["HummingbirdTLS"]), - .library(name: "HummingbirdRouter", targets: ["HummingbirdRouter"]), - .library(name: "HummingbirdTesting", targets: ["HummingbirdTesting"]), - .executable(name: "PerformanceTest", targets: ["PerformanceTest"]), - ], - dependencies: [ - .package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.2"), - .package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.0"), - .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.0"), - .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"), - .package(url: "https://github.com/apple/swift-http-types.git", from: "1.0.0"), - .package(url: "https://github.com/apple/swift-metrics.git", from: "2.5.0"), - .package(url: "https://github.com/apple/swift-distributed-tracing.git", from: "1.0.1"), - .package(url: "https://github.com/apple/swift-nio.git", from: "2.63.0"), - .package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.20.0"), - .package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.28.0"), - .package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.14.0"), - .package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.20.0"), - .package(url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "2.0.0"), - .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.19.0"), - ], - targets: [ - .target( - name: "Hummingbird", - dependencies: [ - .byName(name: "HummingbirdCore"), - .product(name: "ServiceLifecycle", package: "swift-service-lifecycle"), - .product(name: "AsyncAlgorithms", package: "swift-async-algorithms"), - .product(name: "Atomics", package: "swift-atomics"), - .product(name: "HTTPTypes", package: "swift-http-types"), - .product(name: "Logging", package: "swift-log"), - .product(name: "Metrics", package: "swift-metrics"), - .product(name: "Tracing", package: "swift-distributed-tracing"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - ], - swiftSettings: swiftSettings - ), - .target( - name: "HummingbirdCore", - dependencies: [ - .product(name: "AsyncAlgorithms", package: "swift-async-algorithms"), - .product(name: "Collections", package: "swift-collections"), - .product(name: "HTTPTypes", package: "swift-http-types"), - .product(name: "Logging", package: "swift-log"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), - .product(name: "NIOHTTPTypes", package: "swift-nio-extras"), - .product(name: "NIOHTTPTypesHTTP1", package: "swift-nio-extras"), - .product(name: "NIOExtras", package: "swift-nio-extras"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOTransportServices", package: "swift-nio-transport-services"), - .product(name: "ServiceLifecycle", package: "swift-service-lifecycle"), - ], - swiftSettings: swiftSettings - ), - .target( - name: "HummingbirdRouter", - dependencies: [ - .byName(name: "Hummingbird"), - .product(name: "Logging", package: "swift-log"), - ], - swiftSettings: swiftSettings - ), - .target( - name: "HummingbirdTesting", - dependencies: [ - .byName(name: "Hummingbird"), - .product(name: "AsyncHTTPClient", package: "async-http-client"), - .product(name: "HTTPTypes", package: "swift-http-types"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), - .product(name: "NIOEmbedded", package: "swift-nio"), - .product(name: "NIOHTTPTypes", package: "swift-nio-extras"), - .product(name: "NIOHTTPTypesHTTP1", package: "swift-nio-extras"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOSSL", package: "swift-nio-ssl"), - ], - swiftSettings: swiftSettings - ), - .target( - name: "HummingbirdHTTP2", - dependencies: [ - .byName(name: "HummingbirdCore"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOHTTP2", package: "swift-nio-http2"), - .product(name: "NIOHTTPTypes", package: "swift-nio-extras"), - .product(name: "NIOHTTPTypesHTTP1", package: "swift-nio-extras"), - .product(name: "NIOHTTPTypesHTTP2", package: "swift-nio-extras"), - .product(name: "NIOSSL", package: "swift-nio-ssl"), - ] - ), - .target( - name: "HummingbirdTLS", - dependencies: [ - .byName(name: "HummingbirdCore"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOSSL", package: "swift-nio-ssl"), - ], - swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")] - ), - .executableTarget( - name: "PerformanceTest", - dependencies: [ - .byName(name: "Hummingbird"), - .product(name: "NIOPosix", package: "swift-nio"), - ], - swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")] - ), - // test targets - .testTarget(name: "HummingbirdTests", dependencies: [ - .byName(name: "Hummingbird"), - .byName(name: "HummingbirdTLS"), - .byName(name: "HummingbirdHTTP2"), - .byName(name: "HummingbirdTesting"), - .byName(name: "HummingbirdRouter"), - ]), - .testTarget(name: "HummingbirdRouterTests", dependencies: [ - .byName(name: "HummingbirdRouter"), - .byName(name: "HummingbirdTesting"), - ]), - .testTarget( - name: "HummingbirdCoreTests", - dependencies: - [ - .byName(name: "HummingbirdCore"), - .byName(name: "HummingbirdHTTP2"), - .byName(name: "HummingbirdTLS"), - .byName(name: "HummingbirdTesting"), - .product(name: "AsyncHTTPClient", package: "async-http-client"), - ], - resources: [.process("Certificates")] - ), - ] -) From 537968d0a1fc9975cefff2fa845b1c9f7984f1f6 Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Mon, 14 Oct 2024 11:43:36 +0100 Subject: [PATCH 2/2] Add NIOFoundationCompat dependency I missed earlier --- Package.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Package.swift b/Package.swift index 9f8655bc..41fa09a0 100644 --- a/Package.swift +++ b/Package.swift @@ -46,6 +46,7 @@ let package = Package( .product(name: "Metrics", package: "swift-metrics"), .product(name: "Tracing", package: "swift-distributed-tracing"), .product(name: "NIOCore", package: "swift-nio"), + .product(name: "NIOFoundationCompat", package: "swift-nio"), .product(name: "NIOPosix", package: "swift-nio"), ], swiftSettings: swiftSettings