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

Failed to build Regulate with Swift 6.0 for macOS (SPM).

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/sideeffect-io/Regulate.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/sideeffect-io/Regulate
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 3dbaf34 Merge pull request #1 from sideeffect-io/feature/task-extensions
Cloned https://github.com/sideeffect-io/Regulate.git
Revision (git rev-parse @):
3dbaf34cf489792e9b944be5a3aaa31e20ff5b03
SUCCESS checkout https://github.com/sideeffect-io/Regulate.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/sideeffect-io/Regulate.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/10] Compiling Regulate Throttler.swift
/Users/admin/builder/spi-builder-workspace/Sources/Throttler.swift:132:13: warning: global function 'os_unfair_lock_lock' is unavailable from asynchronous contexts; Use OSAllocatedUnfairLock.performWhileLocked() for async-safe scoped locking; this is an error in the Swift 6 language mode
130 |             var hasTickedOutput: StateMachine.HasTickedOutput
131 |
132 |             os_unfair_lock_lock(self.lock)
    |             `- warning: global function 'os_unfair_lock_lock' is unavailable from asynchronous contexts; Use OSAllocatedUnfairLock.performWhileLocked() for async-safe scoped locking; this is an error in the Swift 6 language mode
133 |             hasTickedOutput = self.stateMachine.hasTicked()
134 |             os_unfair_lock_unlock(self.lock)
Darwin.os_unfair_lock_lock:2:13: note: 'os_unfair_lock_lock' declared here
1 | @available(macOS 10.12, *)
2 | public func os_unfair_lock_lock(_ lock: os_unfair_lock_t)
  |             `- note: 'os_unfair_lock_lock' declared here
/Users/admin/builder/spi-builder-workspace/Sources/Throttler.swift:134:13: warning: global function 'os_unfair_lock_unlock' is unavailable from asynchronous contexts; Use OSAllocatedUnfairLock.performWhileLocked() for async-safe scoped locking; this is an error in the Swift 6 language mode
132 |             os_unfair_lock_lock(self.lock)
133 |             hasTickedOutput = self.stateMachine.hasTicked()
134 |             os_unfair_lock_unlock(self.lock)
    |             `- warning: global function 'os_unfair_lock_unlock' is unavailable from asynchronous contexts; Use OSAllocatedUnfairLock.performWhileLocked() for async-safe scoped locking; this is an error in the Swift 6 language mode
135 |
136 |             switch hasTickedOutput {
Darwin.os_unfair_lock_unlock:2:13: note: 'os_unfair_lock_unlock' declared here
1 | @available(macOS 10.12, *)
2 | public func os_unfair_lock_unlock(_ lock: os_unfair_lock_t)
  |             `- note: 'os_unfair_lock_unlock' declared here
/Users/admin/builder/spi-builder-workspace/Sources/Throttler.swift:141:52: warning: capture of 'last' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 38 | /// // will only print an index once every 2 seconds (the latest received index before the `tick`)
 39 | /// ```
 40 | public final class Throttler<Value>: @unchecked Sendable, ObservableObject, Regulator {
    |                              `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
 41 |   struct StateMachine {
 42 |     enum State {
    :
139 |               case .continueThrottling(let first, let last):
140 |                 group.addTask {
141 |                   await self.output?(self.latest ? last : first)
    |                                                    `- warning: capture of 'last' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
142 |                 }
143 |                 continue loop
/Users/admin/builder/spi-builder-workspace/Sources/Throttler.swift:141:59: warning: capture of 'first' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 38 | /// // will only print an index once every 2 seconds (the latest received index before the `tick`)
 39 | /// ```
 40 | public final class Throttler<Value>: @unchecked Sendable, ObservableObject, Regulator {
    |                              `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
 41 |   struct StateMachine {
 42 |     enum State {
    :
139 |               case .continueThrottling(let first, let last):
140 |                 group.addTask {
141 |                   await self.output?(self.latest ? last : first)
    |                                                           `- warning: capture of 'first' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
142 |                 }
143 |                 continue loop
[4/10] Compiling Regulate Debouncer.swift
/Users/admin/builder/spi-builder-workspace/Sources/Debouncer.swift:125:9: warning: global function 'os_unfair_lock_lock' is unavailable from asynchronous contexts; Use OSAllocatedUnfairLock.performWhileLocked() for async-safe scoped locking; this is an error in the Swift 6 language mode
123 |
124 |         var output: StateMachine.HasDebouncedOutput
125 |         os_unfair_lock_lock(self.lock)
    |         `- warning: global function 'os_unfair_lock_lock' is unavailable from asynchronous contexts; Use OSAllocatedUnfairLock.performWhileLocked() for async-safe scoped locking; this is an error in the Swift 6 language mode
126 |         output = self.stateMachine.hasDebouncedCurrentValue()
127 |         os_unfair_lock_unlock(self.lock)
Darwin.os_unfair_lock_lock:2:13: note: 'os_unfair_lock_lock' declared here
1 | @available(macOS 10.12, *)
2 | public func os_unfair_lock_lock(_ lock: os_unfair_lock_t)
  |             `- note: 'os_unfair_lock_lock' declared here
/Users/admin/builder/spi-builder-workspace/Sources/Debouncer.swift:127:9: warning: global function 'os_unfair_lock_unlock' is unavailable from asynchronous contexts; Use OSAllocatedUnfairLock.performWhileLocked() for async-safe scoped locking; this is an error in the Swift 6 language mode
125 |         os_unfair_lock_lock(self.lock)
126 |         output = self.stateMachine.hasDebouncedCurrentValue()
127 |         os_unfair_lock_unlock(self.lock)
    |         `- warning: global function 'os_unfair_lock_unlock' is unavailable from asynchronous contexts; Use OSAllocatedUnfairLock.performWhileLocked() for async-safe scoped locking; this is an error in the Swift 6 language mode
128 |
129 |         switch output {
Darwin.os_unfair_lock_unlock:2:13: note: 'os_unfair_lock_unlock' declared here
1 | @available(macOS 10.12, *)
2 | public func os_unfair_lock_unlock(_ lock: os_unfair_lock_t)
  |             `- note: 'os_unfair_lock_unlock' declared here
/Users/admin/builder/spi-builder-workspace/Sources/Debouncer.swift:119:28: warning: capture of 'value' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 36 | /// // will only print "99" 2 seconds after the last call to `push(_:)`
 37 | /// ```
 38 | public final class Debouncer<Value>: @unchecked Sendable, ObservableObject, Regulator {
    |                              `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
 39 |   struct DueValue {
 40 |     let value: Value
    :
117 |
118 |         var timeToSleep = self.dueTime.nanoseconds
119 |         var currentValue = value
    |                            `- warning: capture of 'value' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |
121 |       loop: while true {
[5/10] Compiling Regulate Button+Regulated.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/Button+Regulated.swift:16:59: warning: call to main actor-isolated initializer 'init(dueTime:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
13 |   /// - Parameter dueTime: the time the Debouncer should wait before executing the action
14 |   /// - Returns: a debounced button
15 |   func debounce(dueTime: DispatchTimeInterval) -> some View {
   |        `- note: add '@MainActor' to make instance method 'debounce(dueTime:)' part of global actor 'MainActor'
16 |     return self.buttonStyle(RegulatedButtonStyle<Debouncer>(dueTime: dueTime))
   |                                                           `- warning: call to main actor-isolated initializer 'init(dueTime:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
17 |   }
18 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/RegulatedButtonStyle.swift:15:3: note: calls to initializer 'init(dueTime:)' from outside of its actor context are implicitly asynchronous
13 |   let dueTime: DispatchTimeInterval
14 |
15 |   init(dueTime: DispatchTimeInterval) {
   |   `- note: calls to initializer 'init(dueTime:)' from outside of its actor context are implicitly asynchronous
16 |     self.dueTime = dueTime
17 |   }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/Button+Regulated.swift:23:59: warning: call to main actor-isolated initializer 'init(dueTime:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
20 |   /// - Parameter dueTime: the interval at which to execute the action
21 |   /// - Returns: a throttled button
22 |   func throttle(dueTime: DispatchTimeInterval) -> some View {
   |        `- note: add '@MainActor' to make instance method 'throttle(dueTime:)' part of global actor 'MainActor'
23 |     return self.buttonStyle(RegulatedButtonStyle<Throttler>(dueTime: dueTime))
   |                                                           `- warning: call to main actor-isolated initializer 'init(dueTime:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
24 |   }
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/RegulatedButtonStyle.swift:15:3: note: calls to initializer 'init(dueTime:)' from outside of its actor context are implicitly asynchronous
13 |   let dueTime: DispatchTimeInterval
14 |
15 |   init(dueTime: DispatchTimeInterval) {
   |   `- note: calls to initializer 'init(dueTime:)' from outside of its actor context are implicitly asynchronous
16 |     self.dueTime = dueTime
17 |   }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/10] Compiling Regulate DispatchTimeInterval+Nanoseconds.swift
[7/10] Compiling Regulate Regulator.swift
[8/10] Emitting module Regulate
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/RegulatedButtonStyle.swift:12:4: error: 'StateObject' is only available in macOS 11.0 or newer
 9 | import SwiftUI
10 |
11 | public struct RegulatedButtonStyle<R: Regulator<Void>>: PrimitiveButtonStyle {
   |               `- note: add @available attribute to enclosing generic struct
12 |   @StateObject var regulator = R.init()
   |    `- error: 'StateObject' is only available in macOS 11.0 or newer
13 |   let dueTime: DispatchTimeInterval
14 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/RegulatedButtonStyle.swift:19:15: warning: main actor-isolated instance method 'makeBody(configuration:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
 9 | import SwiftUI
10 |
11 | public struct RegulatedButtonStyle<R: Regulator<Void>>: PrimitiveButtonStyle {
   |                                                         `- note: add '@preconcurrency' to the 'PrimitiveButtonStyle' conformance to defer isolation checking to run time
12 |   @StateObject var regulator = R.init()
13 |   let dueTime: DispatchTimeInterval
   :
17 |   }
18 |
19 |   public func makeBody(configuration: Configuration) -> some View {
   |               |- warning: main actor-isolated instance method 'makeBody(configuration:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
   |               `- note: add 'nonisolated' to 'makeBody(configuration:)' to make this instance method not isolated to the actor
20 |     regulator.dueTime = self.dueTime
21 |     regulator.output = { _ in configuration.trigger() }
SwiftUI.PrimitiveButtonStyle:4:23: note: 'makeBody(configuration:)' declared here
2 | public protocol PrimitiveButtonStyle {
3 |     associatedtype Body : View
4 |     @ViewBuilder func makeBody(configuration: Self.Configuration) -> Self.Body
  |                       `- note: 'makeBody(configuration:)' declared here
5 |     typealias Configuration = PrimitiveButtonStyleConfiguration
6 | }
[9/10] Compiling Regulate Binding+Regulate.swift
[10/10] Compiling Regulate RegulatedButtonStyle.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/RegulatedButtonStyle.swift:12:4: error: 'StateObject' is only available in macOS 11.0 or newer
 9 | import SwiftUI
10 |
11 | public struct RegulatedButtonStyle<R: Regulator<Void>>: PrimitiveButtonStyle {
   |               `- note: add @available attribute to enclosing generic struct
12 |   @StateObject var regulator = R.init()
   |    `- error: 'StateObject' is only available in macOS 11.0 or newer
13 |   let dueTime: DispatchTimeInterval
14 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/RegulatedButtonStyle.swift:19:15: warning: main actor-isolated instance method 'makeBody(configuration:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
 9 | import SwiftUI
10 |
11 | public struct RegulatedButtonStyle<R: Regulator<Void>>: PrimitiveButtonStyle {
   |                                                         `- note: add '@preconcurrency' to the 'PrimitiveButtonStyle' conformance to defer isolation checking to run time
12 |   @StateObject var regulator = R.init()
13 |   let dueTime: DispatchTimeInterval
   :
17 |   }
18 |
19 |   public func makeBody(configuration: Configuration) -> some View {
   |               |- warning: main actor-isolated instance method 'makeBody(configuration:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
   |               `- note: add 'nonisolated' to 'makeBody(configuration:)' to make this instance method not isolated to the actor
20 |     regulator.dueTime = self.dueTime
21 |     regulator.output = { _ in configuration.trigger() }
SwiftUI.PrimitiveButtonStyle:4:23: note: 'makeBody(configuration:)' declared here
2 | public protocol PrimitiveButtonStyle {
3 |     associatedtype Body : View
4 |     @ViewBuilder func makeBody(configuration: Self.Configuration) -> Self.Body
  |                       `- note: 'makeBody(configuration:)' declared here
5 |     typealias Configuration = PrimitiveButtonStyleConfiguration
6 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/RegulatedButtonStyle.swift:21:31: warning: capture of 'configuration' with non-sendable type 'RegulatedButtonStyle<R>.Configuration' (aka 'PrimitiveButtonStyleConfiguration') in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 |   public func makeBody(configuration: Configuration) -> some View {
20 |     regulator.dueTime = self.dueTime
21 |     regulator.output = { _ in configuration.trigger() }
   |                               `- warning: capture of 'configuration' with non-sendable type 'RegulatedButtonStyle<R>.Configuration' (aka 'PrimitiveButtonStyleConfiguration') in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |
23 |     if #available(iOS 15.0, macOS 12.0, *) {
SwiftUI.PrimitiveButtonStyleConfiguration:2:15: note: struct 'PrimitiveButtonStyleConfiguration' does not conform to the 'Sendable' protocol
 1 | @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
 2 | public struct PrimitiveButtonStyleConfiguration {
   |               `- note: struct 'PrimitiveButtonStyleConfiguration' does not conform to the 'Sendable' protocol
 3 |     public struct Label : View {
 4 |         public typealias Body = Never
BUILD FAILURE 6.0 macosSpm
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.