Skip to content

Commit 223b27d

Browse files
authored
Async Lifecycle (#781)
* Drop support for 5.8 * Adopt new APIs
1 parent dfcbeba commit 223b27d

File tree

4 files changed

+14
-49
lines changed

4 files changed

+14
-49
lines changed

Diff for: Package.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.8
1+
// swift-tools-version:5.9
22
import PackageDescription
33

44
let package = Package(
@@ -13,7 +13,7 @@ let package = Package(
1313
.library(name: "Fluent", targets: ["Fluent"]),
1414
],
1515
dependencies: [
16-
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.4"),
16+
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.49.0"),
1717
.package(url: "https://github.com/vapor/vapor.git", from: "4.101.0"),
1818
],
1919
targets: [
@@ -38,6 +38,10 @@ let package = Package(
3838
)
3939

4040
var swiftSettings: [SwiftSetting] { [
41+
.enableUpcomingFeature("ExistentialAny"),
4142
.enableUpcomingFeature("ConciseMagicFile"),
4243
.enableUpcomingFeature("ForwardTrailingClosures"),
44+
.enableUpcomingFeature("ImportObjcForwardDeclarations"),
45+
.enableUpcomingFeature("DisableOutwardActorInference"),
46+
.enableExperimentalFeature("StrictConcurrency=complete"),
4347
] }

Diff for: [email protected]

-47
This file was deleted.

Diff for: Sources/Fluent/FluentProvider.swift

+4
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ extension Application {
137137
func shutdown(_ application: Application) {
138138
application.databases.shutdown()
139139
}
140+
141+
func shutdownAsync(_ application: Application) async {
142+
await application.databases.shutdownAsync()
143+
}
140144
}
141145

142146
let application: Application

Diff for: Tests/FluentTests/SessionTests.swift

+4
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,8 @@ struct StaticDatabase: DatabaseConfiguration, DatabaseDriver {
113113
func shutdown() {
114114
// Do nothing.
115115
}
116+
117+
func shutdownAsync() async {
118+
// Do nothing
119+
}
116120
}

0 commit comments

Comments
 (0)