-
The Swift 5.10 compiler and concurrency checks can trigger warnings in your GRDB-powered application. The future GRDB 7 aims at solving those warnings. Meanwhile, you might wonder how to fix compiler diagnostics with GRDB 6. Please ask your questions below, so that we can share answers and best practices. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Warnings in associations declarationsThe Swift compiler can warn when you declare a association between record types: import GRDB
extension Author: Codable, FetchableRecord, PersistableRecord {
// ⚠️ Static property 'books' is not concurrency-safe because it is not
// either conforming to 'Sendable' or isolated to a global actor;
// this is an error in Swift 6
static let books = hasMany(Book.self)
} The reason for this warning is that GRBD associations do not conform to the Associations will be sendable in the next major version, GRDB 7. Until, then please apply one of those techniques:
|
Beta Was this translation helpful? Give feedback.
-
GRDB 7 solves the warnings of GRDB 6. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
GRDB 7 solves the warnings of GRDB 6.