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 KVObserver, reference 0.9.5 (6b6252), with Swift 6.0 for macOS (SPM) on 3 Nov 2024 21:37:49 UTC.

Swift 6 data race errors: 0

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/Frizlab/KVObserver.git
Reference: 0.9.5
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Frizlab/KVObserver
 * tag               0.9.5      -> FETCH_HEAD
HEAD is now at 6b62524 Fix Xcode 12 warnings
Cloned https://github.com/Frizlab/KVObserver.git
Revision (git rev-parse @):
6b6252489a2b1cdb67857576962676b6cb6c679a
SUCCESS checkout https://github.com/Frizlab/KVObserver.git at 0.9.5
========================================
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": "kvobserver",
      "name": "KVObserver",
      "url": "https://github.com/Frizlab/KVObserver.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/KVObserver",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/Frizlab/KVObserver.git
[1/247] Fetching kvobserver
Fetched https://github.com/Frizlab/KVObserver.git from cache (0.79s)
Creating working copy for https://github.com/Frizlab/KVObserver.git
Working copy of https://github.com/Frizlab/KVObserver.git resolved at 0.9.5 (6b62524)
warning: '.resolve-product-dependencies': dependency 'kvobserver' 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/Frizlab/KVObserver.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/4] Compiling KVObserver KVObserver.swift
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:212:76: warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
162 | 	 * contexts are the same. If any of the observed objects has been deallocated
163 | 	 * the contexts are considered different. */
164 | 	private final class KVOContext : Equatable {
    |                      `- note: class 'KVOContext' does not conform to the 'Sendable' protocol
165 |
166 | 		static func ==(lhs: KVObserver.KVOContext, rhs: KVObserver.KVOContext) -> Bool {
    :
210 |
211 | 			case (.unsafeSync(let queue),  _):                         queue.sync{  self.handler(change) }
212 | 			case (.async(let queue), _):                               queue.async{ self.handler(change) }
    |                                                                            `- warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:212:89: warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
210 |
211 | 			case (.unsafeSync(let queue),  _):                         queue.sync{  self.handler(change) }
212 | 			case (.async(let queue), _):                               queue.async{ self.handler(change) }
    |                                                                                         `- warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:213:76: warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
162 | 	 * contexts are the same. If any of the observed objects has been deallocated
163 | 	 * the contexts are considered different. */
164 | 	private final class KVOContext : Equatable {
    |                      `- note: class 'KVOContext' does not conform to the 'Sendable' protocol
165 |
166 | 		static func ==(lhs: KVObserver.KVOContext, rhs: KVObserver.KVOContext) -> Bool {
    :
211 | 			case (.unsafeSync(let queue),  _):                         queue.sync{  self.handler(change) }
212 | 			case (.async(let queue), _):                               queue.async{ self.handler(change) }
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
    |                                                                            `- warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:213:89: warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
211 | 			case (.unsafeSync(let queue),  _):                         queue.sync{  self.handler(change) }
212 | 			case (.async(let queue), _):                               queue.async{ self.handler(change) }
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
    |                                                                                         `- warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:214:76: warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
162 | 	 * contexts are the same. If any of the observed objects has been deallocated
163 | 	 * the contexts are considered different. */
164 | 	private final class KVOContext : Equatable {
    |                      `- note: class 'KVOContext' does not conform to the 'Sendable' protocol
165 |
166 | 		static func ==(lhs: KVObserver.KVOContext, rhs: KVObserver.KVOContext) -> Bool {
    :
212 | 			case (.async(let queue), _):                               queue.async{ self.handler(change) }
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
    |                                                                            `- warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
216 | 			case (.directOrAsyncOnMainQueue, _):
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:214:89: warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
212 | 			case (.async(let queue), _):                               queue.async{ self.handler(change) }
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
    |                                                                                         `- warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
216 | 			case (.directOrAsyncOnMainQueue, _):
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:215:76: warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
162 | 	 * contexts are the same. If any of the observed objects has been deallocated
163 | 	 * the contexts are considered different. */
164 | 	private final class KVOContext : Equatable {
    |                      `- note: class 'KVOContext' does not conform to the 'Sendable' protocol
165 |
166 | 		static func ==(lhs: KVObserver.KVOContext, rhs: KVObserver.KVOContext) -> Bool {
    :
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
    |                                                                            `- warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
216 | 			case (.directOrAsyncOnMainQueue, _):
217 | 				if Thread.isMainThread {handler(change)}
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:215:89: warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
    |                                                                                         `- warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
216 | 			case (.directOrAsyncOnMainQueue, _):
217 | 				if Thread.isMainThread {handler(change)}
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:218:57: warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
162 | 	 * contexts are the same. If any of the observed objects has been deallocated
163 | 	 * the contexts are considered different. */
164 | 	private final class KVOContext : Equatable {
    |                      `- note: class 'KVOContext' does not conform to the 'Sendable' protocol
165 |
166 | 		static func ==(lhs: KVObserver.KVOContext, rhs: KVObserver.KVOContext) -> Bool {
    :
216 | 			case (.directOrAsyncOnMainQueue, _):
217 | 				if Thread.isMainThread {handler(change)}
218 | 			   else                   {DispatchQueue.main.async{ self.handler(change) }}
    |                                                         `- warning: capture of 'self' with non-sendable type 'KVObserver.KVOContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
219 |
220 | 			case (.coreDataSync(let context), _):                   context.performAndWait{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:218:70: warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
216 | 			case (.directOrAsyncOnMainQueue, _):
217 | 				if Thread.isMainThread {handler(change)}
218 | 			   else                   {DispatchQueue.main.async{ self.handler(change) }}
    |                                                                      `- warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
219 |
220 | 			case (.coreDataSync(let context), _):                   context.performAndWait{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:215:76: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
    |                                                                            |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                            `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
216 | 			case (.directOrAsyncOnMainQueue, _):
217 | 				if Thread.isMainThread {handler(change)}
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:215:89: warning: sending 'change' risks causing data races; this is an error in the Swift 6 language mode
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
    |                                                                                         |- warning: sending 'change' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                                         `- note: task-isolated 'change' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
216 | 			case (.directOrAsyncOnMainQueue, _):
217 | 				if Thread.isMainThread {handler(change)}
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:213:76: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
211 | 			case (.unsafeSync(let queue),  _):                         queue.sync{  self.handler(change) }
212 | 			case (.async(let queue), _):                               queue.async{ self.handler(change) }
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
    |                                                                            |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                            `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:213:89: warning: sending 'change' risks causing data races; this is an error in the Swift 6 language mode
211 | 			case (.unsafeSync(let queue),  _):                         queue.sync{  self.handler(change) }
212 | 			case (.async(let queue), _):                               queue.async{ self.handler(change) }
213 | 			case (.asyncOnMainQueue, _):                  DispatchQueue.main.async{ self.handler(change) }
    |                                                                                         |- warning: sending 'change' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                                         `- note: task-isolated 'change' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
214 | 			case (.asyncDirectInitial(let queue), false):              queue.async{ self.handler(change) }
215 | 			case (.asyncOnMainQueueDirectInitial, false): DispatchQueue.main.async{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:218:57: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
216 | 			case (.directOrAsyncOnMainQueue, _):
217 | 				if Thread.isMainThread {handler(change)}
218 | 			   else                   {DispatchQueue.main.async{ self.handler(change) }}
    |                                                         |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                                                         `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
219 |
220 | 			case (.coreDataSync(let context), _):                   context.performAndWait{ self.handler(change) }
/Users/admin/builder/spi-builder-workspace/Sources/KVObserver/KVObserver.swift:218:70: warning: sending 'change' risks causing data races; this is an error in the Swift 6 language mode
216 | 			case (.directOrAsyncOnMainQueue, _):
217 | 				if Thread.isMainThread {handler(change)}
218 | 			   else                   {DispatchQueue.main.async{ self.handler(change) }}
    |                                                                      |- warning: sending 'change' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                      `- note: task-isolated 'change' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
219 |
220 | 			case (.coreDataSync(let context), _):                   context.performAndWait{ self.handler(change) }
[4/4] Emitting module KVObserver
Build complete! (6.45s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "KVObserver",
  "name" : "KVObserver",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "KVObserver",
      "targets" : [
        "KVObserver"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "KVObserverTests",
      "module_type" : "SwiftTarget",
      "name" : "KVObserverTests",
      "path" : "Tests/KVObserverTests",
      "sources" : [
        "Helpers/AutoObservedNSManagedObject.swift",
        "Helpers/AutoObservedObject.swift",
        "Helpers/ObservedObject.swift",
        "KVObserverTests.swift"
      ],
      "target_dependencies" : [
        "KVObserver"
      ],
      "type" : "test"
    },
    {
      "c99name" : "KVObserver",
      "module_type" : "SwiftTarget",
      "name" : "KVObserver",
      "path" : "Sources/KVObserver",
      "product_memberships" : [
        "KVObserver"
      ],
      "sources" : [
        "KVObserver.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.