Build Information
Successful build of Promises, reference 2.0.4 (7de014
), with Swift 6.0 for macOS (SPM) on 31 Oct 2024 04:13:08 UTC.
Swift 6 data race errors: 0
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/khanlou/Promise.git
Reference: 2.0.4
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/khanlou/Promise
* tag 2.0.4 -> FETCH_HEAD
HEAD is now at 7de0149 update to version 2.0.4
Cloned https://github.com/khanlou/Promise.git
Revision (git rev-parse @):
7de01494163478adb1aa83740914a4ca29059169
SUCCESS checkout https://github.com/khanlou/Promise.git at 2.0.4
========================================
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": "promise",
"name": "Promises",
"url": "https://github.com/khanlou/Promise.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Promise",
"dependencies": [
]
}
]
}
Fetching https://github.com/khanlou/Promise.git
[13/1230] Fetching promise
Fetched https://github.com/khanlou/Promise.git from cache (0.89s)
Creating working copy for https://github.com/khanlou/Promise.git
Working copy of https://github.com/khanlou/Promise.git resolved at 2.0.4 (7de0149)
warning: '.resolve-product-dependencies': dependency 'promise' 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/khanlou/Promise.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/5] Compiling Promise Promise.swift
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:21:29: warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
18 | extension DispatchQueue: ExecutionContext {
19 |
20 | public func execute(_ work: @escaping () -> Void) {
| `- note: parameter 'work' is implicitly non-sendable
21 | self.async(execute: work)
| `- warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
22 | }
23 | }
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:41:35: warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
37 | }
38 |
39 | public func execute(_ work: @escaping () -> Void) {
| `- note: parameter 'work' is implicitly non-sendable
40 | guard valid else { return }
41 | self.queue.async(execute: work)
| `- warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
42 | }
43 |
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:154:21: warning: capture of 'work' with non-sendable type '(@escaping (Value) -> Void, @escaping (any Error) -> Void) throws -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
152 | queue.async(execute: {
153 | do {
154 | try work(self.fulfill, self.reject)
| |- warning: capture of 'work' with non-sendable type '(@escaping (Value) -> Void, @escaping (any Error) -> Void) throws -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
155 | } catch let error {
156 | self.reject(error)
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:154:26: warning: capture of 'self' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
131 |
132 |
133 | public final class Promise<Value> {
| `- note: generic class 'Promise' does not conform to the 'Sendable' protocol
134 |
135 | private var state: State<Value>
:
152 | queue.async(execute: {
153 | do {
154 | try work(self.fulfill, self.reject)
| `- warning: capture of 'self' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
155 | } catch let error {
156 | self.reject(error)
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:236:50: warning: capture of 'self' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
131 |
132 |
133 | public final class Promise<Value> {
| `- note: generic class 'Promise' does not conform to the 'Sendable' protocol
134 |
135 | private var state: State<Value>
:
234 | private func updateState(_ newState: State<Value>) {
235 | lockQueue.async(execute: {
236 | guard case .pending(let callbacks) = self.state else { return }
| `- warning: capture of 'self' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
237 | self.state = newState
238 | self.fireIfCompleted(callbacks: callbacks)
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:237:26: warning: capture of 'newState' with non-sendable type 'State<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
64 | }
65 |
66 | enum State<Value>: CustomStringConvertible {
| `- note: consider making generic enum 'State' conform to the 'Sendable' protocol
67 |
68 | /// The promise has not completed yet.
:
235 | lockQueue.async(execute: {
236 | guard case .pending(let callbacks) = self.state else { return }
237 | self.state = newState
| `- warning: capture of 'newState' with non-sendable type 'State<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
238 | self.fireIfCompleted(callbacks: callbacks)
239 | })
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:245:20: warning: capture of 'self' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
131 |
132 |
133 | public final class Promise<Value> {
| `- note: generic class 'Promise' does not conform to the 'Sendable' protocol
134 |
135 | private var state: State<Value>
:
243 | let callback = Callback(onFulfilled: onFulfilled, onRejected: onRejected, executionContext: queue)
244 | lockQueue.async(flags: .barrier, execute: {
245 | switch self.state {
| `- warning: capture of 'self' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
246 | case .pending(let callbacks):
247 | self.state = .pending(callbacks: callbacks + [callback])
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:247:63: warning: capture of 'callback' with non-sendable type 'Callback<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
44 | }
45 |
46 | struct Callback<Value> {
| `- note: consider making generic struct 'Callback' conform to the 'Sendable' protocol
47 | let onFulfilled: (Value) -> Void
48 | let onRejected: (Error) -> Void
:
245 | switch self.state {
246 | case .pending(let callbacks):
247 | self.state = .pending(callbacks: callbacks + [callback])
| `- warning: capture of 'callback' with non-sendable type 'Callback<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
248 | case .fulfilled(let value):
249 | callback.callFulfill(value)
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:261:20: warning: capture of 'self' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
131 |
132 |
133 | public final class Promise<Value> {
| `- note: generic class 'Promise' does not conform to the 'Sendable' protocol
134 |
135 | private var state: State<Value>
:
259 | }
260 | lockQueue.async(execute: {
261 | switch self.state {
| `- warning: capture of 'self' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
262 | case .pending:
263 | break
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:265:40: warning: capture of 'callbacks' with non-sendable type '[Callback<Value>]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
44 | }
45 |
46 | struct Callback<Value> {
| `- note: consider making generic struct 'Callback' conform to the 'Sendable' protocol
47 | let onFulfilled: (Value) -> Void
48 | let onRejected: (Error) -> Void
:
263 | break
264 | case let .fulfilled(value):
265 | var mutableCallbacks = callbacks
| `- warning: capture of 'callbacks' with non-sendable type '[Callback<Value>]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
266 | let firstCallback = mutableCallbacks.removeFirst()
267 | firstCallback.callFulfill(value, completion: {
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:268:21: warning: capture of 'self' with non-sendable type 'Promise<Value>' in an isolated closure; this is an error in the Swift 6 language mode
131 |
132 |
133 | public final class Promise<Value> {
| `- note: generic class 'Promise' does not conform to the 'Sendable' protocol
134 |
135 | private var state: State<Value>
:
266 | let firstCallback = mutableCallbacks.removeFirst()
267 | firstCallback.callFulfill(value, completion: {
268 | self.fireIfCompleted(callbacks: mutableCallbacks)
| `- warning: capture of 'self' with non-sendable type 'Promise<Value>' in an isolated closure; this is an error in the Swift 6 language mode
269 | })
270 | case let .rejected(error):
/Users/admin/builder/spi-builder-workspace/Promise/Promise.swift:274:21: warning: capture of 'self' with non-sendable type 'Promise<Value>' in an isolated closure; this is an error in the Swift 6 language mode
131 |
132 |
133 | public final class Promise<Value> {
| `- note: generic class 'Promise' does not conform to the 'Sendable' protocol
134 |
135 | private var state: State<Value>
:
272 | let firstCallback = mutableCallbacks.removeFirst()
273 | firstCallback.callReject(error, completion: {
274 | self.fireIfCompleted(callbacks: mutableCallbacks)
| `- warning: capture of 'self' with non-sendable type 'Promise<Value>' in an isolated closure; this is an error in the Swift 6 language mode
275 | })
276 | }
[4/5] Compiling Promise Promise+Extras.swift
/Users/admin/builder/spi-builder-workspace/Promise/Promise+Extras.swift:39:17: warning: capture of 'fulfill' with non-sendable type '(()) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
37 | return Promise<()>(work: { fulfill, reject in
38 | DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
39 | fulfill(())
| |- warning: capture of 'fulfill' with non-sendable type '(()) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
40 | })
41 | })
/Users/admin/builder/spi-builder-workspace/Promise/Promise+Extras.swift:39:17: warning: sending 'fulfill' risks causing data races; this is an error in the Swift 6 language mode
37 | return Promise<()>(work: { fulfill, reject in
38 | DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
39 | fulfill(())
| |- warning: sending 'fulfill' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'fulfill' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
40 | })
41 | })
[5/5] Emitting module Promise
Build complete! (6.19s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "Promises",
"name" : "Promises",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "Promise",
"targets" : [
"Promise"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "PromiseTests",
"module_type" : "SwiftTarget",
"name" : "PromiseTests",
"path" : "PromiseTests",
"sources" : [
"ExecutionContextTests.swift",
"PromiseAllTests.swift",
"PromiseAlwaysTests.swift",
"PromiseDelayTests.swift",
"PromiseEnsureTests.swift",
"PromiseErrorMatcherTests.swift",
"PromiseKickoffTests.swift",
"PromiseRaceTests.swift",
"PromiseRecoverTests.swift",
"PromiseRetryTests.swift",
"PromiseTests.swift",
"PromiseThrowsTests.swift",
"PromiseZipTests.swift",
"Wrench.swift",
"delay.swift"
],
"target_dependencies" : [
"Promise"
],
"type" : "test"
},
{
"c99name" : "Promise",
"module_type" : "SwiftTarget",
"name" : "Promise",
"path" : "Promise",
"product_memberships" : [
"Promise"
],
"sources" : [
"Promise+Extras.swift",
"Promise.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
Done.