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 DeviceHardware, reference main (30cbf1), with Swift 6.0 for macOS (SPM) on 2 Dec 2024 14:04:30 UTC.

Swift 6 data race errors: 2

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 -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.58.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Shakshi3104/DeviceHardware.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Shakshi3104/DeviceHardware
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 30cbf1d Merge pull request #39 from Shakshi3104/support_m4_mac
Cloned https://github.com/Shakshi3104/DeviceHardware.git
Revision (git rev-parse @):
30cbf1ddfef702b5d14dd3beeb26ac924140fdd5
SUCCESS checkout https://github.com/Shakshi3104/DeviceHardware.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": "devicehardware",
      "name": "DeviceHardware",
      "url": "https://github.com/Shakshi3104/DeviceHardware.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/DeviceHardware",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/Shakshi3104/DeviceHardware.git
[1/449] Fetching devicehardware
Fetched https://github.com/Shakshi3104/DeviceHardware.git from cache (0.76s)
Creating working copy for https://github.com/Shakshi3104/DeviceHardware.git
Working copy of https://github.com/Shakshi3104/DeviceHardware.git resolved at main (30cbf1d)
warning: '.resolve-product-dependencies': dependency 'devicehardware' 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/Shakshi3104/DeviceHardware.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "DeviceHardware",
  "name" : "DeviceHardware",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "12.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "DeviceHardware",
      "targets" : [
        "DeviceHardware"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "DeviceHardwareTests",
      "module_type" : "SwiftTarget",
      "name" : "DeviceHardwareTests",
      "path" : "Tests/DeviceHardwareTests",
      "sources" : [
        "DeviceHardwareTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "DeviceHardware"
      ],
      "type" : "test"
    },
    {
      "c99name" : "DeviceHardware",
      "module_type" : "SwiftTarget",
      "name" : "DeviceHardware",
      "path" : "Sources/DeviceHardware",
      "product_memberships" : [
        "DeviceHardware"
      ],
      "sources" : [
        "DeviceHardware.swift",
        "MacDeviceHardware.swift",
        "UIDeviceHardware.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
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 -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--7754E27361AE5C74.txt
[3/6] Compiling DeviceHardware UIDeviceHardware.swift
/Users/admin/builder/spi-builder-workspace/Sources/DeviceHardware/UIDeviceHardware.swift:4:23: warning: static property 'deviceHardware' is not concurrency-safe because non-'Sendable' type 'UIDeviceHardware' may have shared mutable state; this is an error in the Swift 6 language mode
   1 | import Foundation
   2 |
   3 | public class UIDeviceHardware: DeviceHardware {
     |              `- note: class 'UIDeviceHardware' does not conform to the 'Sendable' protocol
   4 |     public static let deviceHardware = UIDeviceHardware()
     |                       |- warning: static property 'deviceHardware' is not concurrency-safe because non-'Sendable' type 'UIDeviceHardware' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: annotate 'deviceHardware' 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
   5 |
   6 |     /// model name, such as iPhone 8
[4/6] Compiling DeviceHardware MacDeviceHardware.swift
/Users/admin/builder/spi-builder-workspace/Sources/DeviceHardware/MacDeviceHardware.swift:4:23: warning: static property 'deviceHardware' is not concurrency-safe because non-'Sendable' type 'MacDeviceHardware' may have shared mutable state; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | public class MacDeviceHardware: DeviceHardware {
    |              `- note: class 'MacDeviceHardware' does not conform to the 'Sendable' protocol
  4 |     public static let deviceHardware = MacDeviceHardware()
    |                       |- warning: static property 'deviceHardware' is not concurrency-safe because non-'Sendable' type 'MacDeviceHardware' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'deviceHardware' 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
  5 |
  6 |     /// model name, such as MacBook Air (Retina, 13-inch, 2020)
[5/6] Emitting module DeviceHardware
/Users/admin/builder/spi-builder-workspace/Sources/DeviceHardware/MacDeviceHardware.swift:4:23: warning: static property 'deviceHardware' is not concurrency-safe because non-'Sendable' type 'MacDeviceHardware' may have shared mutable state; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | public class MacDeviceHardware: DeviceHardware {
    |              `- note: class 'MacDeviceHardware' does not conform to the 'Sendable' protocol
  4 |     public static let deviceHardware = MacDeviceHardware()
    |                       |- warning: static property 'deviceHardware' is not concurrency-safe because non-'Sendable' type 'MacDeviceHardware' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'deviceHardware' 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
  5 |
  6 |     /// model name, such as MacBook Air (Retina, 13-inch, 2020)
/Users/admin/builder/spi-builder-workspace/Sources/DeviceHardware/UIDeviceHardware.swift:4:23: warning: static property 'deviceHardware' is not concurrency-safe because non-'Sendable' type 'UIDeviceHardware' may have shared mutable state; this is an error in the Swift 6 language mode
   1 | import Foundation
   2 |
   3 | public class UIDeviceHardware: DeviceHardware {
     |              `- note: class 'UIDeviceHardware' does not conform to the 'Sendable' protocol
   4 |     public static let deviceHardware = UIDeviceHardware()
     |                       |- warning: static property 'deviceHardware' is not concurrency-safe because non-'Sendable' type 'UIDeviceHardware' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: annotate 'deviceHardware' 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
   5 |
   6 |     /// model name, such as iPhone 8
[6/6] Compiling DeviceHardware DeviceHardware.swift
Build complete! (6.76s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "DeviceHardware",
  "name" : "DeviceHardware",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "12.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "DeviceHardware",
      "targets" : [
        "DeviceHardware"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "DeviceHardwareTests",
      "module_type" : "SwiftTarget",
      "name" : "DeviceHardwareTests",
      "path" : "Tests/DeviceHardwareTests",
      "sources" : [
        "DeviceHardwareTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "DeviceHardware"
      ],
      "type" : "test"
    },
    {
      "c99name" : "DeviceHardware",
      "module_type" : "SwiftTarget",
      "name" : "DeviceHardware",
      "path" : "Sources/DeviceHardware",
      "product_memberships" : [
        "DeviceHardware"
      ],
      "sources" : [
        "DeviceHardware.swift",
        "MacDeviceHardware.swift",
        "UIDeviceHardware.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Done.