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 SwiftyReachability, reference master (cc8169), with Swift 6.0 for macOS (SPM) on 2 Nov 2024 19:15:06 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/antonio-war/SwiftyReachability.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/antonio-war/SwiftyReachability
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at cc8169a Create FUNDING.yml
Cloned https://github.com/antonio-war/SwiftyReachability.git
Revision (git rev-parse @):
cc8169a782734324ab1ac4922cc45590aea94830
SUCCESS checkout https://github.com/antonio-war/SwiftyReachability.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": "swiftyreachability",
      "name": "SwiftyReachability",
      "url": "https://github.com/antonio-war/SwiftyReachability.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/SwiftyReachability",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/antonio-war/SwiftyReachability.git
[1/250] Fetching swiftyreachability
Fetched https://github.com/antonio-war/SwiftyReachability.git from cache (0.73s)
Creating working copy for https://github.com/antonio-war/SwiftyReachability.git
Working copy of https://github.com/antonio-war/SwiftyReachability.git resolved at master (cc8169a)
warning: '.resolve-product-dependencies': dependency 'swiftyreachability' 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/antonio-war/SwiftyReachability.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/9] Compiling SwiftyReachability SwiftyReachabilityObserverUI.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/Observers/SwiftyReachabilityObserverUI.swift:45:17: warning: capture of 'self' with non-sendable type 'SwiftyReachabilityObserverUI.HiddenObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
26 |     }
27 |
28 |     class HiddenObserver : SwiftyReachabilityObserver {
   |           `- note: class 'HiddenObserver' does not conform to the 'Sendable' protocol
29 |         weak var externalObserver: SwiftyReachabilityObserverUI?
30 |
   :
43 |         public func didChangeConnectionStatus(_ status: SwiftyConnectionStatus) {
44 |             DispatchQueue.main.async {
45 |                 self.externalObserver?.connectionStatus = status
   |                 `- warning: capture of 'self' with non-sendable type 'SwiftyReachabilityObserverUI.HiddenObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 |             }
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/Observers/SwiftyReachabilityObserverUI.swift:45:59: warning: capture of 'status' with non-sendable type 'SwiftyConnectionStatus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
43 |         public func didChangeConnectionStatus(_ status: SwiftyConnectionStatus) {
44 |             DispatchQueue.main.async {
45 |                 self.externalObserver?.connectionStatus = status
   |                                                           `- warning: capture of 'status' with non-sendable type 'SwiftyConnectionStatus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 |             }
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/ConnectionProperties/SwiftyConnectionStatus.swift:10:13: note: consider making enum 'SwiftyConnectionStatus' conform to the 'Sendable' protocol
 8 | import Foundation
 9 |
10 | public enum SwiftyConnectionStatus {
   |             `- note: consider making enum 'SwiftyConnectionStatus' conform to the 'Sendable' protocol
11 |     case online
12 |     case offline
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/Observers/SwiftyReachabilityObserverUI.swift:51:17: warning: capture of 'self' with non-sendable type 'SwiftyReachabilityObserverUI.HiddenObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
26 |     }
27 |
28 |     class HiddenObserver : SwiftyReachabilityObserver {
   |           `- note: class 'HiddenObserver' does not conform to the 'Sendable' protocol
29 |         weak var externalObserver: SwiftyReachabilityObserverUI?
30 |
   :
49 |         public func didChangeConnectionType(_ type: SwiftyConnectionType?) {
50 |             DispatchQueue.main.async {
51 |                 self.externalObserver?.connectionType = type
   |                 `- warning: capture of 'self' with non-sendable type 'SwiftyReachabilityObserverUI.HiddenObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
52 |             }
53 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/Observers/SwiftyReachabilityObserverUI.swift:51:57: warning: capture of 'type' with non-sendable type 'SwiftyConnectionType?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 |         public func didChangeConnectionType(_ type: SwiftyConnectionType?) {
50 |             DispatchQueue.main.async {
51 |                 self.externalObserver?.connectionType = type
   |                                                         `- warning: capture of 'type' with non-sendable type 'SwiftyConnectionType?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
52 |             }
53 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/ConnectionProperties/SwiftyConnectionType.swift:10:13: note: consider making enum 'SwiftyConnectionType' conform to the 'Sendable' protocol
 8 | import Foundation
 9 |
10 | public enum SwiftyConnectionType : Equatable, CustomStringConvertible {
   |             `- note: consider making enum 'SwiftyConnectionType' conform to the 'Sendable' protocol
11 |     case cellular(radioType: SwiftyRadioType)
12 |     case wifi
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/Observers/SwiftyReachabilityObserverUI.swift:45:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
43 |         public func didChangeConnectionStatus(_ status: SwiftyConnectionStatus) {
44 |             DispatchQueue.main.async {
45 |                 self.externalObserver?.connectionStatus = status
   |                 |- 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
46 |             }
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/Observers/SwiftyReachabilityObserverUI.swift:45:59: warning: sending 'status' risks causing data races; this is an error in the Swift 6 language mode
43 |         public func didChangeConnectionStatus(_ status: SwiftyConnectionStatus) {
44 |             DispatchQueue.main.async {
45 |                 self.externalObserver?.connectionStatus = status
   |                                                           |- warning: sending 'status' risks causing data races; this is an error in the Swift 6 language mode
   |                                                           `- note: task-isolated 'status' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
46 |             }
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/Observers/SwiftyReachabilityObserverUI.swift:51:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
49 |         public func didChangeConnectionType(_ type: SwiftyConnectionType?) {
50 |             DispatchQueue.main.async {
51 |                 self.externalObserver?.connectionType = type
   |                 |- 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
52 |             }
53 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/Observers/SwiftyReachabilityObserverUI.swift:51:57: warning: sending 'type' risks causing data races; this is an error in the Swift 6 language mode
49 |         public func didChangeConnectionType(_ type: SwiftyConnectionType?) {
50 |             DispatchQueue.main.async {
51 |                 self.externalObserver?.connectionType = type
   |                                                         |- warning: sending 'type' risks causing data races; this is an error in the Swift 6 language mode
   |                                                         `- note: task-isolated 'type' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
52 |             }
53 |         }
[4/9] Compiling SwiftyReachability SwiftyConnectionStatus.swift
[5/9] Emitting module SwiftyReachability
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/SwiftyReachability.swift:15:23: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 13 | public class SwiftyReachability {
 14 |
 15 |     public static var shared : SwiftyReachability = SwiftyReachability()
    |                       |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- 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
 16 |
 17 |     private let monitor : NWPathMonitor
[6/9] Compiling SwiftyReachability SwiftyReachability.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/SwiftyReachability.swift:15:23: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 13 | public class SwiftyReachability {
 14 |
 15 |     public static var shared : SwiftyReachability = SwiftyReachability()
    |                       |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- 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
 16 |
 17 |     private let monitor : NWPathMonitor
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/SwiftyReachability.swift:46:13: warning: capture of 'self' with non-sendable type 'SwiftyReachability' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | #endif
 12 |
 13 | public class SwiftyReachability {
    |              `- note: class 'SwiftyReachability' does not conform to the 'Sendable' protocol
 14 |
 15 |     public static var shared : SwiftyReachability = SwiftyReachability()
    :
 44 |
 45 |         monitor.pathUpdateHandler = { path in
 46 |             self.setConnection(path: path)
    |             `- warning: capture of 'self' with non-sendable type 'SwiftyReachability' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 47 |         }
 48 |
[7/9] Compiling SwiftyReachability SwiftyRadioType.swift
[8/9] Compiling SwiftyReachability SwiftyReachabilityObserver.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftyReachability/SwiftyReachability.swift:15:23: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 13 | public class SwiftyReachability {
 14 |
 15 |     public static var shared : SwiftyReachability = SwiftyReachability()
    |                       |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- 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
 16 |
 17 |     private let monitor : NWPathMonitor
[9/9] Compiling SwiftyReachability SwiftyConnectionType.swift
Build complete! (7.62s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftyReachability",
  "name" : "SwiftyReachability",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "12.0"
    },
    {
      "name" : "macos",
      "version" : "10.14"
    },
    {
      "name" : "watchos",
      "version" : "5.0"
    },
    {
      "name" : "tvos",
      "version" : "12.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftyReachability",
      "targets" : [
        "SwiftyReachability"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftyReachability",
      "module_type" : "SwiftTarget",
      "name" : "SwiftyReachability",
      "path" : "Sources/SwiftyReachability",
      "product_memberships" : [
        "SwiftyReachability"
      ],
      "sources" : [
        "ConnectionProperties/SwiftyConnectionStatus.swift",
        "ConnectionProperties/SwiftyConnectionType.swift",
        "ConnectionProperties/SwiftyRadioType.swift",
        "Observers/SwiftyReachabilityObserver.swift",
        "Observers/SwiftyReachabilityObserverUI.swift",
        "SwiftyReachability.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.