Initial prototype for Swift 6 mode

This commit is contained in:
John Estropia
2026-07-07 11:18:17 +09:00
parent 38ec439b18
commit 49f65601cd
71 changed files with 998 additions and 684 deletions
+4 -4
View File
@@ -32,7 +32,7 @@ import CoreData
/**
The `UnsafeDataTransaction` provides an interface for non-contiguous `NSManagedObject` or `CoreStoreObject` creates, updates, and deletes. This is useful for making temporary changes, such as partially filled forms. An unsafe transaction object should typically be only used from the main queue.
*/
public final class UnsafeDataTransaction: BaseDataTransaction {
public final class UnsafeDataTransaction: BaseDataTransaction, @unchecked Sendable {
// MARK: -
@@ -42,7 +42,7 @@ public final class UnsafeDataTransaction: BaseDataTransaction {
- parameter completion: the block executed after the save completes. Success or failure is reported by the optional `error` argument of the block.
*/
public func commit(
_ completion: @escaping (_ error: CoreStoreError?) -> Void
_ completion: @escaping @Sendable (_ error: CoreStoreError?) -> Void
) {
self.context.saveAsynchronously(
@@ -142,7 +142,7 @@ public final class UnsafeDataTransaction: BaseDataTransaction {
*/
public func beginUnsafe(
supportsUndo: Bool = false,
sourceIdentifier: Any? = nil
sourceIdentifier: (any Sendable)? = nil
) -> UnsafeDataTransaction {
return UnsafeDataTransaction(
@@ -160,7 +160,7 @@ public final class UnsafeDataTransaction: BaseDataTransaction {
mainContext: NSManagedObjectContext,
queue: DispatchQueue,
supportsUndo: Bool,
sourceIdentifier: Any?
sourceIdentifier: (any Sendable)?
) {
super.init(