Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt Async APIs #226

Merged
merged 4 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 5 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.8
// swift-tools-version:5.9
import PackageDescription

let package = Package(
Expand All @@ -13,7 +13,7 @@ let package = Package(
.library(name: "FluentMySQLDriver", targets: ["FluentMySQLDriver"]),
],
dependencies: [
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.4"),
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.49.0"),
.package(url: "https://github.com/vapor/mysql-kit.git", from: "4.9.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"),
],
Expand All @@ -40,6 +40,9 @@ let package = Package(
)

var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("DisableOutwardActorInference"),
.enableExperimentalFeature("StrictConcurrency=complete"),
] }
48 changes: 0 additions & 48 deletions [email protected]

This file was deleted.

4 changes: 4 additions & 0 deletions Sources/FluentMySQLDriver/FluentMySQLDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ struct FluentMySQLDriver: DatabaseDriver {
func shutdown() {
try? self.pool.syncShutdownGracefully()
}

func shutdownAsync() async {
try? await self.pool.shutdownAsync()
}
}
6 changes: 3 additions & 3 deletions Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,10 @@ final class FluentMySQLDriverTests: XCTestCase {
), as: .b)
}

override func tearDownWithError() throws {
self.dbs.shutdown()
override func tearDown() async throws {
await self.dbs.shutdownAsync()

try super.tearDownWithError()
try await super.tearDown()
}
}

Expand Down
Loading