This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

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 with Swift 6.0 for macOS (SPM).

Swift 6 data race errors: 2

Build Command

env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mateusz800/InputStepper.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/mateusz800/InputStepper
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 2ff0de9 Update issue templates
Cloned https://github.com/mateusz800/InputStepper.git
Revision (git rev-parse @):
2ff0de95c29297b178b4ed7157401a433517ec26
SUCCESS checkout https://github.com/mateusz800/InputStepper.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/mateusz800/InputStepper.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a 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-6F35C1178C84523A.txt
[3/12] Compiling InputStepper Value.swift
[4/12] Compiling InputStepper InputStepper.swift
[5/12] Compiling InputStepper ControlButton.swift
[6/12] Compiling InputStepper FloatExtension.swift
[7/12] Compiling InputStepper MinusButton.swift
[8/12] Compiling InputStepper PlusButton.swift
[9/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)
[10/12] Compiling InputStepper InputStepperValueStorage.swift
[11/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 non-isolated 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 non-isolated 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
[12/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 non-isolated 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 non-isolated 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
Build complete! (36.71s)
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.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.