The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of Futures, reference 1.6.1 (f47a29), with Swift 6.0 for macOS (SPM) on 8 Oct 2024 14:32:15 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.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.55.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/davidask/Futures.git
Reference: 1.6.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/davidask/Futures
 * tag               1.6.1      -> FETCH_HEAD
HEAD is now at f47a292 Rename file, update discard member
Cloned https://github.com/davidask/Futures.git
Revision (git rev-parse @):
f47a292801a7d5c465e91df62da47f7139c77e72
SUCCESS checkout https://github.com/davidask/Futures.git at 1.6.1
========================================
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": "futures",
      "name": "Futures",
      "url": "https://github.com/davidask/Futures.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Futures",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/davidask/Futures.git
[1/972] Fetching futures
Fetched https://github.com/davidask/Futures.git from cache (1.23s)
Creating working copy for https://github.com/davidask/Futures.git
Working copy of https://github.com/davidask/Futures.git resolved at 1.6.1 (f47a292)
warning: '.resolve-product-dependencies': dependency 'futures' 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/davidask/Futures.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.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--4A847ED0836F2485.txt
[3/8] Compiling Futures PromisesExtended.swift
[4/8] Compiling Futures Promise.swift
/Users/admin/builder/spi-builder-workspace/Sources/Futures/DispatchQueue+Futures.swift:6:16: warning: static property 'futures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 |     /// The default queue, on which futures are observed and executed on.
6 |     static var futures = DispatchQueue(label: "com.formbound.future.default", attributes: .concurrent)
  |                |- warning: static property 'futures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  |                |- note: convert 'futures' to a 'let' constant to make 'Sendable' shared state immutable
  |                |- note: annotate 'futures' 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
7 | }
8 |
/Users/admin/builder/spi-builder-workspace/Sources/Futures/Promise.swift:16:17: warning: capture of 'promise' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 14 |     queue.async {
 15 |         do {
 16 |             try promise.fulfill(body())
    |                 `- warning: capture of 'promise' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 17 |         } catch {
 18 |             promise.reject(error)
    :
 94 | ///
 95 | /// - Note: `Future` is the observable value, while `Promise` is the function that sets it.
 96 | public struct Promise<Value> {
    |               `- note: consider making generic struct 'Promise' conform to the 'Sendable' protocol
 97 |
 98 |     /// The future value of this promise.
/Users/admin/builder/spi-builder-workspace/Sources/Futures/Promise.swift:16:33: warning: capture of 'body' with non-sendable type '() throws -> Value' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 14 |     queue.async {
 15 |         do {
 16 |             try promise.fulfill(body())
    |                                 |- warning: capture of 'body' with non-sendable type '() throws -> Value' 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'
 17 |         } catch {
 18 |             promise.reject(error)
/Users/admin/builder/spi-builder-workspace/Sources/Futures/Promise.swift:46:17: warning: capture of 'promise' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 44 |         do {
 45 |             let completion = { (value: Result<Value, Error>) in
 46 |                 promise.resolve(value)
    |                 `- warning: capture of 'promise' with non-sendable type 'Promise<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 47 |             }
 48 |
    :
 94 | ///
 95 | /// - Note: `Future` is the observable value, while `Promise` is the function that sets it.
 96 | public struct Promise<Value> {
    |               `- note: consider making generic struct 'Promise' conform to the 'Sendable' protocol
 97 |
 98 |     /// The future value of this promise.
/Users/admin/builder/spi-builder-workspace/Sources/Futures/Promise.swift:49:17: warning: capture of 'body' with non-sendable type '(@escaping (Result<Value, any Error>) -> Void) throws -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 47 |             }
 48 |
 49 |             try body(completion)
    |                 |- warning: capture of 'body' with non-sendable type '(@escaping (Result<Value, 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'
 50 |         } catch {
 51 |             promise.reject(error)
/Users/admin/builder/spi-builder-workspace/Sources/Futures/Promise.swift:46:17: warning: capture of 'promise' with non-sendable type 'Promise<Value>' in an isolated closure; this is an error in the Swift 6 language mode
 44 |         do {
 45 |             let completion = { (value: Result<Value, Error>) in
 46 |                 promise.resolve(value)
    |                 `- warning: capture of 'promise' with non-sendable type 'Promise<Value>' in an isolated closure; this is an error in the Swift 6 language mode
 47 |             }
 48 |
    :
 94 | ///
 95 | /// - Note: `Future` is the observable value, while `Promise` is the function that sets it.
 96 | public struct Promise<Value> {
    |               `- note: consider making generic struct 'Promise' conform to the 'Sendable' protocol
 97 |
 98 |     /// The future value of this promise.
[5/8] Compiling Futures DispatchQueue+Futures.swift
/Users/admin/builder/spi-builder-workspace/Sources/Futures/DispatchQueue+Futures.swift:6:16: warning: static property 'futures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 |     /// The default queue, on which futures are observed and executed on.
6 |     static var futures = DispatchQueue(label: "com.formbound.future.default", attributes: .concurrent)
  |                |- warning: static property 'futures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  |                |- note: convert 'futures' to a 'let' constant to make 'Sendable' shared state immutable
  |                |- note: annotate 'futures' 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
7 | }
8 |
[6/8] Compiling Futures AnyFuture.swift
[7/8] Compiling Futures Future.swift
/Users/admin/builder/spi-builder-workspace/Sources/Futures/DispatchQueue+Futures.swift:6:16: warning: static property 'futures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 |     /// The default queue, on which futures are observed and executed on.
6 |     static var futures = DispatchQueue(label: "com.formbound.future.default", attributes: .concurrent)
  |                |- warning: static property 'futures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  |                |- note: convert 'futures' to a 'let' constant to make 'Sendable' shared state immutable
  |                |- note: annotate 'futures' 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
7 | }
8 |
/Users/admin/builder/spi-builder-workspace/Sources/Futures/Future.swift:67:13: warning: capture of 'self' with non-sendable type 'FutureObserver<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 39 | /// - `Future<Value>.whenFulfilled()`
 40 | /// - `Future<Value>.whenRejected()`
 41 | public final class FutureObserver<Value>: AnyFutureObserver {
    |                    `- note: generic class 'FutureObserver' does not conform to the 'Sendable' protocol
 42 |
 43 |     private let callback: (Result<Value, Error>) -> Void
    :
 65 |     fileprivate func invoke(_ value: Result<Value, Error>) {
 66 |         queue.async {
 67 |             self.callback(value)
    |             `- warning: capture of 'self' with non-sendable type 'FutureObserver<Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 68 |         }
 69 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Futures/Future.swift:67:27: warning: capture of 'value' with non-sendable type 'Result<Value, any Error>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 39 | /// - `Future<Value>.whenFulfilled()`
 40 | /// - `Future<Value>.whenRejected()`
 41 | public final class FutureObserver<Value>: AnyFutureObserver {
    |                                   `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
 42 |
 43 |     private let callback: (Result<Value, Error>) -> Void
    :
 65 |     fileprivate func invoke(_ value: Result<Value, Error>) {
 66 |         queue.async {
 67 |             self.callback(value)
    |                           `- warning: capture of 'value' with non-sendable type 'Result<Value, any Error>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 68 |         }
 69 |     }
[8/8] Emitting module Futures
/Users/admin/builder/spi-builder-workspace/Sources/Futures/DispatchQueue+Futures.swift:6:16: warning: static property 'futures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 |     /// The default queue, on which futures are observed and executed on.
6 |     static var futures = DispatchQueue(label: "com.formbound.future.default", attributes: .concurrent)
  |                |- warning: static property 'futures' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  |                |- note: convert 'futures' to a 'let' constant to make 'Sendable' shared state immutable
  |                |- note: annotate 'futures' 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
7 | }
8 |
Build complete! (6.88s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Futures",
  "name" : "Futures",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.10"
    },
    {
      "name" : "ios",
      "version" : "8.0"
    },
    {
      "name" : "tvos",
      "version" : "9.0"
    },
    {
      "name" : "watchos",
      "version" : "2.0"
    }
  ],
  "products" : [
    {
      "name" : "Futures",
      "targets" : [
        "Futures"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FuturesTests",
      "module_type" : "SwiftTarget",
      "name" : "FuturesTests",
      "path" : "Tests/FuturesTests",
      "sources" : [
        "FuturesTests.swift"
      ],
      "target_dependencies" : [
        "Futures"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Futures",
      "module_type" : "SwiftTarget",
      "name" : "Futures",
      "path" : "Sources/Futures",
      "product_memberships" : [
        "Futures"
      ],
      "sources" : [
        "AnyFuture.swift",
        "DispatchQueue+Futures.swift",
        "Future.swift",
        "Promise.swift",
        "PromisesExtended.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
Done.