2026-10-25 11:55:43 +01:00
|
|
|
// swift-tools-version: 6.4
|
2026-08-19 22:55:00 +02:00
|
|
|
|
|
|
|
|
import PackageDescription
|
|
|
|
|
|
|
|
|
|
let package = Package(
|
|
|
|
|
name: "Persistence",
|
|
|
|
|
platforms: [
|
|
|
|
|
.macOS(.v15),
|
|
|
|
|
],
|
|
|
|
|
products: [
|
|
|
|
|
.library(
|
|
|
|
|
name: "Persistence",
|
|
|
|
|
targets: [
|
|
|
|
|
"Persistence"
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
dependencies: [
|
|
|
|
|
.package(
|
|
|
|
|
url: "https://github.com/hummingbird-project/hummingbird-fluent.git",
|
|
|
|
|
from: "2.0.0"
|
|
|
|
|
),
|
|
|
|
|
.package(
|
|
|
|
|
url: "https://github.com/vapor/fluent-postgres-driver.git",
|
|
|
|
|
from: "2.12.0"
|
|
|
|
|
),
|
|
|
|
|
.package(
|
|
|
|
|
url: "https://github.com/vapor/fluent-sqlite-driver.git",
|
|
|
|
|
from: "4.9.0"
|
|
|
|
|
),
|
|
|
|
|
.package(
|
|
|
|
|
url: "https://github.com/vapor/sql-kit.git",
|
|
|
|
|
from: "3.36.0"
|
|
|
|
|
),
|
|
|
|
|
.package(
|
|
|
|
|
url: "https://github.com/vapor/postgres-nio.git",
|
|
|
|
|
from: "1.33.0"
|
|
|
|
|
),
|
|
|
|
|
.package(
|
|
|
|
|
url: "https://github.com/apple/swift-nio.git",
|
|
|
|
|
from: "2.81.0"
|
|
|
|
|
),
|
|
|
|
|
.package(
|
|
|
|
|
url: "https://github.com/apple/swift-nio-ssl.git",
|
|
|
|
|
from: "2.25.0"
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
targets: [
|
|
|
|
|
.target(
|
|
|
|
|
name: "Persistence",
|
|
|
|
|
dependencies: [
|
|
|
|
|
.product(
|
|
|
|
|
name: "HummingbirdFluent",
|
|
|
|
|
package: "hummingbird-fluent"
|
|
|
|
|
),
|
|
|
|
|
.product(
|
|
|
|
|
name: "FluentPostgresDriver",
|
|
|
|
|
package: "fluent-postgres-driver"
|
|
|
|
|
),
|
|
|
|
|
.product(
|
|
|
|
|
name: "FluentSQLiteDriver",
|
|
|
|
|
package: "fluent-sqlite-driver"
|
|
|
|
|
),
|
|
|
|
|
.product(
|
|
|
|
|
name: "SQLKit",
|
|
|
|
|
package: "sql-kit"
|
|
|
|
|
),
|
|
|
|
|
.product(
|
|
|
|
|
name: "PostgresNIO",
|
|
|
|
|
package: "postgres-nio"
|
|
|
|
|
),
|
|
|
|
|
.product(
|
|
|
|
|
name: "NIOSSL",
|
|
|
|
|
package: "swift-nio-ssl"
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
path: "Sources"
|
|
|
|
|
),
|
|
|
|
|
.testTarget(
|
|
|
|
|
name: "PersistenceTests",
|
|
|
|
|
dependencies: [
|
|
|
|
|
.byName(name: "Persistence"),
|
|
|
|
|
.product(
|
|
|
|
|
name: "PostgresNIO",
|
|
|
|
|
package: "postgres-nio"
|
|
|
|
|
),
|
|
|
|
|
.product(
|
|
|
|
|
name: "NIOCore",
|
|
|
|
|
package: "swift-nio"
|
|
|
|
|
),
|
|
|
|
|
.product(
|
|
|
|
|
name: "NIOPosix",
|
|
|
|
|
package: "swift-nio"
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
path: "Tests"
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
)
|
2026-10-25 11:55:43 +01:00
|
|
|
|
|
|
|
|
// Applied to every target: strict memory safety and warnings as errors as guardrails — deprecations stay warnings, so a
|
|
|
|
|
// dependency update cannot break the build — plus the upcoming concurrency features Swift 7 turns on by default.
|
|
|
|
|
for target in package.targets {
|
|
|
|
|
target.swiftSettings = (target.swiftSettings ?? []) + [
|
|
|
|
|
.strictMemorySafety(),
|
|
|
|
|
.treatAllWarnings(as: .error),
|
|
|
|
|
.treatWarning("DeprecatedDeclaration", as: .warning),
|
|
|
|
|
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
|
|
|
|
|
.enableUpcomingFeature("InferIsolatedConformances"),
|
|
|
|
|
]
|
|
|
|
|
}
|