Gwendal Roué
e28558334f
StrictConcurrency/tests: XCTestCase.waitForExpectations is main-actor isolated
2024-07-27 16:37:33 +02:00
Gwendal Roué
75f67949ea
StrictConcurrency/tests: cleanup test SQL traces
2024-07-27 16:37:33 +02:00
Gwendal Roué
9e3e4158ff
StrictConcurrency/tests: fix warning in CombineExpectations
2024-07-27 16:37:33 +02:00
Gwendal Roué
0f840e0413
Document TOOLCHAIN usage
2024-07-27 16:37:33 +02:00
Gwendal Roué
6536ba404f
TODO
2024-07-27 16:37:33 +02:00
Gwendal Roué
5f26a7ac01
Replace Mutex.value with load() and store(_:)
...
... and fix logic bugs on the way.
Inspired by https://forums.swift.org/t/se-0433-synchronous-mutual-exclusion-lock/71174/58
Fixed bugs follow this pattern: https://forums.swift.org/t/se-0433-synchronous-mutual-exclusion-lock/71174/77
2024-07-27 16:37:33 +02:00
Gwendal Roué
dd47a7b8b3
Extract PersistenceContainer in its own file
2024-07-27 16:37:33 +02:00
Gwendal Roué
d5c0044342
StrictConcurrency: fix warning in TableRecord.request(for:)
2024-07-27 16:37:33 +02:00
Gwendal Roué
50eefa8c0f
[BREAKING] PersistenceContainer is Sendable
...
The breaking change is that the container now only stores DatabaseValue: user can't extract the value that was previously stored.
2024-07-27 16:37:33 +02:00
Gwendal Roué
c0838cf90f
Improve CaseInsensitiveIdentifier documentation
2024-07-27 16:37:33 +02:00
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