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 main (7de3f7), with Swift 6.0 for macOS (SPM) on 3 Nov 2024 16:52:29 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.1.0.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.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/codeandtheory/ypersistence-ios.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/codeandtheory/ypersistence-ios
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
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 main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
  "identity": ".resolve-product-dependencies",
  "name": "resolve-dependencies",
  "url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "version": "unspecified",
  "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "dependencies": [
    {
      "identity": "ypersistence-ios",
      "name": "YPersistence",
      "url": "https://github.com/codeandtheory/ypersistence-ios.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/ypersistence-ios",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/codeandtheory/ypersistence-ios.git
[1/432] Fetching ypersistence-ios
Fetched https://github.com/codeandtheory/ypersistence-ios.git from cache (0.90s)
Creating working copy for https://github.com/codeandtheory/ypersistence-ios.git
Working copy of https://github.com/codeandtheory/ypersistence-ios.git resolved at main (7de3f7c)
warning: '.resolve-product-dependencies': dependency 'ypersistence-ios' is not used by any target
Found 0 product dependencies
========================================
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.1.0.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--7754E27361AE5C74.txt
[3/20] Compiling YPersistence SortColumn.swift
[4/21] Compiling YPersistence SortInfo.swift
[5/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
[6/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
[7/21] Compiling YPersistence PersistenceManager+Fetch.swift
[8/21] Compiling YPersistence PersistenceManager+Save.swift
[9/21] Compiling YPersistence PersistenceManager+Clear.swift
[10/21] Compiling YPersistence PersistenceManager+Delete.swift
[11/21] Compiling YPersistence ModelRepresentable.swift
[12/21] Compiling YPersistence RecordFromModel.swift
[13/21] Compiling YPersistence CoreModel.swift
[14/21] Compiling YPersistence DataRecord.swift
[15/21] Compiling YPersistence RecordToModel.swift
[16/21] Compiling YPersistence SyncRecord.swift
[17/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 |     }
[18/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 |     }
[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 NSManagedObjectModel+init.swift
[21/21] Compiling YPersistence PersistenceManager+BulkDelete.swift
Build complete! (14.99s)
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.