The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of YPersistence, reference 1.1.0 (7de3f7), with Swift 6.0 for macOS (SPM) on 14 Sep 2024 16:51:58 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/codeandtheory/ypersistence-ios.git
Reference: 1.1.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/codeandtheory/ypersistence-ios
 * tag               1.1.0      -> FETCH_HEAD
HEAD is now at 7de3f7c [1346] Mark functionality for records (#14)
Cloned https://github.com/codeandtheory/ypersistence-ios.git
Revision (git rev-parse @):
7de3f7c4ef82dabd8db12406cfb5b7c004caef45
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/codeandtheory/ypersistence-ios.git at 1.1.0
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/codeandtheory/ypersistence-ios.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-117DEE11B69C53C9.txt
[3/20] Compiling YPersistence RecordToModel.swift
[4/20] Compiling YPersistence SyncRecord.swift
[5/20] Compiling YPersistence SortColumn.swift
[6/21] Compiling YPersistence ModelRepresentable.swift
[7/21] Compiling YPersistence RecordFromModel.swift
[8/21] Compiling YPersistence PersistenceManager+Sync.swift
/Users/admin/builder/spi-builder-workspace/Sources/YPersistence/Manager/PersistenceManager.swift:25:61: warning: reference to var 'NSErrorMergePolicy' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 23 |     ///   - mergePolicy: The merge policy to use for each context. Default = `NSErrorMergePolicy`.
 24 |     ///   It is the only policy that requires action to correct any potential conflicts.
 25 |     public init(modelName: String, mergePolicy: AnyObject = NSErrorMergePolicy, bundle: Bundle = .main) {
    |                                                             `- warning: reference to var 'NSErrorMergePolicy' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 26 |         guard let model = NSManagedObjectModel(from: modelName, in: bundle) else {
 27 |             preconditionFailure("There must be a valid Core Data model.")
CoreData.NSErrorMergePolicy:2:12: note: var declared here
1 | @available(macOS 10.4, *)
2 | public var NSErrorMergePolicy: AnyObject
  |            `- note: var declared here
[9/21] Compiling YPersistence PersistenceManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/YPersistence/Manager/PersistenceManager.swift:25:61: warning: reference to var 'NSErrorMergePolicy' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 23 |     ///   - mergePolicy: The merge policy to use for each context. Default = `NSErrorMergePolicy`.
 24 |     ///   It is the only policy that requires action to correct any potential conflicts.
 25 |     public init(modelName: String, mergePolicy: AnyObject = NSErrorMergePolicy, bundle: Bundle = .main) {
    |                                                             `- warning: reference to var 'NSErrorMergePolicy' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 26 |         guard let model = NSManagedObjectModel(from: modelName, in: bundle) else {
 27 |             preconditionFailure("There must be a valid Core Data model.")
CoreData.NSErrorMergePolicy:2:12: note: var declared here
1 | @available(macOS 10.4, *)
2 | public var NSErrorMergePolicy: AnyObject
  |            `- note: var declared here
[10/21] Compiling YPersistence PersistenceManager+Fetch.swift
[11/21] Compiling YPersistence PersistenceManager+Save.swift
[12/21] Compiling YPersistence CoreModel.swift
[13/21] Compiling YPersistence DataRecord.swift
[14/21] Compiling YPersistence PersistenceManager+Clear.swift
[15/21] Compiling YPersistence PersistenceManager+Delete.swift
[16/21] Compiling YPersistence SortInfo.swift
[17/21] Compiling YPersistence NSManagedObjectModel+init.swift
[18/21] Compiling YPersistence PersistenceManager+BulkDelete.swift
[19/21] Emitting module YPersistence
/Users/admin/builder/spi-builder-workspace/Sources/YPersistence/Manager/PersistenceManager.swift:25:61: warning: reference to var 'NSErrorMergePolicy' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 23 |     ///   - mergePolicy: The merge policy to use for each context. Default = `NSErrorMergePolicy`.
 24 |     ///   It is the only policy that requires action to correct any potential conflicts.
 25 |     public init(modelName: String, mergePolicy: AnyObject = NSErrorMergePolicy, bundle: Bundle = .main) {
    |                                                             `- warning: reference to var 'NSErrorMergePolicy' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 26 |         guard let model = NSManagedObjectModel(from: modelName, in: bundle) else {
 27 |             preconditionFailure("There must be a valid Core Data model.")
CoreData.NSErrorMergePolicy:2:12: note: var declared here
1 | @available(macOS 10.4, *)
2 | public var NSErrorMergePolicy: AnyObject
  |            `- note: var declared here
[20/21] Compiling YPersistence DispatchQueue+executeOnMain.swift
/Users/admin/builder/spi-builder-workspace/Sources/YPersistence/Extensions/DispatchQueue+executeOnMain.swift:24:40: warning: capture of 'work' with non-sendable type '@convention(block) () -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |         } else {
23 |             // If we're not on main, then run it asynchronously on main
24 |             DispatchQueue.main.async { work() }
   |                                        |- warning: capture of 'work' with non-sendable type '@convention(block) () -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
   |                                        `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
25 |         }
26 |     }
/Users/admin/builder/spi-builder-workspace/Sources/YPersistence/Extensions/DispatchQueue+executeOnMain.swift:24:40: warning: sending 'work' risks causing data races; this is an error in the Swift 6 language mode
22 |         } else {
23 |             // If we're not on main, then run it asynchronously on main
24 |             DispatchQueue.main.async { work() }
   |                                        |- warning: sending 'work' risks causing data races; this is an error in the Swift 6 language mode
   |                                        `- note: task-isolated 'work' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
25 |         }
26 |     }
[21/21] Compiling YPersistence NSManagedObjectContext+SaveChanges.swift
/Users/admin/builder/spi-builder-workspace/Sources/YPersistence/Extensions/DispatchQueue+executeOnMain.swift:24:40: warning: capture of 'work' with non-sendable type '@convention(block) () -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |         } else {
23 |             // If we're not on main, then run it asynchronously on main
24 |             DispatchQueue.main.async { work() }
   |                                        |- warning: capture of 'work' with non-sendable type '@convention(block) () -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
   |                                        `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
25 |         }
26 |     }
/Users/admin/builder/spi-builder-workspace/Sources/YPersistence/Extensions/DispatchQueue+executeOnMain.swift:24:40: warning: sending 'work' risks causing data races; this is an error in the Swift 6 language mode
22 |         } else {
23 |             // If we're not on main, then run it asynchronously on main
24 |             DispatchQueue.main.async { work() }
   |                                        |- warning: sending 'work' risks causing data races; this is an error in the Swift 6 language mode
   |                                        `- note: task-isolated 'work' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
25 |         }
26 |     }
Build complete! (11.87s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "YPersistence",
  "name" : "YPersistence",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "YPersistence",
      "targets" : [
        "YPersistence"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "YPersistenceTests",
      "module_type" : "SwiftTarget",
      "name" : "YPersistenceTests",
      "path" : "Tests/YPersistenceTests",
      "sources" : [
        "DataModel/Human/ManagedFruit.swift",
        "DataModel/Human/ManagedGroceryProduct.swift",
        "DataModel/Machine/_ManagedFruit.swift",
        "DataModel/Machine/_ManagedGroceryProduct.swift",
        "DataModel/Mocks/Fruit.swift",
        "DataModel/Mocks/GroceryProduct.swift",
        "Extensions/DispatchQueue+executeOnMainTests.swift",
        "Extensions/NSManagedObjectContext+SaveChangesTests.swift",
        "Extensions/NSManagedObjectModel+initTests.swift",
        "Manager/PersistenceManager+BulkDeleteTests.swift",
        "Manager/PersistenceManager+ClearTests.swift",
        "Manager/PersistenceManager+DeleteTests.swift",
        "Manager/PersistenceManager+FetchTests.swift",
        "Manager/PersistenceManager+SaveTests.swift",
        "Manager/PersistenceManager+SyncTests.swift",
        "Manager/PersistenceManagerBaseTests.swift",
        "Manager/PersistenceManagerTests.swift",
        "Protocols/DataRecordTests.swift",
        "Protocols/SyncRecordTests.swift",
        "SortColumnTests.swift",
        "SortInfoTests.swift"
      ],
      "target_dependencies" : [
        "YPersistence"
      ],
      "type" : "test"
    },
    {
      "c99name" : "YPersistence",
      "module_type" : "SwiftTarget",
      "name" : "YPersistence",
      "path" : "Sources/YPersistence",
      "product_memberships" : [
        "YPersistence"
      ],
      "sources" : [
        "Extensions/DispatchQueue+executeOnMain.swift",
        "Extensions/NSManagedObjectContext+SaveChanges.swift",
        "Extensions/NSManagedObjectModel+init.swift",
        "Manager/PersistenceManager+BulkDelete.swift",
        "Manager/PersistenceManager+Clear.swift",
        "Manager/PersistenceManager+Delete.swift",
        "Manager/PersistenceManager+Fetch.swift",
        "Manager/PersistenceManager+Save.swift",
        "Manager/PersistenceManager+Sync.swift",
        "Manager/PersistenceManager.swift",
        "Protocols/CoreModel.swift",
        "Protocols/DataRecord.swift",
        "Protocols/ModelRepresentable.swift",
        "Protocols/RecordFromModel.swift",
        "Protocols/RecordToModel.swift",
        "Protocols/SyncRecord.swift",
        "SortColumn.swift",
        "SortInfo.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Done.