Commit Graph
10962 Commits
Author SHA1 Message Date
Gwendal Roué cc0b401f0a StrictConcurrency: FetchableRecord.databaseDecodingUserInfo must be declared as a computed property 2024-09-22 10:10:01 +02:00
Gwendal Roué 1be676280f TODO 2024-09-22 10:10:01 +02:00
Gwendal Roué 938ad7a086 Prefer Data over NSData 2024-09-22 09:29:59 +02:00
Gwendal Roué 0af8415a22 GRDBDemo cleanup 2024-09-22 00:19:05 +02:00
Gwendal Roué 4463374ff3 Merge pull request #1636 from groue/dev/GRDB7-demo
GRDB 7: New demo app
2024-09-21 23:58:13 +02:00
Gwendal Roué be3bce9acc Fix GRDBTests target 2024-09-21 23:15:01 +02:00
Gwendal Roué d985314267 Replace the demo apps 2024-09-21 22:04:29 +02:00
Gwendal Roué 9ca2f6e6cc New manual install test app 2024-09-21 22:04:01 +02:00
Gwendal Roué 6c83b1c52b README 2024-09-21 21:29:54 +02:00
Gwendal Roué 22d43b67ba New demo app 2024-09-21 21:18:47 +02:00
Gwendal Roué e4e3da3a8e TODO 2024-09-21 17:22:33 +02:00
Gwendal Roué 173f363bdc TableRecord.databaseSelection should be declared as a computed property 2024-09-21 17:21:59 +02:00
Gwendal Roué c149d11703 Merge pull request #1635 from groue/dev/GRDB7-any-database
GRDB 7: prefer any DatabaseReader and DatabaseWriter
2024-09-21 17:14:49 +02:00
Gwendal Roué 900180dafd [BREAKING] Prefer any DatabaseReader and DatabaseWriter 2024-09-21 16:50:03 +02:00
Gwendal Roué 23842d8a97 Merge pull request #1634 from groue/dev/GRDB7-bump-requirements
GRDB 7: Bump requirements (again)
2024-09-21 15:19:48 +02:00
Gwendal Roué 46e15616a7 [BREAKING] macOS 10.15+ 2024-09-21 14:28:24 +02:00
Gwendal Roué e4a4735494 [BREAKING] tvOS 13+ 2024-09-21 13:57:35 +02:00
Gwendal Roué 8c40592955 [BREAKING] iOS 13+ 2024-09-21 13:57:23 +02:00
Gwendal Roué f794d98e49 Merge pull request #1633 from groue/dev/GRDB7-ValueObservation-async-sequence
GRDB 7: MainActor ValueObservation scheduling
2024-09-21 13:12:08 +02:00
Gwendal Roué 1649636695 TODO 2024-09-21 12:31:38 +02:00
Gwendal Roué 58a2e04736 Mark ValueObservation starting methods as @preconcurrency
I guess the compiler will learn to stop emitting warnings eventually.

https://mjtsai.com/blog/2024/09/20/unwanted-swift-concurrency-checking/
2024-09-21 12:30:38 +02:00
Gwendal Roué bdb7d84086 [BREAKING] ValueObservation MainActor scheduling
Breaking because before iOS 13, macOS 10.15, tvOS 13, there is no longer any default scheduler
2024-09-21 12:30:38 +02:00
Gwendal Roué e1a384009a [BREAKING] Async sequences built from ValueObservation schedule values and errors on the cooperative thread pool by default. 2024-09-21 12:19:39 +02:00
Gwendal Roué dd28d9734b Fix GlobalActorIsolatedTypesUsability 2024-09-21 12:15:47 +02:00
Gwendal Roué e7a95cf0f7 Enable GlobalActorIsolatedTypesUsability 2024-09-21 10:39:44 +02:00
Gwendal Roué 7707bbd1e9 Fix Swiftlint warning 2024-09-21 10:39:36 +02:00
Gwendal Roué 2845570929 Fix DocC warnings 2024-09-15 14:27:19 +02:00
Gwendal Roué 9e9bee8d3a TODO 2024-09-15 14:01:19 +02:00
Gwendal Roué e307e9c1da Improve CaseInsensitiveIdentifier documentation 2024-09-15 12:19:19 +02:00
Gwendal Roué 157dbefdc3 TODO 2024-09-15 12:18:56 +02:00
Gwendal Roué d11f5099b4 Record is not Sendable 2024-09-15 12:18:02 +02:00
Gwendal Roué 3728628e5f Association is Sendable 2024-09-15 12:10:13 +02:00
Gwendal Roué 29f8aa38fb Fix compiler warnings in ValueObservation observers 2024-09-15 12:10:10 +02:00
Gwendal Roué d489178d04 Improve ValueObservation tests debuggability 2024-09-15 11:33:25 +02:00
Gwendal Roué 473b06eac5 Fix compiler warnings about SQLQualifiedRelation 2024-09-15 11:32:06 +02:00
Gwendal Roué e68a2075fa Fix compiler warnings when building the request for an association 2024-09-15 11:25:23 +02:00
Gwendal Roué 630daaf48a Fix compiler warnings about StatementArgumentsSink for literal arguments 2024-09-15 11:17:01 +02:00
Gwendal Roué 461db6c4ac Feed database promises with Sendable values 2024-09-15 11:12:39 +02:00
Gwendal Roué d3e62dc5c9 Fix compiler warnings about default Inflections 2024-09-14 17:24:47 +02:00
Gwendal Roué 01308c6044 Fix compiler warnings about NSCache concurrency 2024-09-14 17:24:30 +02:00
Gwendal Roué b079136cd5 Fix compiler warnings about ISO8601DateFormatter concurrency 2024-09-14 17:24:16 +02:00
Gwendal Roué 9501d1f936 Fix compiler warnings about SchedulingWatchdog concurrency 2024-09-14 17:24:00 +02:00
Gwendal Roué c2219075cf TODO 2024-09-14 13:49:30 +02:00
Gwendal Roué 4f1587a307 Merge pull request #1618 from groue/dev/GRDB7-Sendable-database-access
GRDB 7: Sendable database accesses
2024-09-14 13:47:53 +02:00
Gwendal Roué 945f398c92 Fix Sendable warnings in tests 2024-09-08 18:00:37 +02:00
Gwendal Roué 4b5ec4f6ca Enable InferSendableFromCaptures upcoming feature 2024-09-08 17:48:50 +02:00
Gwendal Roué 2f240fd764 [SENDING REGRET] Async database access methods return Sendable results
We can not tell the compiler that we can safely return `sending` results, because fetched values are in the same region as the `db` argument, according to SE-0414 (https://github.com/swiftlang/swift-evolution/blob/main/proposals/0414-region-based-isolation.md#rules-for-merging-isolation-regions).

```
class NotSendable { init() { } }
func fetchNotSendable(_ db: Database) -> NotSendable { fatalError() }

func notOK<T>(_ make: (Database) -> sending T) { }
func ok<T>(_ make: () -> sending T) { }

func usage() {
    ok { NotSendable() }

    // Returning a task-isolated 'NotSendable' value as a 'sending' result
    // risks causing data races.
    notOK { db in fetchNotSendable(db) }
}
```

Various attempts at modifying all fetching methods so that they have a `sending` return value have failed.
2024-09-08 16:55:25 +02:00
Gwendal Roué ec5b7d96e2 SharedValueObservation is Sendable 2024-09-08 16:17:51 +02:00
Gwendal Roué 5f384a4b22 ValueObservation is Sendable 2024-09-08 16:17:51 +02:00
Gwendal Roué 28faa97a37 Database.afterNextTransaction callbacks are Sendable 2024-09-08 16:17:45 +02:00