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, reference main (3dbaf3), with Swift 6.0 for macOS (SPM) on 29 Nov 2024 05:07:28 UTC.

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.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
========================================
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": "regulate",
      "name": "Regulate",
      "url": "https://github.com/sideeffect-io/Regulate.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Regulate",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/sideeffect-io/Regulate.git
[3/81] Fetching regulate
Fetched https://github.com/sideeffect-io/Regulate.git from cache (1.00s)
Creating working copy for https://github.com/sideeffect-io/Regulate.git
Working copy of https://github.com/sideeffect-io/Regulate.git resolved at main (3dbaf34)
warning: '.resolve-product-dependencies': dependency 'regulate' 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/sideeffect-io/Regulate.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 -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/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)
[4/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
[5/10] Compiling Regulate Binding+Regulate.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/Binding+Regulate.swift:20:20: warning: passing non-sendable parameter 'get' to function expecting a @Sendable closure
14 |   init(
15 |     regulator: some Regulator<Value>,
16 |     get: @escaping () -> Value,
   |     `- note: parameter 'get' is implicitly non-sendable
17 |     set: @Sendable @escaping (Value) async -> Void
18 |   ) {
19 |     regulator.output = set
20 |     self.init(get: get) { value in
   |                    `- warning: passing non-sendable parameter 'get' to function expecting a @Sendable closure
21 |       regulator.push(value)
22 |     }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/Binding+Regulate.swift:21:7: warning: capture of 'regulator' with non-sendable type 'some Regulator<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
13 | public extension Binding {
14 |   init(
15 |     regulator: some Regulator<Value>,
   |                `- note: consider making generic parameter 'some Regulator<Value>' conform to the 'Sendable' protocol
16 |     get: @escaping () -> Value,
17 |     set: @Sendable @escaping (Value) async -> Void
   :
19 |     regulator.output = set
20 |     self.init(get: get) { value in
21 |       regulator.push(value)
   |       `- warning: capture of 'regulator' with non-sendable type 'some Regulator<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |     }
23 |   }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/Binding+Regulate.swift:38:7: warning: capture of 'self' with non-sendable type 'Binding<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
36 |
37 |     return Binding {
38 |       self.wrappedValue
   |       `- warning: capture of 'self' with non-sendable type 'Binding<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
39 |     } set: { value in
40 |       self.wrappedValue = value
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/Binding+Regulate.swift:40:7: warning: capture of 'self' with non-sendable type 'Binding<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
38 |       self.wrappedValue
39 |     } set: { value in
40 |       self.wrappedValue = value
   |       `- warning: capture of 'self' with non-sendable type 'Binding<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
41 |       regulator.push(value)
42 |     }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUI/Binding+Regulate.swift:41:7: warning: capture of 'regulator' with non-sendable type 'some Regulator<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
30 |   /// - Returns: the Binding wrapping the base binding
31 |   func perform(
32 |     regulator: some Regulator<Value>,
   |                `- note: consider making generic parameter 'some Regulator<Value>' conform to the 'Sendable' protocol
33 |     _ block: @Sendable @escaping (Value) async -> Void
34 |   ) -> Self {
   :
39 |     } set: { value in
40 |       self.wrappedValue = value
41 |       regulator.push(value)
   |       `- warning: capture of 'regulator' with non-sendable type 'some Regulator<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
42 |     }
43 |   }
[6/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:115:24: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
113 |
114 |     if shouldStartADebounce {
115 |       self.task = Task { [weak self] in
    |                        `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
116 |         guard let self = self else { return }
117 |
118 |         var timeToSleep = self.dueTime.nanoseconds
119 |         var currentValue = value
    |                            `- note: closure captures 'value' which is accessible to code in the current task
120 |
121 |       loop: while true {
[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 |
[9/10] Compiling Regulate DispatchTimeInterval+Nanoseconds.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: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 |     @MainActor @preconcurrency public struct Label : View {
 4 |         @available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
BUILD FAILURE 6.0 macosSpm