Build Information
Successful build of BrightFutures with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 7
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/Thomvis/BrightFutures.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Thomvis/BrightFutures
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at a4b4cb2 Update README.md
Cloned https://github.com/Thomvis/BrightFutures.git
Revision (git rev-parse @):
a4b4cb27ef1525739988184dac73a1a462f9d62d
SUCCESS checkout https://github.com/Thomvis/BrightFutures.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/Thomvis/BrightFutures.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/19] Compiling BrightFutures InvalidationToken.swift
[4/19] Compiling BrightFutures MutableAsyncType+ResultType.swift
[5/19] Compiling BrightFutures MutableAsyncType.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/NSOperationQueue+BrightFutures.swift:16:54: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
13 | /// Tasks added to the execution context are executed as operations on the queue.
14 | var context: ExecutionContext {
15 | return { [weak self] task in
| `- note: parameter 'task' is implicitly non-sendable
16 | self?.addOperation(BlockOperation(block: task))
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
17 | }
18 | }
[6/19] Compiling BrightFutures NSOperationQueue+BrightFutures.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/NSOperationQueue+BrightFutures.swift:16:54: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
13 | /// Tasks added to the execution context are executed as operations on the queue.
14 | var context: ExecutionContext {
15 | return { [weak self] task in
| `- note: parameter 'task' is implicitly non-sendable
16 | self?.addOperation(BlockOperation(block: task))
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
17 | }
18 | }
[7/19] Compiling BrightFutures Promise.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
[8/19] Compiling BrightFutures Result+BrightFutures.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
[9/19] Compiling BrightFutures ResultProtocol.swift
[10/19] Compiling BrightFutures SequenceType+BrightFutures.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:44:12: warning: let 'maxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
42 |
43 | /// From https://github.com/BoltsFramework/Bolts-Swift/blob/5fe4df7acb384a93ad93e8595d42e2b431fdc266/Sources/BoltsSwift/Executor.swift#L56
44 | public let maxStackDepthExecutionContext: ExecutionContext = { task in
| |- warning: let 'maxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'maxStackDepthExecutionContext' 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
45 | struct Static {
46 | static let taskDepthKey = "nl.thomvis.BrightFutures"
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
[11/20] Compiling BrightFutures Async.swift
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Async.swift:63:13: warning: capture of 'self' with non-sendable type 'Async<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | /// This class is often not used directly. Instead, its subclass
20 | /// `Future` is used.
21 | open class Async<Value>: AsyncType {
| `- note: generic class 'Async' does not conform to the 'Sendable' protocol
22 |
23 | typealias CompletionCallback = (Value) -> Void
:
61 | public required init(result: Value, delay: DispatchTimeInterval) {
62 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + delay) {
63 | self.complete(result)
| `- warning: capture of 'self' with non-sendable type 'Async<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
64 | }
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Async.swift:63:27: warning: capture of 'result' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | /// This class is often not used directly. Instead, its subclass
20 | /// `Future` is used.
21 | open class Async<Value>: AsyncType {
| `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
22 |
23 | typealias CompletionCallback = (Value) -> Void
:
61 | public required init(result: Value, delay: DispatchTimeInterval) {
62 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + delay) {
63 | self.complete(result)
| `- warning: capture of 'result' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
64 | }
65 | }
[12/20] Compiling BrightFutures AsyncType+Debug.swift
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Async.swift:63:13: warning: capture of 'self' with non-sendable type 'Async<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | /// This class is often not used directly. Instead, its subclass
20 | /// `Future` is used.
21 | open class Async<Value>: AsyncType {
| `- note: generic class 'Async' does not conform to the 'Sendable' protocol
22 |
23 | typealias CompletionCallback = (Value) -> Void
:
61 | public required init(result: Value, delay: DispatchTimeInterval) {
62 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + delay) {
63 | self.complete(result)
| `- warning: capture of 'self' with non-sendable type 'Async<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
64 | }
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Async.swift:63:27: warning: capture of 'result' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | /// This class is often not used directly. Instead, its subclass
20 | /// `Future` is used.
21 | open class Async<Value>: AsyncType {
| `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
22 |
23 | typealias CompletionCallback = (Value) -> Void
:
61 | public required init(result: Value, delay: DispatchTimeInterval) {
62 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + delay) {
63 | self.complete(result)
| `- warning: capture of 'result' with non-sendable type 'Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
64 | }
65 | }
[13/20] Compiling BrightFutures AsyncType+ResultType.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/AsyncType.swift:76:21: warning: capture of 'complete' with non-sendable type '(Self.Value) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
74 | onComplete(immediateExecutionContext) { result in
75 | queue.asyncAfter(deadline: DispatchTime.now() + interval) {
76 | complete(result)
| |- warning: capture of 'complete' with non-sendable type '(Self.Value) -> 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'
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/AsyncType.swift:76:30: warning: capture of 'result' with non-sendable type 'Self.Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
74 | onComplete(immediateExecutionContext) { result in
75 | queue.asyncAfter(deadline: DispatchTime.now() + interval) {
76 | complete(result)
| `- warning: capture of 'result' with non-sendable type 'Self.Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
77 | }
78 | }
[14/20] Compiling BrightFutures AsyncType.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/AsyncType.swift:76:21: warning: capture of 'complete' with non-sendable type '(Self.Value) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
74 | onComplete(immediateExecutionContext) { result in
75 | queue.asyncAfter(deadline: DispatchTime.now() + interval) {
76 | complete(result)
| |- warning: capture of 'complete' with non-sendable type '(Self.Value) -> 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'
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/AsyncType.swift:76:30: warning: capture of 'result' with non-sendable type 'Self.Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
74 | onComplete(immediateExecutionContext) { result in
75 | queue.asyncAfter(deadline: DispatchTime.now() + interval) {
76 | complete(result)
| `- warning: capture of 'result' with non-sendable type 'Self.Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
77 | }
78 | }
[15/20] Compiling BrightFutures Dispatch+BrightFutures.swift
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:14:33: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
11 | public extension DispatchQueue {
12 | var context: ExecutionContext {
13 | return { task in
| `- note: parameter 'task' is implicitly non-sendable
14 | self.async(execute: task)
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
15 | }
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:21:17: warning: capture of 'completion' with non-sendable type '(Result<T, Never>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | return Future { completion in
20 | async {
21 | completion(.success(execute()))
| |- warning: capture of 'completion' with non-sendable type '(Result<T, Never>) -> 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'
22 | }
23 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:21:37: warning: capture of 'execute' with non-sendable type '() -> T' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | return Future { completion in
20 | async {
21 | completion(.success(execute()))
| |- warning: capture of 'execute' with non-sendable type '() -> T' 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'
22 | }
23 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:29:17: warning: capture of 'completion' with non-sendable type '(Result<T, E>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 | return Future { completion in
28 | async {
29 | completion(execute())
| |- warning: capture of 'completion' with non-sendable type '(Result<T, E>) -> 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'
30 | }
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:29:28: warning: capture of 'execute' with non-sendable type '() -> Result<T, E>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 | return Future { completion in
28 | async {
29 | completion(execute())
| |- warning: capture of 'execute' with non-sendable type '() -> Result<T, E>' 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'
30 | }
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:37:17: warning: capture of 'completion' with non-sendable type '(Result<T, Never>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | return Future { completion in
36 | asyncAfter(deadline: deadline) {
37 | completion(.success(execute()))
| |- warning: capture of 'completion' with non-sendable type '(Result<T, Never>) -> 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'
38 | }
39 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:37:37: warning: capture of 'execute' with non-sendable type '() -> T' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | return Future { completion in
36 | asyncAfter(deadline: deadline) {
37 | completion(.success(execute()))
| |- warning: capture of 'execute' with non-sendable type '() -> T' 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'
38 | }
39 | }
[16/20] Compiling BrightFutures Errors.swift
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:14:33: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
11 | public extension DispatchQueue {
12 | var context: ExecutionContext {
13 | return { task in
| `- note: parameter 'task' is implicitly non-sendable
14 | self.async(execute: task)
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
15 | }
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:21:17: warning: capture of 'completion' with non-sendable type '(Result<T, Never>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | return Future { completion in
20 | async {
21 | completion(.success(execute()))
| |- warning: capture of 'completion' with non-sendable type '(Result<T, Never>) -> 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'
22 | }
23 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:21:37: warning: capture of 'execute' with non-sendable type '() -> T' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | return Future { completion in
20 | async {
21 | completion(.success(execute()))
| |- warning: capture of 'execute' with non-sendable type '() -> T' 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'
22 | }
23 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:29:17: warning: capture of 'completion' with non-sendable type '(Result<T, E>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 | return Future { completion in
28 | async {
29 | completion(execute())
| |- warning: capture of 'completion' with non-sendable type '(Result<T, E>) -> 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'
30 | }
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:29:28: warning: capture of 'execute' with non-sendable type '() -> Result<T, E>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 | return Future { completion in
28 | async {
29 | completion(execute())
| |- warning: capture of 'execute' with non-sendable type '() -> Result<T, E>' 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'
30 | }
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:37:17: warning: capture of 'completion' with non-sendable type '(Result<T, Never>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | return Future { completion in
36 | asyncAfter(deadline: deadline) {
37 | completion(.success(execute()))
| |- warning: capture of 'completion' with non-sendable type '(Result<T, Never>) -> 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'
38 | }
39 | }
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/Dispatch+BrightFutures.swift:37:37: warning: capture of 'execute' with non-sendable type '() -> T' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | return Future { completion in
36 | asyncAfter(deadline: deadline) {
37 | completion(.success(execute()))
| |- warning: capture of 'execute' with non-sendable type '() -> T' 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'
38 | }
39 | }
[17/20] Emitting module BrightFutures
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:35:12: warning: let 'immediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
33 |
34 | /// Runs immediately if on the main thread, otherwise asynchronously on the main thread
35 | public let immediateOnMainExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateOnMainExecutionContext' 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
36 | if Thread.isMainThread {
37 | task()
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:39:43: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
33 |
34 | /// Runs immediately if on the main thread, otherwise asynchronously on the main thread
35 | public let immediateOnMainExecutionContext: ExecutionContext = { task in
| `- note: parameter 'task' is implicitly non-sendable
36 | if Thread.isMainThread {
37 | task()
38 | } else {
39 | DispatchQueue.main.async(execute: task)
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
40 | }
41 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:44:12: warning: let 'maxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
42 |
43 | /// From https://github.com/BoltsFramework/Bolts-Swift/blob/5fe4df7acb384a93ad93e8595d42e2b431fdc266/Sources/BoltsSwift/Executor.swift#L56
44 | public let maxStackDepthExecutionContext: ExecutionContext = { task in
| |- warning: let 'maxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'maxStackDepthExecutionContext' 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
45 | struct Static {
46 | static let taskDepthKey = "nl.thomvis.BrightFutures"
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:60:47: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
42 |
43 | /// From https://github.com/BoltsFramework/Bolts-Swift/blob/5fe4df7acb384a93ad93e8595d42e2b431fdc266/Sources/BoltsSwift/Executor.swift#L56
44 | public let maxStackDepthExecutionContext: ExecutionContext = { task in
| `- note: parameter 'task' is implicitly non-sendable
45 | struct Static {
46 | static let taskDepthKey = "nl.thomvis.BrightFutures"
:
58 |
59 | if previousDepth > Static.maxTaskDepth {
60 | DispatchQueue.global().async(execute: task)
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
61 | } else {
62 | localThreadDictionary[Static.taskDepthKey] = previousDepth + 1
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:77:12: warning: let 'ImmediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
75 | // Deprecations
76 | @available(*, deprecated, renamed: "immediateExecutionContext")
77 | public let ImmediateExecutionContext = immediateExecutionContext
| |- warning: let 'ImmediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'ImmediateExecutionContext' 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
78 | @available(*, deprecated, renamed: "immediateOnMainExecutionContext")
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:79:12: warning: let 'ImmediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
77 | public let ImmediateExecutionContext = immediateExecutionContext
78 | @available(*, deprecated, renamed: "immediateOnMainExecutionContext")
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
| |- warning: let 'ImmediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'ImmediateOnMainExecutionContext' 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
80 | @available(*, deprecated, renamed: "maxStackDepthExecutionContext")
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:81:12: warning: let 'MaxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
80 | @available(*, deprecated, renamed: "maxStackDepthExecutionContext")
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
| |- warning: let 'MaxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'MaxStackDepthExecutionContext' 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
82 | @available(*, deprecated, renamed: "defaultContext")
83 | public let DefaultThreadingModel = defaultContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:83:12: warning: let 'DefaultThreadingModel' is not concurrency-safe because non-'Sendable' type '() -> ExecutionContext' (aka '() -> (@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
82 | @available(*, deprecated, renamed: "defaultContext")
83 | public let DefaultThreadingModel = defaultContext
| |- warning: let 'DefaultThreadingModel' is not concurrency-safe because non-'Sendable' type '() -> ExecutionContext' (aka '() -> (@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'DefaultThreadingModel' 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
84 |
[18/20] Compiling BrightFutures ExecutionContext.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:35:12: warning: let 'immediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
33 |
34 | /// Runs immediately if on the main thread, otherwise asynchronously on the main thread
35 | public let immediateOnMainExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateOnMainExecutionContext' 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
36 | if Thread.isMainThread {
37 | task()
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:39:43: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
33 |
34 | /// Runs immediately if on the main thread, otherwise asynchronously on the main thread
35 | public let immediateOnMainExecutionContext: ExecutionContext = { task in
| `- note: parameter 'task' is implicitly non-sendable
36 | if Thread.isMainThread {
37 | task()
38 | } else {
39 | DispatchQueue.main.async(execute: task)
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
40 | }
41 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:44:12: warning: let 'maxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
42 |
43 | /// From https://github.com/BoltsFramework/Bolts-Swift/blob/5fe4df7acb384a93ad93e8595d42e2b431fdc266/Sources/BoltsSwift/Executor.swift#L56
44 | public let maxStackDepthExecutionContext: ExecutionContext = { task in
| |- warning: let 'maxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'maxStackDepthExecutionContext' 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
45 | struct Static {
46 | static let taskDepthKey = "nl.thomvis.BrightFutures"
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:60:47: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
42 |
43 | /// From https://github.com/BoltsFramework/Bolts-Swift/blob/5fe4df7acb384a93ad93e8595d42e2b431fdc266/Sources/BoltsSwift/Executor.swift#L56
44 | public let maxStackDepthExecutionContext: ExecutionContext = { task in
| `- note: parameter 'task' is implicitly non-sendable
45 | struct Static {
46 | static let taskDepthKey = "nl.thomvis.BrightFutures"
:
58 |
59 | if previousDepth > Static.maxTaskDepth {
60 | DispatchQueue.global().async(execute: task)
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
61 | } else {
62 | localThreadDictionary[Static.taskDepthKey] = previousDepth + 1
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:77:12: warning: let 'ImmediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
75 | // Deprecations
76 | @available(*, deprecated, renamed: "immediateExecutionContext")
77 | public let ImmediateExecutionContext = immediateExecutionContext
| |- warning: let 'ImmediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'ImmediateExecutionContext' 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
78 | @available(*, deprecated, renamed: "immediateOnMainExecutionContext")
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:79:12: warning: let 'ImmediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
77 | public let ImmediateExecutionContext = immediateExecutionContext
78 | @available(*, deprecated, renamed: "immediateOnMainExecutionContext")
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
| |- warning: let 'ImmediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'ImmediateOnMainExecutionContext' 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
80 | @available(*, deprecated, renamed: "maxStackDepthExecutionContext")
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:81:12: warning: let 'MaxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
80 | @available(*, deprecated, renamed: "maxStackDepthExecutionContext")
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
| |- warning: let 'MaxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'MaxStackDepthExecutionContext' 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
82 | @available(*, deprecated, renamed: "defaultContext")
83 | public let DefaultThreadingModel = defaultContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:83:12: warning: let 'DefaultThreadingModel' is not concurrency-safe because non-'Sendable' type '() -> ExecutionContext' (aka '() -> (@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
82 | @available(*, deprecated, renamed: "defaultContext")
83 | public let DefaultThreadingModel = defaultContext
| |- warning: let 'DefaultThreadingModel' is not concurrency-safe because non-'Sendable' type '() -> ExecutionContext' (aka '() -> (@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'DefaultThreadingModel' 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
84 |
[19/20] Compiling BrightFutures Future.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:30:12: warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
28 |
29 | /// Immediately executes the given task. No threading, no semaphores.
30 | public let immediateExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateExecutionContext' 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
31 | task()
32 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:35:12: warning: let 'immediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
33 |
34 | /// Runs immediately if on the main thread, otherwise asynchronously on the main thread
35 | public let immediateOnMainExecutionContext: ExecutionContext = { task in
| |- warning: let 'immediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'immediateOnMainExecutionContext' 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
36 | if Thread.isMainThread {
37 | task()
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:39:43: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
33 |
34 | /// Runs immediately if on the main thread, otherwise asynchronously on the main thread
35 | public let immediateOnMainExecutionContext: ExecutionContext = { task in
| `- note: parameter 'task' is implicitly non-sendable
36 | if Thread.isMainThread {
37 | task()
38 | } else {
39 | DispatchQueue.main.async(execute: task)
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
40 | }
41 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:44:12: warning: let 'maxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
42 |
43 | /// From https://github.com/BoltsFramework/Bolts-Swift/blob/5fe4df7acb384a93ad93e8595d42e2b431fdc266/Sources/BoltsSwift/Executor.swift#L56
44 | public let maxStackDepthExecutionContext: ExecutionContext = { task in
| |- warning: let 'maxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'maxStackDepthExecutionContext' 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
45 | struct Static {
46 | static let taskDepthKey = "nl.thomvis.BrightFutures"
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:60:47: warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
42 |
43 | /// From https://github.com/BoltsFramework/Bolts-Swift/blob/5fe4df7acb384a93ad93e8595d42e2b431fdc266/Sources/BoltsSwift/Executor.swift#L56
44 | public let maxStackDepthExecutionContext: ExecutionContext = { task in
| `- note: parameter 'task' is implicitly non-sendable
45 | struct Static {
46 | static let taskDepthKey = "nl.thomvis.BrightFutures"
:
58 |
59 | if previousDepth > Static.maxTaskDepth {
60 | DispatchQueue.global().async(execute: task)
| `- warning: passing non-sendable parameter 'task' to function expecting a @Sendable closure
61 | } else {
62 | localThreadDictionary[Static.taskDepthKey] = previousDepth + 1
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:77:12: warning: let 'ImmediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
75 | // Deprecations
76 | @available(*, deprecated, renamed: "immediateExecutionContext")
77 | public let ImmediateExecutionContext = immediateExecutionContext
| |- warning: let 'ImmediateExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'ImmediateExecutionContext' 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
78 | @available(*, deprecated, renamed: "immediateOnMainExecutionContext")
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:79:12: warning: let 'ImmediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
77 | public let ImmediateExecutionContext = immediateExecutionContext
78 | @available(*, deprecated, renamed: "immediateOnMainExecutionContext")
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
| |- warning: let 'ImmediateOnMainExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'ImmediateOnMainExecutionContext' 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
80 | @available(*, deprecated, renamed: "maxStackDepthExecutionContext")
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:81:12: warning: let 'MaxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
79 | public let ImmediateOnMainExecutionContext = immediateOnMainExecutionContext
80 | @available(*, deprecated, renamed: "maxStackDepthExecutionContext")
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
| |- warning: let 'MaxStackDepthExecutionContext' is not concurrency-safe because non-'Sendable' type 'ExecutionContext' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'MaxStackDepthExecutionContext' 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
82 | @available(*, deprecated, renamed: "defaultContext")
83 | public let DefaultThreadingModel = defaultContext
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/BrightFutures/ExecutionContext.swift:83:12: warning: let 'DefaultThreadingModel' is not concurrency-safe because non-'Sendable' type '() -> ExecutionContext' (aka '() -> (@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
81 | public let MaxStackDepthExecutionContext = maxStackDepthExecutionContext
82 | @available(*, deprecated, renamed: "defaultContext")
83 | public let DefaultThreadingModel = defaultContext
| |- warning: let 'DefaultThreadingModel' is not concurrency-safe because non-'Sendable' type '() -> ExecutionContext' (aka '() -> (@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'DefaultThreadingModel' 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
84 |
[20/20] Compiling BrightFutures SwiftConcurrency+BrightFutures.swift
Build complete! (22.46s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "BrightFutures",
"name" : "BrightFutures",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "BrightFutures",
"targets" : [
"BrightFutures"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "BrightFuturesTests",
"module_type" : "SwiftTarget",
"name" : "BrightFuturesTests",
"path" : "Tests/BrightFuturesTests",
"sources" : [
"BrightFuturesTests.swift",
"ErrorsTests.swift",
"ExecutionContextTests.swift",
"FutureDebugTests.swift",
"InvalidationTokenTests.swift",
"NSOperationQueueTests.swift",
"Number+BrightFutures.swift",
"PromiseTests.swift",
"QueueTests.swift",
"ResultTests.swift",
"SwiftConcurrencyTests.swift"
],
"target_dependencies" : [
"BrightFutures"
],
"type" : "test"
},
{
"c99name" : "BrightFutures",
"module_type" : "SwiftTarget",
"name" : "BrightFutures",
"path" : "Sources/BrightFutures",
"product_memberships" : [
"BrightFutures"
],
"sources" : [
"Async.swift",
"AsyncType+Debug.swift",
"AsyncType+ResultType.swift",
"AsyncType.swift",
"Dispatch+BrightFutures.swift",
"Errors.swift",
"ExecutionContext.swift",
"Future.swift",
"InvalidationToken.swift",
"MutableAsyncType+ResultType.swift",
"MutableAsyncType.swift",
"NSOperationQueue+BrightFutures.swift",
"Promise.swift",
"Result+BrightFutures.swift",
"ResultProtocol.swift",
"SequenceType+BrightFutures.swift",
"SwiftConcurrency+BrightFutures.swift"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
Done.