From db9ef1bb2758b8d1441a25d7525f3bf86e1551db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 29 Sep 2024 12:12:57 +0200 Subject: [PATCH] Emphasize Swift concurrency recommendations in the migration guide --- Documentation/GRDB7MigrationGuide.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Documentation/GRDB7MigrationGuide.md b/Documentation/GRDB7MigrationGuide.md index 6e090ac3a..aa31d9833 100644 --- a/Documentation/GRDB7MigrationGuide.md +++ b/Documentation/GRDB7MigrationGuide.md @@ -4,6 +4,7 @@ Migrating From GRDB 6 to GRDB 7 **This guide helps you upgrade your applications from GRDB 6 to GRDB 7.** - [Preparing the Migration to GRDB 7](#preparing-the-migration-to-grdb-7) +- [Recommendations Regarding Swift Concurrency](#recommendations-regarding-swift-concurrency) - [New requirements](#new-requirements) - [Companion Libraries](#companion-libraries) - [Column Coding Strategies](#column-coding-strategies) @@ -11,18 +12,23 @@ Migrating From GRDB 6 to GRDB 7 - [Default Transaction Kind](#default-transaction-kind) - [Access to SQLite C functions](#access-to-sqlite-c-functions) - [The Record Base Class is Discouraged](#the-record-base-class-is-discouraged) -- [Recommendations Regarding Swift Concurrency](#recommendations-regarding-swift-concurrency) - [Other Changes](#other-changes) ## Preparing the Migration to GRDB 7 Before upgrading, ensure you are using the [latest GRDB 6 release](https://github.com/groue/GRDB.swift/tags) and address any deprecation warnings. Once this is done, proceed with upgrading to GRDB 7. Due to breaking changes, your application may no longer compile. Follow the fix-it suggestions for simple syntax updates, and review the specific modifications described below. +## Recommendations Regarding Swift Concurrency + +GRDB 7 requires Xcode 16+ and a Swift 6 compiler. + +Depending of the language mode and level of concurrency checkings used by your application, you may see warnings or errors. See [Migrating to Swift 6] on swift.org for more information about Swift 6. See [Swift Concurrency and GRDB] for GRDB-focused advice. + ## New requirements GRDB requirements have been bumped: -- **Swift Compiler 6+** (was Swift 5.7+). Both Swift 5 and Swift 6 language modes are supported. For more information, see the [Migrating to Swift 6] Apple guide. +- **Swift Compiler 6+** (was Swift 5.7+). - **Xcode 16.0+** (was Xcode 14.0+) - **iOS 13+** (was iOS 11+) - **macOS 10.15+** (was macOS 10.13+) @@ -172,13 +178,6 @@ extension Player: FetchableRecord, PersistableRecord { } Do not miss [Swift Concurrency and GRDB], for more recommendations regarding non-Sendable record types in GRDB. -## Recommendations Regarding Swift Concurrency - -GRDB 7 requires Xcode 16+ and a Swift 6 compiler. - -Depending of the language mode and level of concurrency checkings used by your application (see [Migrating to Swift 6]), you may see warnings or errors. We address those issues, and provide general guidance, in [Swift Concurrency and GRDB]. - - ## Other Changes - `ValueObservation` must be started from the Main Actor by default. Use an explicit `async(onQueue: .main)` scheduling in order to remove this constraint.