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 InputStepper, reference v1.0.0 (3fd771), with Swift 6.0 for macOS (SPM) on 2 Nov 2024 02:00:34 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/mateusz800/InputStepper.git
Reference: v1.0.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/mateusz800/InputStepper
 * tag               v1.0.0     -> FETCH_HEAD
HEAD is now at 3fd7719 Update Package.swift
Cloned https://github.com/mateusz800/InputStepper.git
Revision (git rev-parse @):
3fd77195ba6b0dca4a855d2b49ff62752671f61e
SUCCESS checkout https://github.com/mateusz800/InputStepper.git at v1.0.0
========================================
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": "inputstepper",
      "name": "InputStepper",
      "url": "https://github.com/mateusz800/InputStepper.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/InputStepper",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/mateusz800/InputStepper.git
[1/161] Fetching inputstepper
Fetched https://github.com/mateusz800/InputStepper.git from cache (0.66s)
Creating working copy for https://github.com/mateusz800/InputStepper.git
Working copy of https://github.com/mateusz800/InputStepper.git resolved at v1.0.0 (3fd7719)
warning: '.resolve-product-dependencies': dependency 'inputstepper' 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/mateusz800/InputStepper.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/12] Compiling InputStepper ValueStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/ValueStore.swift:41:21: warning: capture of 'self' with non-sendable type 'ValueStore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 9 | import SwiftUI
10 |
11 | class ValueStore: ObservableObject {
   |       `- note: class 'ValueStore' does not conform to the 'Sendable' protocol
12 |     let uuid = NSUUID().uuidString
13 |     @Published var value: Float = 0
   :
39 |             while !(self.increaseWork?.isCancelled ?? false) {
40 |                 DispatchQueue.main.async {
41 |                     self.value += self.step
   |                     `- warning: capture of 'self' with non-sendable type 'ValueStore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
42 |                 }
43 |                 Thread.sleep(forTimeInterval: 1 - self.speed)
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/ValueStore.swift:58:21: warning: capture of 'self' with non-sendable type 'ValueStore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 9 | import SwiftUI
10 |
11 | class ValueStore: ObservableObject {
   |       `- note: class 'ValueStore' does not conform to the 'Sendable' protocol
12 |     let uuid = NSUUID().uuidString
13 |     @Published var value: Float = 0
   :
56 |             while !(self.decreaseWork?.isCancelled ?? false) {
57 |                 DispatchQueue.main.async {
58 |                     self.value -= self.step
   |                     `- warning: capture of 'self' with non-sendable type 'ValueStore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
59 |                 }
60 |                 Thread.sleep(forTimeInterval: 1 - self.speed)
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/ValueStore.swift:41:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
39 |             while !(self.increaseWork?.isCancelled ?? false) {
40 |                 DispatchQueue.main.async {
41 |                     self.value += self.step
   |                     |- 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
42 |                 }
43 |                 Thread.sleep(forTimeInterval: 1 - self.speed)
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/ValueStore.swift:58:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
56 |             while !(self.decreaseWork?.isCancelled ?? false) {
57 |                 DispatchQueue.main.async {
58 |                     self.value -= self.step
   |                     |- 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
59 |                 }
60 |                 Thread.sleep(forTimeInterval: 1 - self.speed)
[4/12] Compiling InputStepper InputStepperValueStorage.swift
[5/12] Emitting module InputStepper
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/utils/Environment.swift:11:23: warning: static property 'value' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | private struct ValueStoreKey: EnvironmentKey {
11 |     @State static var value: Float = 0
   |                       |- warning: static property 'value' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'value' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'value' 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
12 |     static let defaultValue = ValueStore($value)
13 | }
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/utils/Environment.swift:12:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ValueStore' may have shared mutable state; this is an error in the Swift 6 language mode
10 | private struct ValueStoreKey: EnvironmentKey {
11 |     @State static var value: Float = 0
12 |     static let defaultValue = ValueStore($value)
   |                |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ValueStore' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'defaultValue' 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
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/ValueStore.swift:11:7: note: class 'ValueStore' does not conform to the 'Sendable' protocol
 9 | import SwiftUI
10 |
11 | class ValueStore: ObservableObject {
   |       `- note: class 'ValueStore' does not conform to the 'Sendable' protocol
12 |     let uuid = NSUUID().uuidString
13 |     @Published var value: Float = 0
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/views/InputStepper.swift:34:24: warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
 8 | import SwiftUI
 9 |
10 | public struct InputStepper<Content: View>: View, Equatable {
   |                                                  `- note: add '@preconcurrency' to the 'Equatable' conformance to defer isolation checking to run time
11 |     let content: Content
12 |     @State var valueStore: ValueStore
   :
32 |     }
33 |
34 |     public static func == (lhs: InputStepper<Content>, rhs: InputStepper<Content>) -> Bool {
   |                        |- warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
   |                        `- note: add 'nonisolated' to '==' to make this operator function not isolated to the actor
35 |         return true
36 |     }
Swift.Equatable:2:17: note: '==' declared here
1 | public protocol Equatable {
2 |     static func == (lhs: Self, rhs: Self) -> Bool
  |                 `- note: '==' declared here
3 | }
[6/12] Compiling InputStepper Value.swift
[7/12] Compiling InputStepper MinusButton.swift
[8/12] Compiling InputStepper InputStepper.swift
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/views/InputStepper.swift:34:24: warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
 8 | import SwiftUI
 9 |
10 | public struct InputStepper<Content: View>: View, Equatable {
   |                                                  `- note: add '@preconcurrency' to the 'Equatable' conformance to defer isolation checking to run time
11 |     let content: Content
12 |     @State var valueStore: ValueStore
   :
32 |     }
33 |
34 |     public static func == (lhs: InputStepper<Content>, rhs: InputStepper<Content>) -> Bool {
   |                        |- warning: main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
   |                        `- note: add 'nonisolated' to '==' to make this operator function not isolated to the actor
35 |         return true
36 |     }
Swift.Equatable:2:17: note: '==' declared here
1 | public protocol Equatable {
2 |     static func == (lhs: Self, rhs: Self) -> Bool
  |                 `- note: '==' declared here
3 | }
[9/12] Compiling InputStepper FloatExtension.swift
[10/12] Compiling InputStepper Environment.swift
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/utils/Environment.swift:11:23: warning: static property 'value' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | private struct ValueStoreKey: EnvironmentKey {
11 |     @State static var value: Float = 0
   |                       |- warning: static property 'value' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'value' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'value' 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
12 |     static let defaultValue = ValueStore($value)
13 | }
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/utils/Environment.swift:12:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ValueStore' may have shared mutable state; this is an error in the Swift 6 language mode
10 | private struct ValueStoreKey: EnvironmentKey {
11 |     @State static var value: Float = 0
12 |     static let defaultValue = ValueStore($value)
   |                |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ValueStore' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'defaultValue' 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
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/InputStepper/ValueStore.swift:11:7: note: class 'ValueStore' does not conform to the 'Sendable' protocol
 9 | import SwiftUI
10 |
11 | class ValueStore: ObservableObject {
   |       `- note: class 'ValueStore' does not conform to the 'Sendable' protocol
12 |     let uuid = NSUUID().uuidString
13 |     @Published var value: Float = 0
[11/12] Compiling InputStepper PlusButton.swift
[12/12] Compiling InputStepper ControlButton.swift
Build complete! (28.03s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "InputStepper",
  "name" : "InputStepper",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "macos",
      "version" : "11.0"
    },
    {
      "name" : "watchos",
      "version" : "8.0"
    },
    {
      "name" : "tvos",
      "version" : "14.0"
    }
  ],
  "products" : [
    {
      "name" : "InputStepper",
      "targets" : [
        "InputStepper"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "InputStepperTests",
      "module_type" : "SwiftTarget",
      "name" : "InputStepperTests",
      "path" : "Tests/InputStepperTests",
      "sources" : [
        "ValueStoreTests.swift"
      ],
      "target_dependencies" : [
        "InputStepper"
      ],
      "type" : "test"
    },
    {
      "c99name" : "InputStepper",
      "module_type" : "SwiftTarget",
      "name" : "InputStepper",
      "path" : "Sources/InputStepper",
      "product_memberships" : [
        "InputStepper"
      ],
      "sources" : [
        "ValueStore.swift",
        "protocols/InputStepperValueStorage.swift",
        "utils/Environment.swift",
        "utils/FloatExtension.swift",
        "views/ControlButton.swift",
        "views/InputStepper.swift",
        "views/MinusButton.swift",
        "views/PlusButton.swift",
        "views/Value.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Done.