diff --git a/.swiftpm/xcode/package.xcworkspace/xcuserdata/mcarman.xcuserdatad/UserInterfaceState.xcuserstate b/.swiftpm/xcode/package.xcworkspace/xcuserdata/mcarman.xcuserdatad/UserInterfaceState.xcuserstate index b60eaa3..0980c1c 100644 Binary files a/.swiftpm/xcode/package.xcworkspace/xcuserdata/mcarman.xcuserdatad/UserInterfaceState.xcuserstate and b/.swiftpm/xcode/package.xcworkspace/xcuserdata/mcarman.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Package.swift b/Package.swift index 33a1f39..732222e 100755 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:6.3.1 +// swift-tools-version:5.8 import PackageDescription let package = Package( diff --git a/Sources/App/configure.swift b/Sources/App/configure.swift index 059f775..05256b3 100755 --- a/Sources/App/configure.swift +++ b/Sources/App/configure.swift @@ -19,7 +19,7 @@ public func configure(_ app: Application) async throws { switch app.environment { case .development: envHost = "localhost" - envPort = 5432 + envPort = 5433 default: envHost = "vapor.prelub.com" envPort = 5432 diff --git a/Sources/App/entrypoint.swift b/Sources/App/entrypoint.swift index 635fbd1..70f9597 100755 --- a/Sources/App/entrypoint.swift +++ b/Sources/App/entrypoint.swift @@ -1,7 +1,11 @@ -import Vapor +@preconcurrency import Vapor import Dispatch import Logging +private struct UncheckedApplication: @unchecked Sendable { + let app: Application +} + /// This extension is temporary and can be removed once Vapor gets this support. private extension Vapor.Application { static let baseExecutionQueue = DispatchQueue(label: "vapor.codes.entrypoint") @@ -33,21 +37,5 @@ enum Entrypoint { try await app.runFromAsyncMainEntrypoint() } } -extension Application { - static let entrypointQueue = DispatchQueue(label: "app.entrypoint") - func runAsync() async throws { - nonisolated(unsafe) let app = self - try await withCheckedThrowingContinuation { (continuation: CheckedContinuation) in - Application.entrypointQueue.async { - do { - try app.run() - continuation.resume() - } catch { - continuation.resume(throwing: error) - } - } - } - } -}