Gwendal Roué
372affbe5b
StrictConcurrency: SQLQualifiedRelation is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
91e1ca4bae
Prefer Data over NSData
2024-07-27 16:37:33 +02:00
Gwendal Roué
3f61908e7e
StrictConcurrency: Convert non-sendable to Sendable values before building database promises
...
🥳 We don't need SQLSelectable, SQLExpressible and SQLOrderingTerm to be Sendable. This is important because it allows non-Sendable types to be used in request definitions. For example: NSData, NSString (not expected to be used frequently, but users are wild).
2024-07-27 16:37:33 +02:00
Gwendal Roué
57516c5e38
StrictConcurrency: SQLAssociationCondition is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
5d66407368
StrictConcurrency: fix warning about ISO8601DateFormatter
2024-07-27 16:37:33 +02:00
Gwendal Roué
20d948b4d2
StrictConcurrency: fix warning about defaultDatabaseTableNameCache
2024-07-27 16:37:33 +02:00
Gwendal Roué
8346e69757
StrictConcurrency: ValueObservation.map requires a Sendable closure
2024-07-27 16:37:33 +02:00
Gwendal Roué
135de3c56e
⚠️ StrictConcurrency: fix warnings about the transfer of non-sendable values
...
We use unsafe constructs that we'll be able to replace with transferring parameters when the feature ships in the language: https://forums.swift.org/t/how-can-i-use-region-based-isolation/71426/5
2024-07-27 16:37:33 +02:00
Gwendal Roué
87fb90ef97
StrictConcurrency: FetchRequestEraser is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
6898d8c915
StrictConcurrency: AdaptedFetchRequest.adapter is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
aad170330a
StrictConcurrency: SharedValueObservation is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
8b49360af1
StrictConcurrency: ValueObservation change callback is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
93f6f98261
StrictConcurrency: ValueObservation is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
67473154f9
StrictConcurrency: DatabasePublishers.ValueSubscription is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
8d137a2d16
StrictConcurrency: ValueObservation requires Sendable fetching closures
2024-07-27 16:37:33 +02:00
Gwendal Roué
45539583a8
Mutex.wasNeeded convenience
2024-07-27 16:37:33 +02:00
Gwendal Roué
87b9db65d1
StrictConcurrency: ValueConcurrentObserver is Sendable
...
Required for DatabaseCancellable conformance
2024-07-27 16:37:33 +02:00
Gwendal Roué
5465d056ab
StrictConcurrency: refactor ValueReducer and extract its Sendable fetching facet
2024-07-27 16:37:33 +02:00
Gwendal Roué
ff2a75489d
StrictConcurrency: ValueWriteOnlyObserver is Sendable
...
Required for DatabaseCancellable conformance
2024-07-27 16:37:33 +02:00
Gwendal Roué
b4677dede4
StrictConcurrency: DatabaseRegionConvertible is Sendable
...
A ValueObservation will use such an object from database readers, writers, and the main thread: they must support all isolation domains.
2024-07-27 16:37:33 +02:00
Gwendal Roué
8f486a5e41
StrictConcurrency: fix warning about AnyDatabaseCancellable initializer
2024-07-27 16:37:33 +02:00
Gwendal Roué
484224c654
StrictConcurrency: fix warning about Inflections.default
2024-07-27 16:37:33 +02:00
Gwendal Roué
7f5205ef8c
Rename ReadWriteBox to ReadWriteLock
...
... and make it conditionally Sendable, and it is no longer a property wrapper.
It is conditionally Sendable because we can't use the techniques of the future standard Mutex (SE-0433 Synchronous Mutual Exclusion Lock, https://github.com/apple/swift-evolution/blob/main/proposals/0433-mutex.md ).
It is no longer a property wrapper because the Swift compiler can perform strict concurrency checks through a `var` property.
2024-07-27 16:37:33 +02:00
Gwendal Roué
99715892e7
StrictConcurrency: fix warning about StatementArgumentsSink.literalValues
2024-07-27 16:37:33 +02:00
Gwendal Roué
e022c35b49
StrictConcurrency: OrderedDictionary is conditionally Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
5a2c15b82e
StrictConcurrency: DatabasePromise initializer requires a Sendable value
2024-07-27 16:37:33 +02:00
Gwendal Roué
88539df543
StrictConcurrency: use a Sendable strong reference
2024-07-27 16:37:33 +02:00
Gwendal Roué
991d2c8bbc
StrictConcurrency: UIApplication is MainActor-isolated
2024-07-27 16:37:33 +02:00
Gwendal Roué
3995bfdbec
StrictConcurrency: workaround warning about UIApplication.xxxNotification
2024-07-27 16:37:33 +02:00
Gwendal Roué
6aa43ded3c
Enable strict concurrency checks
2024-07-27 16:37:33 +02:00
Gwendal Roué
b11c5dd25b
DatabaseCursor has a primary associated type
2024-07-27 16:37:33 +02:00
Gwendal Roué
a474a674b4
Project organization
2024-07-27 16:37:33 +02:00
Gwendal Roué
6c73b1c5c8
Cleanup ValueReducer
2024-07-27 16:37:33 +02:00
Gwendal Roué
2ce8a6191d
Split Row.swift into focused files
2024-07-27 16:37:33 +02:00
Gwendal Roué
eed2ae03ae
TODO
2024-07-27 16:37:33 +02:00
Gwendal Roué
ac33856f31
SQL is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
9545bf70e2
SQLRelation is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
f2b0b1869c
⚠️ Make TableAlias Sendable even if it is not yet.
2024-07-27 16:37:33 +02:00
Gwendal Roué
05899228fd
DatabasePromise is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
735175e902
FTS5 tokenizers don't need to be Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
9b2466c2aa
Fix a concurrency warning
2024-07-27 16:37:33 +02:00
Gwendal Roué
cfd4a71efa
writePublisher(updates:thenRead:) requires a Sendable Value
...
... But I don't know if region-based isolation and SE-0430 can relax this constraint or not.
2024-07-27 16:37:33 +02:00
Gwendal Roué
e6a7d7dad4
Fix concurrency warning on SQLITE_TRANSIENT
2024-07-27 16:37:33 +02:00
Gwendal Roué
3b593d7649
ValueObservation.handleEvents accept Sendable closures
2024-07-27 16:37:33 +02:00
Gwendal Roué
3476b6348a
ValueObservationScheduler async access requires a Sendable closure
2024-07-27 16:37:33 +02:00
Gwendal Roué
7d7dc8ea72
SerializedDatabase async access requires a Sendable closure
2024-07-27 16:37:33 +02:00
Gwendal Roué
7fd34012b4
WALSnapshotTransaction is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
2aabc4c10e
OnDemandFuture fulfill is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
f13b2d2eb4
Pool is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
57a86a0e2a
ReadWriteBox is Sendable
2024-07-27 16:37:33 +02:00