Skip to content

Commit e227d94

Browse files
authored
Update for Swift 6.3 release (#100)
Update package to require Swift 6.0, fix the attendant Concurrency warnings, update CI, the usual
1 parent 73529a6 commit e227d94

9 files changed

Lines changed: 58 additions & 28 deletions

File tree

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ updates:
88
dependencies:
99
patterns:
1010
- "*"
11+
- package-ecosystem: "swift"
12+
directory: "/"
13+
schedule:
14+
interval: "daily"
15+
groups:
16+
dependencies:
17+
patterns:
18+
- "*"
19+

.github/workflows/api-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- main
6+
permissions:
7+
contents: read
8+
id-token: write
69

710
jobs:
811
build-and-deploy:

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@ on:
88

99
jobs:
1010
unit-tests:
11+
permissions:
12+
contents: read
1113
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
1214
secrets: inherit
1315
with:
1416
with_android: true
17+
18+
submit-dependencies:
19+
permissions:
20+
contents: write
21+
if: ${{ github.event_name == 'push' }}
22+
uses: vapor/ci/.github/workflows/submit-deps.yml@main
23+
secrets: inherit
24+
25+

Package.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.10
1+
// swift-tools-version:6.0
22
import PackageDescription
33

44
let package = Package(
@@ -41,8 +41,10 @@ let package = Package(
4141

4242
var swiftSettings: [SwiftSetting] { [
4343
.enableUpcomingFeature("ExistentialAny"),
44-
.enableUpcomingFeature("ConciseMagicFile"),
45-
.enableUpcomingFeature("ForwardTrailingClosures"),
46-
.enableUpcomingFeature("DisableOutwardActorInference"),
47-
.enableExperimentalFeature("StrictConcurrency=complete"),
44+
// .enableUpcomingFeature("InternalImportsByDefault"),
45+
.enableUpcomingFeature("MemberImportVisibility"),
46+
.enableUpcomingFeature("InferIsolatedConformances"),
47+
// .enableUpcomingFeature("NonisolatedNonsendingByDefault"),
48+
.enableUpcomingFeature("ImmutableWeakCaptures"),
4849
] }
50+

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<a href="https://discord.gg/vapor"><img src="https://design.vapor.codes/images/discordchat.svg" alt="Team Chat"></a>
77
<a href="LICENSE"><img src="https://design.vapor.codes/images/mitlicense.svg" alt="MIT License"></a>
88
<a href="https://github.com/vapor/fluent-sqlite-driver/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/vapor/fluent-sqlite-driver/test.yml?event=push&style=plastic&logo=github&label=tests&logoColor=%23ccc" alt="Continuous Integration"></a>
9-
<a href="https://codecov.io/github/vapor/fluent-sqlite-driver"><img src="https://img.shields.io/codecov/c/github/vapor/fluent-sqlite-driver?style=plastic&logo=codecov&label=codecov"></a>
10-
<a href="https://swift.org"><img src="https://design.vapor.codes/images/swift510up.svg" alt="Swift 5.10+"></a>
9+
<a href="https://codecov.io/github/vapor/fluent-sqlite-driver"><img src="https://img.shields.io/codecov/c/github/vapor/fluent-sqlite-driver?style=plastic&logo=codecov&label=codecov" alt="Code Coverage"></a>
10+
<a href="https://swift.org"><img src="https://design.vapor.codes/images/swift60up.svg" alt="Swift 6.0+"></a>
1111
</p>
1212

1313
<br>
Lines changed: 18 additions & 13 deletions
Loading

Sources/FluentSQLiteDriver/Docs.docc/theme-settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"theme": {
3-
"aside": { "border-radius": "16px", "border-style": "double", "border-width": "3px" },
3+
"aside": { "border-radius": "16px", "border-width": "3px", "border-style": "double" },
44
"border-radius": "0",
55
"button": { "border-radius": "16px", "border-width": "1px", "border-style": "solid" },
66
"code": { "border-radius": "16px", "border-width": "1px", "border-style": "solid" },
77
"color": {
88
"fluentsqlitedriver": "hsl(215, 45%, 58%)",
99
"documentation-intro-fill": "radial-gradient(circle at top, var(--color-fluentsqlitedriver) 30%, #000 100%)",
1010
"documentation-intro-accent": "var(--color-fluentsqlitedriver)",
11-
"documentation-intro-eyebrow": "white",
11+
"hero-eyebrow": "white",
1212
"documentation-intro-figure": "white",
13-
"documentation-intro-title": "white",
13+
"hero-title": "white",
1414
"logo-base": { "dark": "#fff", "light": "#000" },
1515
"logo-shape": { "dark": "#000", "light": "#fff" },
1616
"fill": { "dark": "#000", "light": "#fff" }

Sources/FluentSQLiteDriver/FluentSQLiteDatabase.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ struct FluentSQLiteDatabase: Database, SQLDatabase, SQLiteDatabase {
6767
self.eventLoop.makeSucceededFuture(())
6868
}
6969

70-
func withConnection<T>(_ closure: @escaping @Sendable (any Database) -> EventLoopFuture<T>) -> EventLoopFuture<T> {
70+
func withConnection<T: Sendable>(_ closure: @escaping @Sendable (any Database) -> EventLoopFuture<T>) -> EventLoopFuture<T> {
7171
self.eventLoop.makeFutureWithTask { try await self.withConnection { try await closure($0).get() } }
7272
}
7373

74-
func withConnection<T>(_ closure: @escaping @Sendable (any Database) async throws -> T) async throws -> T {
74+
func withConnection<T: Sendable>(_ closure: @escaping @Sendable (any Database) async throws -> T) async throws -> T {
7575
try await self.withConnection {
7676
try await closure(
7777
FluentSQLiteDatabase(
@@ -85,11 +85,11 @@ struct FluentSQLiteDatabase: Database, SQLDatabase, SQLiteDatabase {
8585
}
8686
}
8787

88-
func transaction<T>(_ closure: @escaping @Sendable (any Database) -> EventLoopFuture<T>) -> EventLoopFuture<T> {
88+
func transaction<T: Sendable>(_ closure: @escaping @Sendable (any Database) -> EventLoopFuture<T>) -> EventLoopFuture<T> {
8989
self.inTransaction ? closure(self) : self.eventLoop.makeFutureWithTask { try await self.transaction { try await closure($0).get() } }
9090
}
9191

92-
func transaction<T>(_ closure: @escaping @Sendable (any Database) async throws -> T) async throws -> T {
92+
func transaction<T: Sendable>(_ closure: @escaping @Sendable (any Database) async throws -> T) async throws -> T {
9393
guard !self.inTransaction else {
9494
return try await closure(self)
9595
}

Tests/FluentSQLiteDriverTests/FluentSQLiteDriverTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func env(_ name: String) -> String? {
235235
let isLoggingConfigured: Bool = {
236236
LoggingSystem.bootstrap { label in
237237
var handler = StreamLogHandler.standardOutput(label: label)
238-
handler.logLevel = env("LOG_LEVEL").flatMap { .init(rawValue: $0) } ?? .debug
238+
handler.logLevel = env("LOG_LEVEL").flatMap { .init(rawValue: $0) } ?? .info
239239
return handler
240240
}
241241
return true

0 commit comments

Comments
 (0)