Skip to content

Commit 2be78a1

Browse files
authored
Merge pull request #41 from roanutil/bugfix/build-errors-with-swift-6-2
Bugfix/build errors with swift 6 2
2 parents 8e9ede2 + 7259c07 commit 2be78a1

16 files changed

Lines changed: 172 additions & 142 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Lint
2727
run: swiftlint lint --quiet
2828
test:
29-
runs-on: macos-15
29+
runs-on: macos-26
3030
environment: default
3131
steps:
3232
- uses: actions/checkout@v4

Sources/CoreDataRepository/CoreDataRepository+Aggregate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the MIT License (MIT) found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
import CoreData
7+
@preconcurrency import CoreData
88
import Foundation
99

1010
// swiftlint:disable file_length

Sources/CoreDataRepository/CoreDataRepository+Fetch.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the MIT License (MIT) found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
import CoreData
7+
@preconcurrency import CoreData
88
import Foundation
99

1010
extension CoreDataRepository {

Sources/CoreDataRepository/CoreDataRepository+Read_Batch.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ extension CoreDataRepository {
9595
/// This operation is non-atomic. Each instance may succeed or fail individually.
9696
@inlinable
9797
public func readAtomically<Model: IdentifiedUnmanagedModel>(
98-
_ ids: some Sequence<Model.UnmanagedId>,
98+
_ ids: some Sequence<Model.UnmanagedId> & Sendable,
9999
as _: Model.Type
100100
) async -> Result<[Model], CoreDataError> {
101101
let context = Transaction.current?.context ?? context
@@ -115,7 +115,7 @@ extension CoreDataRepository {
115115
/// This operation is non-atomic. Each instance may succeed or fail individually.
116116
@inlinable
117117
public func readAtomically<Model: ReadableUnmanagedModel>(
118-
_ items: some Sequence<Model>
118+
_ items: some Sequence<Model> & Sendable
119119
) async -> Result<[Model], CoreDataError> {
120120
let context = Transaction.current?.context ?? context
121121
return await context.performInChild(schedule: .enqueued) { readContext in
@@ -134,7 +134,7 @@ extension CoreDataRepository {
134134
/// This operation is non-atomic. Each instance may succeed or fail individually.
135135
@inlinable
136136
public func readAtomically<Model: FetchableUnmanagedModel>(
137-
_ managedIds: some Sequence<NSManagedObjectID>,
137+
_ managedIds: some Sequence<NSManagedObjectID> & Sendable,
138138
as _: Model.Type
139139
) async -> Result<[Model], CoreDataError> {
140140
let context = Transaction.current?.context ?? context
@@ -154,7 +154,7 @@ extension CoreDataRepository {
154154
/// This operation is non-atomic. Each instance may succeed or fail individually.
155155
@inlinable
156156
public func readAtomically<Model: FetchableUnmanagedModel>(
157-
_ managedIdUrls: some Sequence<URL>,
157+
_ managedIdUrls: some Sequence<URL> & Sendable,
158158
as _: Model.Type
159159
) async -> Result<[Model], CoreDataError> {
160160
let context = Transaction.current?.context ?? context

Sources/CoreDataRepository/Internal/AggregateSubscription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the MIT License (MIT) found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
import CoreData
7+
@preconcurrency import CoreData
88
import Foundation
99

1010
/// Subscription provider that sends updates when an aggregate fetch request changes

Sources/CoreDataRepository/Internal/AggregateThrowingSubscription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the MIT License (MIT) found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
import CoreData
7+
@preconcurrency import CoreData
88
import Foundation
99

1010
/// Subscription provider that sends updates when an aggregate fetch request changes

Sources/CoreDataRepository/Internal/CountSubscription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the MIT License (MIT) found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
import CoreData
7+
@preconcurrency import CoreData
88
import Foundation
99

1010
/// Subscription provider that sends updates when a count fetch request changes

Sources/CoreDataRepository/Internal/CountThrowingSubscription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the MIT License (MIT) found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
import CoreData
7+
@preconcurrency import CoreData
88
import Foundation
99

1010
/// Subscription provider that sends updates when a count fetch request changes

Sources/CoreDataRepository/Internal/FetchSubscription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the MIT License (MIT) found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
import CoreData
7+
@preconcurrency import CoreData
88
import Foundation
99

1010
/// Subscription provider that sends updates when a fetch request changes

Sources/CoreDataRepository/Internal/FetchThrowingSubscription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the MIT License (MIT) found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
import CoreData
7+
@preconcurrency import CoreData
88
import Foundation
99

1010
/// Subscription provider that sends updates when a fetch request changes

0 commit comments

Comments
 (0)