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 Zephyr, reference master (6a17bc), with Swift 6.0 for macOS (SPM) on 4 Nov 2024 13:25:38 UTC.

Swift 6 data race errors: 3

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/ArtSabintsev/Zephyr.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/ArtSabintsev/Zephyr
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 6a17bcf Bump rexml from 3.2.5 to 3.2.8 (#69)
Cloned https://github.com/ArtSabintsev/Zephyr.git
Revision (git rev-parse @):
6a17bcfec8a650cc8ac3610ef2aed65fd509a945
SUCCESS checkout https://github.com/ArtSabintsev/Zephyr.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": "zephyr",
      "name": "Zephyr",
      "url": "https://github.com/ArtSabintsev/Zephyr.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Zephyr",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/ArtSabintsev/Zephyr.git
[1/5094] Fetching zephyr
Fetched https://github.com/ArtSabintsev/Zephyr.git from cache (12.93s)
Creating working copy for https://github.com/ArtSabintsev/Zephyr.git
Working copy of https://github.com/ArtSabintsev/Zephyr.git resolved at master (6a17bcf)
warning: '.resolve-product-dependencies': dependency 'zephyr' 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/ArtSabintsev/Zephyr.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] Emitting module Zephyr
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:29:23: warning: static property 'debugEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 27 |     ///
 28 |     /// By default, this flag is set to **false**.
 29 |     public static var debugEnabled = false
    |                       |- warning: static property 'debugEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'debugEnabled' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'debugEnabled' with '@MainActor' if property should only be accessed from the main actor
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 30 |
 31 |     /// If **true**, then `NSUbiquitousKeyValueStore.synchronize()` will be called immediately after any change is made.
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:32:23: warning: static property 'syncUbiquitousKeyValueStoreOnChange' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 30 |
 31 |     /// If **true**, then `NSUbiquitousKeyValueStore.synchronize()` will be called immediately after any change is made.
 32 |     public static var syncUbiquitousKeyValueStoreOnChange = true
    |                       |- warning: static property 'syncUbiquitousKeyValueStoreOnChange' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'syncUbiquitousKeyValueStoreOnChange' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'syncUbiquitousKeyValueStoreOnChange' with '@MainActor' if property should only be accessed from the main actor
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 33 |
 34 |     /// A string containing the notification name that will be posted when Zephyr receives updated data from iCloud.
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:38:24: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Zephyr' may have shared mutable state; this is an error in the Swift 6 language mode
 21 |
 22 | @objcMembers
 23 | public final class Zephyr: NSObject {
    |                    `- note: class 'Zephyr' does not conform to the 'Sendable' protocol
 24 |     /// A debug flag.
 25 |     ///
    :
 36 |
 37 |     /// The singleton for Zephyr.
 38 |     private static let shared = Zephyr()
    |                        |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Zephyr' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 39 |
 40 |     /// A shared key that stores the last synchronization date between `UserDefaults` and `NSUbiquitousKeyValueStore`.
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:285:3: warning: 'public' modifier conflicts with extension's default access of 'private'
283 |   /// - Parameters:
284 |   ///     - to: A `UserDefaults` suite.
285 |   public static func setUserDefaultsSuite(to suite: UserDefaults) {
    |   `- warning: 'public' modifier conflicts with extension's default access of 'private'
286 |       shared.userDefaults = suite
287 |       printStatus(status: "Updated UserDefaults suite.")
[4/4] Compiling Zephyr Zephyr.swift
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:29:23: warning: static property 'debugEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 27 |     ///
 28 |     /// By default, this flag is set to **false**.
 29 |     public static var debugEnabled = false
    |                       |- warning: static property 'debugEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'debugEnabled' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'debugEnabled' with '@MainActor' if property should only be accessed from the main actor
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 30 |
 31 |     /// If **true**, then `NSUbiquitousKeyValueStore.synchronize()` will be called immediately after any change is made.
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:32:23: warning: static property 'syncUbiquitousKeyValueStoreOnChange' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 30 |
 31 |     /// If **true**, then `NSUbiquitousKeyValueStore.synchronize()` will be called immediately after any change is made.
 32 |     public static var syncUbiquitousKeyValueStoreOnChange = true
    |                       |- warning: static property 'syncUbiquitousKeyValueStoreOnChange' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'syncUbiquitousKeyValueStoreOnChange' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'syncUbiquitousKeyValueStoreOnChange' with '@MainActor' if property should only be accessed from the main actor
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 33 |
 34 |     /// A string containing the notification name that will be posted when Zephyr receives updated data from iCloud.
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:38:24: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Zephyr' may have shared mutable state; this is an error in the Swift 6 language mode
 21 |
 22 | @objcMembers
 23 | public final class Zephyr: NSObject {
    |                    `- note: class 'Zephyr' does not conform to the 'Sendable' protocol
 24 |     /// A debug flag.
 25 |     ///
    :
 36 |
 37 |     /// The singleton for Zephyr.
 38 |     private static let shared = Zephyr()
    |                        |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Zephyr' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 39 |
 40 |     /// A shared key that stores the last synchronization date between `UserDefaults` and `NSUbiquitousKeyValueStore`.
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:285:3: warning: 'public' modifier conflicts with extension's default access of 'private'
283 |   /// - Parameters:
284 |   ///     - to: A `UserDefaults` suite.
285 |   public static func setUserDefaultsSuite(to suite: UserDefaults) {
    |   `- warning: 'public' modifier conflicts with extension's default access of 'private'
286 |       shared.userDefaults = suite
287 |       printStatus(status: "Updated UserDefaults suite.")
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:371:44: warning: capture of 'defaults' with non-sendable type 'UserDefaults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
369 |             for (key, value) in zephyrRemoteStoreDictionary {
370 |                 unregisterObserver(key: key)
371 |                 DispatchQueue.main.async { defaults.set(value, forKey: key) }
    |                                            `- warning: capture of 'defaults' with non-sendable type 'UserDefaults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
372 |                 Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
373 |                 registerObserver(key: key)
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
  1 | open class UserDefaults : NSObject {
    |            `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
  2 |     open class var standard: UserDefaults { get }
  3 |     @available(swift, obsoleted: 3, renamed: "standard")
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:371:57: warning: capture of 'value' with non-sendable type 'Any' in a `@Sendable` closure; this is an error in the Swift 6 language mode
369 |             for (key, value) in zephyrRemoteStoreDictionary {
370 |                 unregisterObserver(key: key)
371 |                 DispatchQueue.main.async { defaults.set(value, forKey: key) }
    |                                                         `- warning: capture of 'value' with non-sendable type 'Any' in a `@Sendable` closure; this is an error in the Swift 6 language mode
372 |                 Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
373 |                 registerObserver(key: key)
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:382:40: warning: capture of 'defaults' with non-sendable type 'UserDefaults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
380 |
381 |         if let value = value {
382 |             DispatchQueue.main.async { defaults.set(value, forKey: key) }
    |                                        `- warning: capture of 'defaults' with non-sendable type 'UserDefaults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
383 |             Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
384 |         } else {
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
  1 | open class UserDefaults : NSObject {
    |            `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
  2 |     open class var standard: UserDefaults { get }
  3 |     @available(swift, obsoleted: 3, renamed: "standard")
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:382:53: warning: capture of 'value' with non-sendable type 'Any' in a `@Sendable` closure; this is an error in the Swift 6 language mode
380 |
381 |         if let value = value {
382 |             DispatchQueue.main.async { defaults.set(value, forKey: key) }
    |                                                     `- warning: capture of 'value' with non-sendable type 'Any' in a `@Sendable` closure; this is an error in the Swift 6 language mode
383 |             Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
384 |         } else {
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:385:40: warning: capture of 'defaults' with non-sendable type 'UserDefaults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
383 |             Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
384 |         } else {
385 |             DispatchQueue.main.async { defaults.set(nil, forKey: key) }
    |                                        `- warning: capture of 'defaults' with non-sendable type 'UserDefaults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
386 |             Zephyr.printKeySyncStatus(key: key, value: nil, destination: .local)
387 |         }
Foundation.UserDefaults:1:12: note: class 'UserDefaults' does not conform to the 'Sendable' protocol
  1 | open class UserDefaults : NSObject {
    |            `- note: class 'UserDefaults' does not conform to the 'Sendable' protocol
  2 |     open class var standard: UserDefaults { get }
  3 |     @available(swift, obsoleted: 3, renamed: "standard")
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:445:16: warning: capture of 'self' with non-sendable type 'Zephyr' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 21 |
 22 | @objcMembers
 23 | public final class Zephyr: NSObject {
    |                    `- note: class 'Zephyr' does not conform to the 'Sendable' protocol
 24 |     /// A debug flag.
 25 |     ///
    :
443 |         // Synchronize changes if key is monitored and if key is currently registered to respond to changes
444 |         zephyrQueue.async {
445 |             if self.registeredObservationKeys.contains(keyPath) {
    |                `- warning: capture of 'self' with non-sendable type 'Zephyr' in a `@Sendable` closure; this is an error in the Swift 6 language mode
446 |                 if object is UserDefaults {
447 |                     self.userDefaults.set(Date(), forKey: self.ZephyrSyncKey)
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:446:20: warning: capture of 'object' with non-sendable type 'Any' in a `@Sendable` closure; this is an error in the Swift 6 language mode
444 |         zephyrQueue.async {
445 |             if self.registeredObservationKeys.contains(keyPath) {
446 |                 if object is UserDefaults {
    |                    `- warning: capture of 'object' with non-sendable type 'Any' in a `@Sendable` closure; this is an error in the Swift 6 language mode
447 |                     self.userDefaults.set(Date(), forKey: self.ZephyrSyncKey)
448 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:382:40: warning: sending 'defaults' risks causing data races; this is an error in the Swift 6 language mode
380 |
381 |         if let value = value {
382 |             DispatchQueue.main.async { defaults.set(value, forKey: key) }
    |                                        |- warning: sending 'defaults' risks causing data races; this is an error in the Swift 6 language mode
    |                                        `- note: task-isolated 'defaults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
383 |             Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
384 |         } else {
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:382:53: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
380 |
381 |         if let value = value {
382 |             DispatchQueue.main.async { defaults.set(value, forKey: key) }
    |                                                     |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
    |                                                     `- note: task-isolated 'value' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
383 |             Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
384 |         } else {
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:385:40: warning: sending 'defaults' risks causing data races; this is an error in the Swift 6 language mode
383 |             Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
384 |         } else {
385 |             DispatchQueue.main.async { defaults.set(nil, forKey: key) }
    |                                        |- warning: sending 'defaults' risks causing data races; this is an error in the Swift 6 language mode
    |                                        `- note: task-isolated 'defaults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
386 |             Zephyr.printKeySyncStatus(key: key, value: nil, destination: .local)
387 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:371:44: warning: sending 'defaults' risks causing data races; this is an error in the Swift 6 language mode
369 |             for (key, value) in zephyrRemoteStoreDictionary {
370 |                 unregisterObserver(key: key)
371 |                 DispatchQueue.main.async { defaults.set(value, forKey: key) }
    |                                            |- warning: sending 'defaults' risks causing data races; this is an error in the Swift 6 language mode
    |                                            `- note: task-isolated 'defaults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
372 |                 Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
373 |                 registerObserver(key: key)
/Users/admin/builder/spi-builder-workspace/Sources/Zephyr.swift:371:57: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
369 |             for (key, value) in zephyrRemoteStoreDictionary {
370 |                 unregisterObserver(key: key)
371 |                 DispatchQueue.main.async { defaults.set(value, forKey: key) }
    |                                                         |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
    |                                                         `- note: task-isolated 'value' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
372 |                 Zephyr.printKeySyncStatus(key: key, value: value, destination: .local)
373 |                 registerObserver(key: key)
Build complete! (5.85s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Zephyr",
  "name" : "Zephyr",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "11.0"
    },
    {
      "name" : "watchos",
      "version" : "9.0"
    }
  ],
  "products" : [
    {
      "name" : "Zephyr",
      "targets" : [
        "Zephyr"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "Zephyr",
      "module_type" : "SwiftTarget",
      "name" : "Zephyr",
      "path" : "Sources",
      "product_memberships" : [
        "Zephyr"
      ],
      "sources" : [
        "Zephyr.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Done.