Skip to content

Commit 65502ac

Browse files
authored
Xcode 26.4 support (#403)
* Xcode 26.4 support * wip * bump
1 parent 7e2da6a commit 65502ac

File tree

14 files changed

+46
-69
lines changed

14 files changed

+46
-69
lines changed

Examples/CaseStudies/DynamicQuery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct DynamicQueryDemo: SwiftUICaseStudy {
5353
.searchable(text: $query)
5454
.task(id: query) {
5555
await withErrorReporting {
56-
try await $facts.load(Facts(query: query), animation: .default)
56+
try await $facts.load(Facts(query: query), animation: .default).task
5757
}
5858
}
5959
.task {

Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/Reminders/Schema.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ nonisolated func handleReminderStatusUpdate() {
381381
try await database.write { db in
382382
try Reminder
383383
.where { $0.status.eq(#bind(.completing)) }
384-
.update { $0.status = .completed }
384+
.update { $0.status = #bind(.completed) }
385385
.execute(db)
386386
}
387387
}

Examples/SyncUps/SyncUpForm.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ final class SyncUpFormModel: Identifiable {
7777
withErrorReporting {
7878
try database.write { db in
7979
let syncUpID = try SyncUp.upsert { syncUp }.returning(\.id).fetchOne(db)!
80-
try Attendee.where { $0.syncUpID == syncUpID }.delete().execute(db)
80+
try Attendee.where { $0.syncUpID.eq(syncUpID) }.delete().execute(db)
8181
try Attendee.insert {
8282
for attendee in attendees {
8383
Attendee.Draft(name: attendee.name, syncUpID: syncUpID)

Package.resolved

Lines changed: 13 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ let package = Package(
3737
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.18.4"),
3838
.package(
3939
url: "https://github.com/pointfreeco/swift-structured-queries",
40-
from: "0.29.0",
40+
from: "0.31.0",
4141
traits: [
4242
.trait(name: "StructuredQueriesTagged", condition: .when(traits: ["SQLiteDataTagged"]))
4343
]

Package@swift-6.0.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let package = Package(
2828
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.9.0"),
2929
.package(url: "https://github.com/pointfreeco/swift-sharing", from: "2.3.0"),
3030
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.18.4"),
31-
.package(url: "https://github.com/pointfreeco/swift-structured-queries", from: "0.29.0"),
31+
.package(url: "https://github.com/pointfreeco/swift-structured-queries", from: "0.31.0"),
3232
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.5.0"),
3333
],
3434
targets: [

Sources/SQLiteData/CloudKit/CloudKitSharing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
.where { $0.recordName.eq(recordName) }
207207
.update {
208208
$0.setLastKnownServerRecord(savedRootRecord)
209-
$0.share = savedShare
209+
$0.share = #bind(savedShare)
210210
}
211211
.execute(db)
212212
}

Sources/SQLiteData/CloudKit/Internal/Triggers.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@
288288
.update {
289289
$0.zoneName = new.zoneName
290290
$0.ownerName = new.ownerName
291-
$0.lastKnownServerRecord = nil
292-
$0._lastKnownServerRecordAllFields = nil
291+
$0.lastKnownServerRecord = #bind(nil)
292+
$0._lastKnownServerRecordAllFields = #bind(nil)
293293
}
294294
} when: { old, new in
295295
new.zoneName.neq(old.zoneName) || new.ownerName.neq(old.ownerName)

Sources/SQLiteData/CloudKit/SyncEngine.swift

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@
509509
if context == .preview {
510510
previewTimerTask.withValue {
511511
$0?.cancel()
512-
$0 = Task { [weak self] in
512+
$0 = Task { @Sendable [weak self] in
513513
await withErrorReporting {
514514
while true {
515515
guard let self else { break }
@@ -1179,7 +1179,8 @@
11791179
// NB: Fake 'sending' result.
11801180
nonisolated(unsafe) var result: T.QueryOutput?
11811181
try await userDatabase.read { db in
1182-
result = try T
1182+
result =
1183+
try T
11831184
.where {
11841185
#sql("\($0.primaryKey) = \(bind: metadata.recordPrimaryKey)")
11851186
}
@@ -1850,7 +1851,7 @@
18501851
try await userDatabase.write { db in
18511852
try SyncMetadata
18521853
.find(rootRecordID)
1853-
.update { $0.share = share }
1854+
.update { $0.share = #bind(share) }
18541855
.execute(db)
18551856
}
18561857
}
@@ -1880,7 +1881,7 @@
18801881
)
18811882
.update {
18821883
$0.setLastKnownServerRecord(rootRecord)
1883-
$0.share = nil
1884+
$0.share = #bind(nil)
18841885
}
18851886
.execute(db)
18861887
}
@@ -2062,7 +2063,8 @@
20622063
if data == nil {
20632064
reportIssue("Asset data not found on disk")
20642065
}
2065-
return "\(quote: columnName) = \(data?.queryFragment ?? #""excluded".\#(quote: columnName)"#)"
2066+
return
2067+
"\(quote: columnName) = \(data?.queryFragment ?? #""excluded".\#(quote: columnName)"#)"
20662068
} else {
20672069
return """
20682070
\(quote: columnName) = \
@@ -2330,7 +2332,7 @@
23302332
for table in tables {
23312333
func open<T>(_: some SynchronizableTable<T>) throws {
23322334
let columnsWithUniqueConstraints = try PragmaIndexList<T>
2333-
.where { $0.isUnique && $0.origin != "pk" }
2335+
.where { $0.isUnique && $0.origin.neq("pk") }
23342336
.select(\.name)
23352337
.fetchAll(db)
23362338
if !columnsWithUniqueConstraints.isEmpty {
@@ -2442,12 +2444,14 @@
24422444
mutating func setLastKnownServerRecord(_ lastKnownServerRecord: CKRecord?) {
24432445
self.zoneName = lastKnownServerRecord?.recordID.zoneID.zoneName ?? self.zoneName
24442446
self.ownerName = lastKnownServerRecord?.recordID.zoneID.ownerName ?? self.ownerName
2445-
self.lastKnownServerRecord = lastKnownServerRecord
2446-
self._lastKnownServerRecordAllFields = lastKnownServerRecord
2447+
self.lastKnownServerRecord = #bind(lastKnownServerRecord)
2448+
self._lastKnownServerRecordAllFields = #bind(lastKnownServerRecord)
24472449
if let lastKnownServerRecord {
2448-
self.userModificationTime = #sql("""
2450+
self.userModificationTime = #sql(
2451+
"""
24492452
max(\(self.userModificationTime), \(lastKnownServerRecord.userModificationTime))
2450-
""")
2453+
"""
2454+
)
24512455
}
24522456
}
24532457
}

0 commit comments

Comments
 (0)