diff --git a/FetchRequests.xcodeproj/project.pbxproj b/FetchRequests.xcodeproj/project.pbxproj index f9efcf7..7479bf3 100644 --- a/FetchRequests.xcodeproj/project.pbxproj +++ b/FetchRequests.xcodeproj/project.pbxproj @@ -1286,10 +1286,8 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_STRICT_CONCURRENCY = complete; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = ""; TVOS_DEPLOYMENT_TARGET = 13.0; VERSIONING_SYSTEM = "apple-generic"; @@ -1366,10 +1364,8 @@ SKIP_INSTALL = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_STRICT_CONCURRENCY = complete; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = ""; TVOS_DEPLOYMENT_TARGET = 13.0; VALIDATE_PRODUCT = YES; diff --git a/FetchRequests/Sources/Associations/FetchRequestAssociation.swift b/FetchRequests/Sources/Associations/FetchRequestAssociation.swift index e8f1d64..06b1739 100644 --- a/FetchRequests/Sources/Associations/FetchRequestAssociation.swift +++ b/FetchRequests/Sources/Associations/FetchRequestAssociation.swift @@ -27,7 +27,7 @@ public class FetchRequestAssociation { _ completion: @escaping @MainActor ([AssociatedEntity]) -> Void ) -> Void /// Event that represents the creation of an associated value object - public typealias CreationObserved = (Value?, Comparison) -> AssociationReplacement + public typealias CreationObserved = @MainActor (Value?, Comparison) -> AssociationReplacement /// Start observing a source object public typealias TokenGenerator = (Source) -> Token? diff --git a/FetchRequests/Sources/Logging.swift b/FetchRequests/Sources/Logging.swift index 23b44bb..e04161e 100644 --- a/FetchRequests/Sources/Logging.swift +++ b/FetchRequests/Sources/Logging.swift @@ -15,7 +15,7 @@ func CWLogVerbose( _ message: @autoclosure () -> String, level: DDLogLevel = dynamicLogLevel, context: Int = 0, - file: StaticString = #file, + file: StaticString = #filePath, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, @@ -39,7 +39,7 @@ func CWLogDebug( _ message: @autoclosure () -> String, level: DDLogLevel = dynamicLogLevel, context: Int = 0, - file: StaticString = #file, + file: StaticString = #filePath, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, @@ -63,7 +63,7 @@ func CWLogInfo( _ message: @autoclosure () -> String, level: DDLogLevel = dynamicLogLevel, context: Int = 0, - file: StaticString = #file, + file: StaticString = #filePath, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, @@ -87,7 +87,7 @@ func CWLogWarning( _ message: @autoclosure () -> String, level: DDLogLevel = dynamicLogLevel, context: Int = 0, - file: StaticString = #file, + file: StaticString = #filePath, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, @@ -111,7 +111,7 @@ func CWLogError( _ message: @autoclosure () -> String, level: DDLogLevel = dynamicLogLevel, context: Int = 0, - file: StaticString = #file, + file: StaticString = #filePath, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, diff --git a/FetchRequests/Tests/Controllers/CollapsibleSectionsFetchedResultsControllerTestCase.swift b/FetchRequests/Tests/Controllers/CollapsibleSectionsFetchedResultsControllerTestCase.swift index 66e3654..86b8356 100644 --- a/FetchRequests/Tests/Controllers/CollapsibleSectionsFetchedResultsControllerTestCase.swift +++ b/FetchRequests/Tests/Controllers/CollapsibleSectionsFetchedResultsControllerTestCase.swift @@ -873,7 +873,7 @@ extension CollapsibleSectionsFetchedResultsControllerTestCase { extension CollapsibleSectionsFetchedResultsControllerTestCase { @MainActor - private func setupControllerForKVO(_ file: StaticString = #file, line: UInt = #line) throws { + private func setupControllerForKVO(_ file: StaticString = #filePath, line: UInt = #line) throws { controller = FetchController( definition: createFetchDefinition(), sortDescriptors: [ @@ -1323,14 +1323,14 @@ extension CollapsibleSectionsFetchedResultsControllerTestCase { private extension CollapsibleSectionsFetchedResultsControllerTestCase { @MainActor - func performFetch(_ objectIDs: [String], file: StaticString = #file, line: UInt = #line) throws { + func performFetch(_ objectIDs: [String], file: StaticString = #filePath, line: UInt = #line) throws { let objects = objectIDs.compactMap { TestObject(id: $0) } try performFetch(objects, file: file, line: line) } @MainActor - func performFetch(_ objects: [TestObject], file: StaticString = #file, line: UInt = #line) throws { + func performFetch(_ objects: [TestObject], file: StaticString = #filePath, line: UInt = #line) throws { controller.performFetch() self.fetchCompletion(objects) @@ -1340,7 +1340,7 @@ private extension CollapsibleSectionsFetchedResultsControllerTestCase { } // swiftlint:disable:next implicitly_unwrapped_optional - func getObjectAtIndex(_ index: Int, withObjectID objectID: String, file: StaticString = #file, line: UInt = #line) -> TestObject! { + func getObjectAtIndex(_ index: Int, withObjectID objectID: String, file: StaticString = #filePath, line: UInt = #line) -> TestObject! { let object = controller.fetchedObjects[index] XCTAssertEqual(object.id, objectID, file: file, line: line) diff --git a/FetchRequests/Tests/Controllers/FetchedResultsControllerTestCase.swift b/FetchRequests/Tests/Controllers/FetchedResultsControllerTestCase.swift index b8a0e0f..e7af76d 100644 --- a/FetchRequests/Tests/Controllers/FetchedResultsControllerTestCase.swift +++ b/FetchRequests/Tests/Controllers/FetchedResultsControllerTestCase.swift @@ -549,7 +549,7 @@ extension FetchedResultsControllerTestCase { extension FetchedResultsControllerTestCase { @MainActor - private func setupControllerForKVO(_ file: StaticString = #file, line: UInt = #line) throws { + private func setupControllerForKVO(_ file: StaticString = #filePath, line: UInt = #line) throws { controller = FetchedResultsController( definition: createFetchDefinition(), sortDescriptors: [ diff --git a/FetchRequests/Tests/Controllers/FetchedResultsControllerTestHarness.swift b/FetchRequests/Tests/Controllers/FetchedResultsControllerTestHarness.swift index e959b59..ea920d9 100644 --- a/FetchRequests/Tests/Controllers/FetchedResultsControllerTestHarness.swift +++ b/FetchRequests/Tests/Controllers/FetchedResultsControllerTestHarness.swift @@ -24,14 +24,14 @@ protocol FetchedResultsControllerTestHarness { extension FetchedResultsControllerTestHarness { @MainActor - func performFetch(_ objectIDs: [String], file: StaticString = #file, line: UInt = #line) throws { + func performFetch(_ objectIDs: [String], file: StaticString = #filePath, line: UInt = #line) throws { let objects = objectIDs.compactMap { TestObject(id: $0) } try performFetch(objects, file: file, line: line) } @MainActor - func performFetch(_ objects: [TestObject], file: StaticString = #file, line: UInt = #line) throws { + func performFetch(_ objects: [TestObject], file: StaticString = #filePath, line: UInt = #line) throws { controller.performFetch() self.fetchCompletion(objects) @@ -41,7 +41,7 @@ extension FetchedResultsControllerTestHarness { } // swiftlint:disable:next implicitly_unwrapped_optional - func getObjectAtIndex(_ index: Int, withObjectID objectID: String, file: StaticString = #file, line: UInt = #line) -> TestObject! { + func getObjectAtIndex(_ index: Int, withObjectID objectID: String, file: StaticString = #filePath, line: UInt = #line) -> TestObject! { let object = controller.fetchedObjects[index] XCTAssertEqual(object.id, objectID, file: file, line: line) diff --git a/FetchRequests/Tests/Controllers/PaginatingFetchedResultsControllerTestCase.swift b/FetchRequests/Tests/Controllers/PaginatingFetchedResultsControllerTestCase.swift index a860099..bea699b 100644 --- a/FetchRequests/Tests/Controllers/PaginatingFetchedResultsControllerTestCase.swift +++ b/FetchRequests/Tests/Controllers/PaginatingFetchedResultsControllerTestCase.swift @@ -292,14 +292,14 @@ extension PaginatingFetchedResultsControllerTestCase: FetchedResultsControllerDe private extension PaginatingFetchedResultsControllerTestCase { @MainActor - func performPagination(_ objectIDs: [String], file: StaticString = #file, line: UInt = #line) { + func performPagination(_ objectIDs: [String], file: StaticString = #filePath, line: UInt = #line) { let objects = objectIDs.compactMap { TestObject(id: $0) } performPagination(objects, file: file, line: line) } @MainActor - func performPagination(_ objects: [TestObject], file: StaticString = #file, line: UInt = #line) { + func performPagination(_ objects: [TestObject], file: StaticString = #filePath, line: UInt = #line) { controller.performPagination { hasPageResults in self.performPaginationCompletionResult = hasPageResults }