diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8260660..59b6b4f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,9 +50,9 @@ jobs: - percona:8.0 runner: # List is deliberately incomplete; we want to avoid running 50 jobs on every commit - - swift:5.8-focal + - swift:5.9-focal - swift:5.10-jammy - - swiftlang/swift:nightly-6.0-jammy + - swift:6.0-jammy container: ${{ matrix.runner }} runs-on: ubuntu-latest services: @@ -86,8 +86,6 @@ jobs: fail-fast: false matrix: include: - - macos-version: macos-13 - xcode-version: '~14.3' - macos-version: macos-14 xcode-version: latest runs-on: ${{ matrix.macos-version }} diff --git a/Package.swift b/Package.swift index 506615d..9134795 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.8 +// swift-tools-version:5.9 import PackageDescription let package = Package( @@ -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"), ], @@ -40,6 +40,9 @@ let package = Package( ) var swiftSettings: [SwiftSetting] { [ + .enableUpcomingFeature("ExistentialAny"), .enableUpcomingFeature("ConciseMagicFile"), .enableUpcomingFeature("ForwardTrailingClosures"), + .enableUpcomingFeature("DisableOutwardActorInference"), + .enableExperimentalFeature("StrictConcurrency=complete"), ] } diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift deleted file mode 100644 index 33677e4..0000000 --- a/Package@swift-5.9.swift +++ /dev/null @@ -1,48 +0,0 @@ -// swift-tools-version:5.9 -import PackageDescription - -let package = Package( - name: "fluent-mysql-driver", - platforms: [ - .macOS(.v10_15), - .iOS(.v13), - .watchOS(.v6), - .tvOS(.v13), - ], - products: [ - .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/mysql-kit.git", from: "4.9.0"), - .package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"), - ], - targets: [ - .target( - name: "FluentMySQLDriver", - dependencies: [ - .product(name: "FluentKit", package: "fluent-kit"), - .product(name: "FluentSQL", package: "fluent-kit"), - .product(name: "Logging", package: "swift-log"), - .product(name: "MySQLKit", package: "mysql-kit"), - ], - swiftSettings: swiftSettings - ), - .testTarget( - name: "FluentMySQLDriverTests", - dependencies: [ - .product(name: "FluentBenchmark", package: "fluent-kit"), - .target(name: "FluentMySQLDriver"), - ], - swiftSettings: swiftSettings - ), - ] -) - -var swiftSettings: [SwiftSetting] { [ - .enableUpcomingFeature("ExistentialAny"), - .enableUpcomingFeature("ConciseMagicFile"), - .enableUpcomingFeature("ForwardTrailingClosures"), - .enableUpcomingFeature("DisableOutwardActorInference"), - .enableExperimentalFeature("StrictConcurrency=complete"), -] } diff --git a/Sources/FluentMySQLDriver/FluentMySQLDriver.swift b/Sources/FluentMySQLDriver/FluentMySQLDriver.swift index 3bc27f6..601340a 100644 --- a/Sources/FluentMySQLDriver/FluentMySQLDriver.swift +++ b/Sources/FluentMySQLDriver/FluentMySQLDriver.swift @@ -33,4 +33,8 @@ struct FluentMySQLDriver: DatabaseDriver { func shutdown() { try? self.pool.syncShutdownGracefully() } + + func shutdownAsync() async { + try? await self.pool.shutdownAsync() + } } diff --git a/Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift b/Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift index 6a82dad..a8209b7 100644 --- a/Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift +++ b/Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift @@ -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() } }