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 SwiftEventBus, reference master (a30ff3), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 08:23:56 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures

Build Log

========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/cesarferreira/SwiftEventBus.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/cesarferreira/SwiftEventBus
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at a30ff35 bumped to 5.1.0
Cloned https://github.com/cesarferreira/SwiftEventBus.git
Revision (git rev-parse @):
a30ff35e616f507d8a8d122dac32a2150371a87e
SUCCESS checkout https://github.com/cesarferreira/SwiftEventBus.git at master
========================================
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": "swifteventbus",
      "name": "SwiftEventBus",
      "url": "https://github.com/cesarferreira/SwiftEventBus.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/SwiftEventBus",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/cesarferreira/SwiftEventBus.git
[1/548] Fetching swifteventbus
Fetched https://github.com/cesarferreira/SwiftEventBus.git from cache (0.78s)
Creating working copy for https://github.com/cesarferreira/SwiftEventBus.git
Working copy of https://github.com/cesarferreira/SwiftEventBus.git resolved at master (a30ff35)
warning: '.resolve-product-dependencies': dependency 'swifteventbus' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/cesarferreira/SwiftEventBus.git
https://github.com/cesarferreira/SwiftEventBus.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftEventBus",
  "name" : "SwiftEventBus",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.10"
    },
    {
      "name" : "ios",
      "version" : "10.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftEventBus",
      "targets" : [
        "SwiftEventBus"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "SwiftEventBus",
      "module_type" : "SwiftTarget",
      "name" : "SwiftEventBus",
      "path" : "SwiftEventBus",
      "product_memberships" : [
        "SwiftEventBus"
      ],
      "sources" : [
        "SwiftEventBus.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/4] Emitting module SwiftEventBus
/Users/admin/builder/spi-builder-workspace/SwiftEventBus/SwiftEventBus.swift:6:20: warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'SwiftEventBus' may have shared mutable state; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | open class SwiftEventBus {
    |            `- note: class 'SwiftEventBus' does not conform to the 'Sendable' protocol
  4 |
  5 |     struct Static {
  6 |         static let instance = SwiftEventBus()
    |                    |- warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'SwiftEventBus' may have shared mutable state; this is an error in the Swift 6 language mode
    |                    |- note: add '@MainActor' to make static property 'instance' part of global actor 'MainActor'
    |                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  7 |         static let queue = DispatchQueue(label: "com.cesarferreira.SwiftEventBus", attributes: [])
  8 |     }
[4/4] Compiling SwiftEventBus SwiftEventBus.swift
/Users/admin/builder/spi-builder-workspace/SwiftEventBus/SwiftEventBus.swift:6:20: warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'SwiftEventBus' may have shared mutable state; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | open class SwiftEventBus {
    |            `- note: class 'SwiftEventBus' does not conform to the 'Sendable' protocol
  4 |
  5 |     struct Static {
  6 |         static let instance = SwiftEventBus()
    |                    |- warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'SwiftEventBus' may have shared mutable state; this is an error in the Swift 6 language mode
    |                    |- note: add '@MainActor' to make static property 'instance' part of global actor 'MainActor'
    |                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  7 |         static let queue = DispatchQueue(label: "com.cesarferreira.SwiftEventBus", attributes: [])
  8 |     }
/Users/admin/builder/spi-builder-workspace/SwiftEventBus/SwiftEventBus.swift:62:146: warning: passing non-sendable parameter 'handler' to function expecting a @Sendable closure
 58 |
 59 |     @discardableResult
 60 |     open class func on(_ target: AnyObject, name: String, sender: Any? = nil, queue: OperationQueue?, handler: @escaping ((Notification?) -> Void)) -> NSObjectProtocol {
    |                                                                                                       `- note: parameter 'handler' is implicitly non-sendable
 61 |         let id = UInt(bitPattern: ObjectIdentifier(target))
 62 |         let observer = NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: name), object: sender, queue: queue, using: handler)
    |                                                                                                                                                  `- warning: passing non-sendable parameter 'handler' to function expecting a @Sendable closure
 63 |         let namedObserver = NamedObserver(observer: observer, name: name)
 64 |
/Users/admin/builder/spi-builder-workspace/SwiftEventBus/SwiftEventBus.swift:37:94: warning: sending 'sender' risks causing data races; this is an error in the Swift 6 language mode
 35 |     open class func postToMainThread(_ name: String, sender: Any? = nil) {
 36 |         DispatchQueue.main.async {
 37 |             NotificationCenter.default.post(name: Notification.Name(rawValue: name), object: sender)
    |                                                                                              |- warning: sending 'sender' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                                              `- note: task-isolated 'sender' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 38 |         }
 39 |     }
/Users/admin/builder/spi-builder-workspace/SwiftEventBus/SwiftEventBus.swift:43:94: warning: sending 'sender' risks causing data races; this is an error in the Swift 6 language mode
 41 |     open class func postToMainThread(_ name: String, sender: NSObject?) {
 42 |         DispatchQueue.main.async {
 43 |             NotificationCenter.default.post(name: Notification.Name(rawValue: name), object: sender)
    |                                                                                              |- warning: sending 'sender' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                                              `- note: task-isolated 'sender' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 44 |         }
 45 |     }
/Users/admin/builder/spi-builder-workspace/SwiftEventBus/SwiftEventBus.swift:49:94: warning: sending 'sender' risks causing data races; this is an error in the Swift 6 language mode
 47 |     open class func postToMainThread(_ name: String, sender: Any? = nil, userInfo: [AnyHashable: Any]?) {
 48 |         DispatchQueue.main.async {
 49 |             NotificationCenter.default.post(name: Notification.Name(rawValue: name), object: sender, userInfo: userInfo)
    |                                                                                              |- warning: sending 'sender' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                                              `- note: task-isolated 'sender' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 50 |         }
 51 |     }
/Users/admin/builder/spi-builder-workspace/SwiftEventBus/SwiftEventBus.swift:49:112: warning: sending 'userInfo' risks causing data races; this is an error in the Swift 6 language mode
 47 |     open class func postToMainThread(_ name: String, sender: Any? = nil, userInfo: [AnyHashable: Any]?) {
 48 |         DispatchQueue.main.async {
 49 |             NotificationCenter.default.post(name: Notification.Name(rawValue: name), object: sender, userInfo: userInfo)
    |                                                                                                                |- warning: sending 'userInfo' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                                                                `- note: task-isolated 'userInfo' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 50 |         }
 51 |     }
Build complete! (4.03s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftEventBus",
  "name" : "SwiftEventBus",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.10"
    },
    {
      "name" : "ios",
      "version" : "10.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftEventBus",
      "targets" : [
        "SwiftEventBus"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "SwiftEventBus",
      "module_type" : "SwiftTarget",
      "name" : "SwiftEventBus",
      "path" : "SwiftEventBus",
      "product_memberships" : [
        "SwiftEventBus"
      ],
      "sources" : [
        "SwiftEventBus.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Done.