Просмотр исходного кода

Hummingbird and Swift 6.2 (#10149)

* Hummingbird and Swift 6.2

* Increase postgres connections
Adam Fowler 2 недель назад
Родитель
Сommit
53e2e9d3f2

+ 1 - 1
frameworks/Swift/hummingbird2/README.md

@@ -13,7 +13,7 @@ Hummingbird 2 is a lightweight, flexible HTTP server framework written in Swift.
 
 ## Important Libraries
 This version of Hummingbird requires
-* [Swift 5.10](https://swift.org)  
+* [Swift 6.0](https://swift.org)  
 * [SwiftNIO 2.x](https://github.com/apple/swift-nio/)
 In these tests for database access it uses
 * [PostgresKit 2.21](https://github.com/vapor/postgres-nio/)

+ 2 - 2
frameworks/Swift/hummingbird2/hummingbird2-postgres.dockerfile

@@ -1,7 +1,7 @@
 # ================================
 # Build image
 # ================================
-FROM swift:6.1 AS build
+FROM swift:6.2 AS build
 WORKDIR /build
 
 # Copy entire repo into container
@@ -15,7 +15,7 @@ RUN swift build \
 # ================================
 # Run image
 # ================================
-FROM swift:6.1-slim
+FROM swift:6.2-slim
 WORKDIR /run
 
 # Copy build artifacts

+ 2 - 2
frameworks/Swift/hummingbird2/hummingbird2.dockerfile

@@ -1,7 +1,7 @@
 # ================================
 # Build image
 # ================================
-FROM swift:6.1 AS build
+FROM swift:6.2 AS build
 WORKDIR /build
 
 # Copy entire repo into container
@@ -15,7 +15,7 @@ RUN swift build \
 # ================================
 # Run image
 # ================================
-FROM swift:6.1-slim
+FROM swift:6.2-slim
 WORKDIR /run
 
 # Copy build artifacts

+ 1 - 1
frameworks/Swift/hummingbird2/src-postgres/Package.swift

@@ -7,7 +7,7 @@ let package = Package(
     name: "server",
     platforms: [.macOS(.v14)],
     dependencies: [
-        .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"),
+        .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.16.0"),
         .package(url: "https://github.com/hummingbird-project/swift-mustache.git", from: "2.0.0"),
         .package(url: "https://github.com/vapor/postgres-nio.git", from: "1.21.0"),
     ],

+ 1 - 1
frameworks/Swift/hummingbird2/src-postgres/Sources/server/main.swift

@@ -32,7 +32,7 @@ func runApp() async throws {
         database: "hello_world",
         tls: .disable
     )
-    postgresConfiguration.options.maximumConnections = 100
+    postgresConfiguration.options.maximumConnections = 200
     let postgresClient = PostgresClient(
         configuration: postgresConfiguration,
         eventLoopGroup: MultiThreadedEventLoopGroup.singleton

+ 1 - 1
frameworks/Swift/hummingbird2/src/Package.swift

@@ -7,7 +7,7 @@ let package = Package(
     name: "server",
     platforms: [.macOS(.v14)],
     dependencies: [
-        .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0")
+        .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.16.0")
     ],
     targets: [
         .executableTarget(