Commit Graph
10748 Commits
Author SHA1 Message Date
Gwendal Roué bb22d9eced Mute compiler warning until language is fixed
The wrong warning is "Converting non-sendable function value to '@Sendable (Database) throws -> Void' may introduce data races"

https://github.com/apple/swift/issues/71541
2024-02-18 12:41:34 +01:00
Gwendal Roué 22a50a027a Tests wait for expections on the MainActor 2024-02-18 12:41:34 +01:00
Gwendal Roué aadb76199b Sendable annotations for record coding strategies 2024-02-18 12:41:34 +01:00
Gwendal Roué 86ff859be5 Fix test compilation errors - MUTEEEEEX 2024-02-18 12:41:34 +01:00
Gwendal Roué 974fa54e1d [BREAKING] Remove AsyncValueObservation does not need any scheduler 2024-02-18 12:41:34 +01:00
Gwendal Roué 6ff88c6310 Tests need a Mutex in order to avoid sendability warnings 2024-02-18 12:41:34 +01:00
Gwendal Roué 0e1220b048 Remove useless test 2024-02-18 12:41:34 +01:00
Gwendal Roué fb0866c6fa Rename LockedBox to Mutex
Maybe we'll be able to plug in the standard one eventually: https://forums.swift.org/t/pitch-synchronous-mutual-exclusion-lock/69889
2024-02-18 12:41:34 +01:00
Gwendal Roué a00825c882 PersistenceConflictPolicy is Sendable 2024-02-18 12:41:34 +01:00
Gwendal Roué fc7ca13c04 Sendable annotations for DAO 2024-02-16 17:43:41 +01:00
Gwendal Roué 1af8a2256f Sendable annotations for associations 2024-02-16 17:43:41 +01:00
Gwendal Roué c76215ba70 Sendable annotations for query interface requests 2024-02-16 08:34:21 +01:00
Gwendal Roué ee444c1468 Sendable annotations for DatabaseDateComponents 2024-02-16 08:34:21 +01:00
Gwendal Roué 3ffaa1929d [BREAKING] NSData and NSString are no longer DatabaseValueConvertible 2024-02-16 08:34:21 +01:00
Gwendal Roué 705c95ee92 SQLExpressible, SQLOrderingTerm and SQLSelectable are Sendable 2024-02-16 08:34:21 +01:00
Gwendal Roué 57382f5d8c Sendable annotations for DatabaseMigrator 2024-02-16 08:34:21 +01:00
Gwendal Roué 7d379409f1 Sendable annotations for DatabaseRegionObservation 2024-02-16 08:34:21 +01:00
Gwendal Roué 1fe410de69 Sendable annotations for ValueObservation 2024-02-16 08:34:21 +01:00
Gwendal Roué 133cc2e6e9 Sendable annotations for ValueObservationScheduler 2024-02-11 16:56:21 +01:00
Gwendal Roué 81746c75ad Sendable annotations in DatabaseReader and DatabaseWriter
Also, we make sure to always resume UnsafeContinuation with Sendable values. See https://forums.swift.org/t/advice-regarding-sendable-constraints-on-generic-async-apis/69969/3
2024-02-11 16:56:21 +01:00
Gwendal Roué 896d14ca56 Sendable annotations for OnDemandFuture 2024-02-11 16:56:21 +01:00
Gwendal Roué 9a75127b15 Pool is Sendable 2024-02-11 16:56:21 +01:00
Gwendal Roué 7a4b8d7aa5 ReadWriteBox is Sendable 2024-02-11 16:56:21 +01:00
Gwendal Roué e26cceb4a9 _ValueReducer inputs are Sendable 2024-02-11 16:56:21 +01:00
Gwendal Roué 8271fd4f5a TODO 2024-02-11 16:56:21 +01:00
Gwendal Roué 75f4ce75b0 DatabaseCancellable is Sendable 2024-02-11 16:56:21 +01:00
Gwendal Roué 491ceca46c The default inflections are nonisolated 2024-02-11 16:56:21 +01:00
Gwendal Roué f48f0c132d Sendable annotations 2024-02-11 16:56:21 +01:00
Gwendal Roué 62e8769be6 DatabaseCollation is Sendable 2024-02-11 16:56:21 +01:00
Gwendal Roué 97719932f5 DatabaseFunction is Sendable 2024-02-11 16:56:21 +01:00
Gwendal Roué 022487d360 Sendable annotations 2024-02-11 16:56:21 +01:00
Gwendal Roué 9b93ef7907 DispatchSpecificKey are nonisolated 2024-02-11 16:56:21 +01:00
Gwendal Roué a3b5001fed Sendable annotations 2024-02-11 16:56:21 +01:00
Gwendal Roué e0cfb97796 The global SQLite error log is nonisolated 2024-02-11 16:56:21 +01:00
Gwendal Roué b0a94d16df Configuration is Sendable 2024-02-11 16:56:21 +01:00
Gwendal Roué b593135401 SWIFT_STRICT_CONCURRENCY = complete 2024-02-11 16:56:21 +01:00
Gwendal Roué a455120135 [BREAKING] insertAndFetch, saveAndFetch, and updateAndFetch no longer return optionals.
Those optionals were just an annoyance. Now, nil results are replaced with `RecordError.recordNotFound`. Such an error is only expected with the IGNORE conflict policy.
2024-02-11 16:56:21 +01:00
Gwendal Roué 1811a9b64b Remove ill-advised TODO
I wouldn't want to keep an invalid pointer. And C functions accept the optional just fine.
2024-02-11 14:05:35 +01:00
Gwendal Roué 4e1f8962a4 Remove ill-advised TODO
This would force users to force-unwrap their custom `ColumnType(rawValue: "WHATEVER")!`
2024-02-11 14:05:35 +01:00
Gwendal Roué 44cd5ad749 [BREAKING] Bump requirements: Swift 5.10, Xcode 15.3, iOS 12, tvOS 12 2024-02-11 14:05:35 +01:00
Gwendal Roué 0437c0fed6 Merge pull request #1490 from danielinoa/patch-2
Update LICENSE to 2024
2024-02-07 08:53:45 +01:00
Daniel Inoa d08d2f52fb Update LICENSE 2024-02-06 18:30:52 -08:00
Gwendal Roué d1ff0912f1 Fix release date 2024-01-21 12:27:30 +01:00
Gwendal Roué e069e2732e Merge branch 'development' v6.24.2 2024-01-21 11:14:33 +01:00
Gwendal Roué c791e376e8 v6.24.2 2024-01-21 11:14:20 +01:00
Gwendal Roué acf1eb935b Merge pull request #1485 from groue/dev/immediate_transactions
Recommend IMMEDIATE transactions when a database is shared between multiple processes
2024-01-17 21:10:45 +01:00
Gwendal Roué 87c4b1cfa8 CHANGELOG 2024-01-17 20:06:38 +01:00
Gwendal Roué d0fc34b199 Recommend IMMEDIATE transactions in the Sharing a Database guide
Fix #1483
2024-01-17 20:04:39 +01:00
Gwendal Roué 9cee1e218d Tests for SQLITE_BUSY prevention with IMMEDIATE transactions
Those tests support the recommendation of IMMEDIATE transactions for shared databasesS.

See #1483
2024-01-17 19:39:40 +01:00
Gwendal Roué f5d55cb1a1 TODO 2024-01-17 10:51:42 +01:00