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 Future, reference 1.4.0 (ff9634), with Swift 6.1 for macOS (SPM) on 25 Apr 2025 20:52:36 UTC.

Swift 6 data race errors: 3

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.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.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/kean/Future.git
Reference: 1.4.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/kean/Future
 * tag               1.4.0      -> FETCH_HEAD
HEAD is now at ff9634c Version 1.4.0
Cloned https://github.com/kean/Future.git
Revision (git rev-parse @):
ff9634c819962aa78f7bb360fdae7299d62f1cdc
SUCCESS checkout https://github.com/kean/Future.git at 1.4.0
========================================
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": "future",
      "name": "Future",
      "url": "https://github.com/kean/Future.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Future",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/kean/Future.git
[1/1723] Fetching future
Fetched https://github.com/kean/Future.git from cache (0.84s)
Creating working copy for https://github.com/kean/Future.git
Working copy of https://github.com/kean/Future.git resolved at 1.4.0 (ff9634c)
warning: '.resolve-product-dependencies': dependency 'future' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/kean/Future.git
https://github.com/kean/Future.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Future",
  "name" : "Future",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.13"
    },
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "11.0"
    },
    {
      "name" : "watchos",
      "version" : "4.0"
    }
  ],
  "products" : [
    {
      "name" : "Future",
      "targets" : [
        "Future"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FutureTests",
      "module_type" : "SwiftTarget",
      "name" : "FutureTests",
      "path" : "Tests/FutureTests",
      "sources" : [
        "A+Tests.swift",
        "CancellationTokenTests.swift",
        "Extensions.swift",
        "FutureExtensionsTests.swift",
        "FutureTests.swift",
        "StressTests.swift"
      ],
      "target_dependencies" : [
        "Future"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Future",
      "module_type" : "SwiftTarget",
      "name" : "Future",
      "path" : "Sources",
      "product_memberships" : [
        "Future"
      ],
      "sources" : [
        "CancellationToken.swift",
        "Future.swift",
        "FutureExtensions.swift",
        "FutureOperators.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.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-2F0A5646E1D333AE.txt
[3/7] Compiling Future CancellationToken.swift
[4/7] Emitting module Future
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:292:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
290 |     /// behavior where callbacks attached via `on` method are always called on
291 |     /// the main thread.
292 |     public static var `default` = Scheduler.main
    |                       |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
293 |
294 |     /// If the task finishes on the main thread, the callbacks are executed
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:297:23: warning: static property 'main' is not concurrency-safe because non-'Sendable' type 'ScheduleWork' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
295 |     /// immediately. Otherwise, they are dispatched to be executed
296 |     /// asynchronously on the main thread.
297 |     public static let main: ScheduleWork = { work in
    |                       |- warning: static property 'main' is not concurrency-safe because non-'Sendable' type 'ScheduleWork' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'main' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
298 |         Thread.isMainThread ? work() : DispatchQueue.main.async(execute: work)
299 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:298:74: warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
295 |     /// immediately. Otherwise, they are dispatched to be executed
296 |     /// asynchronously on the main thread.
297 |     public static let main: ScheduleWork = { work in
    |                                              `- note: parameter 'work' is implicitly non-sendable
298 |         Thread.isMainThread ? work() : DispatchQueue.main.async(execute: work)
    |                                                                          `- warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
299 |     }
300 |
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:302:23: warning: static property 'immediate' is not concurrency-safe because non-'Sendable' type 'ScheduleWork' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
300 |
301 |     /// Immediately executes the given closure.
302 |     public static let immediate: ScheduleWork = { work in
    |                       |- warning: static property 'immediate' is not concurrency-safe because non-'Sendable' type 'ScheduleWork' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'immediate' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
303 |         work()
304 |     }
[5/7] Compiling Future FutureOperators.swift
[6/7] Compiling Future FutureExtensions.swift
/Users/admin/builder/spi-builder-workspace/Sources/FutureExtensions.swift:53:13: warning: capture of 'promise' with non-sendable type 'Future<(), Never>.Promise' in a '@Sendable' closure
 51 |         let promise = Promise()
 52 |         queue.asyncAfter(deadline: deadline) {
 53 |             promise.succeed(value: ()) // Never produces an error
    |             `- warning: capture of 'promise' with non-sendable type 'Future<(), Never>.Promise' in a '@Sendable' closure
 54 |         }
 55 |         return promise.future
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:202:24: note: class 'Promise' does not conform to the 'Sendable' protocol
200 |
201 |     /// A promise to provide a result later.
202 |     public final class Promise: CustomDebugStringConvertible {
    |                        `- note: class 'Promise' does not conform to the 'Sendable' protocol
203 |         private var memoizedResult: Result? // nil when pending
204 |         private var inlinedHandler: ((Result) -> Void)?
[7/7] Compiling Future Future.swift
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:292:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
290 |     /// behavior where callbacks attached via `on` method are always called on
291 |     /// the main thread.
292 |     public static var `default` = Scheduler.main
    |                       |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
293 |
294 |     /// If the task finishes on the main thread, the callbacks are executed
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:297:23: warning: static property 'main' is not concurrency-safe because non-'Sendable' type 'ScheduleWork' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
295 |     /// immediately. Otherwise, they are dispatched to be executed
296 |     /// asynchronously on the main thread.
297 |     public static let main: ScheduleWork = { work in
    |                       |- warning: static property 'main' is not concurrency-safe because non-'Sendable' type 'ScheduleWork' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'main' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
298 |         Thread.isMainThread ? work() : DispatchQueue.main.async(execute: work)
299 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:298:74: warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
295 |     /// immediately. Otherwise, they are dispatched to be executed
296 |     /// asynchronously on the main thread.
297 |     public static let main: ScheduleWork = { work in
    |                                              `- note: parameter 'work' is implicitly non-sendable
298 |         Thread.isMainThread ? work() : DispatchQueue.main.async(execute: work)
    |                                                                          `- warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
299 |     }
300 |
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:302:23: warning: static property 'immediate' is not concurrency-safe because non-'Sendable' type 'ScheduleWork' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
300 |
301 |     /// Immediately executes the given closure.
302 |     public static let immediate: ScheduleWork = { work in
    |                       |- warning: static property 'immediate' is not concurrency-safe because non-'Sendable' type 'ScheduleWork' (aka '(@escaping () -> ()) -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'immediate' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
303 |         work()
304 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Future.swift:309:48: warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
306 |     /// Runs asynchronously on the given queue.
307 |     public static func async(on queue: DispatchQueue, flags: DispatchWorkItemFlags = []) -> ScheduleWork {
308 |         return { work in
    |                  `- note: parameter 'work' is implicitly non-sendable
309 |             queue.async(flags: flags, execute: work)
    |                                                `- warning: passing non-sendable parameter 'work' to function expecting a @Sendable closure
310 |         }
311 |     }
Build complete! (4.52s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Future",
  "name" : "Future",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.13"
    },
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "11.0"
    },
    {
      "name" : "watchos",
      "version" : "4.0"
    }
  ],
  "products" : [
    {
      "name" : "Future",
      "targets" : [
        "Future"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FutureTests",
      "module_type" : "SwiftTarget",
      "name" : "FutureTests",
      "path" : "Tests/FutureTests",
      "sources" : [
        "A+Tests.swift",
        "CancellationTokenTests.swift",
        "Extensions.swift",
        "FutureExtensionsTests.swift",
        "FutureTests.swift",
        "StressTests.swift"
      ],
      "target_dependencies" : [
        "Future"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Future",
      "module_type" : "SwiftTarget",
      "name" : "Future",
      "path" : "Sources",
      "product_memberships" : [
        "Future"
      ],
      "sources" : [
        "CancellationToken.swift",
        "Future.swift",
        "FutureExtensions.swift",
        "FutureOperators.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.