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 Resourceful, reference main (d97d6d), with Swift 6.0 for macOS (SPM) on 28 Nov 2024 14:23:38 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 -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures

Build Log

========================================
RunAll
========================================
Builder version: 4.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/danielctull/Resourceful.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/danielctull/Resourceful
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at d97d6d4 Add a check for the swift version to make sure it supports concurrency
Cloned https://github.com/danielctull/Resourceful.git
Revision (git rev-parse @):
d97d6d4798dd3de1097496b07f92b967ded8b783
SUCCESS checkout https://github.com/danielctull/Resourceful.git at main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
  "identity": ".resolve-product-dependencies",
  "name": "resolve-dependencies",
  "url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "version": "unspecified",
  "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "dependencies": [
    {
      "identity": "resourceful",
      "name": "Resourceful",
      "url": "https://github.com/danielctull/Resourceful.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Resourceful",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/danielctull/Resourceful.git
[1/457] Fetching resourceful
Fetched https://github.com/danielctull/Resourceful.git from cache (0.80s)
Creating working copy for https://github.com/danielctull/Resourceful.git
Working copy of https://github.com/danielctull/Resourceful.git resolved at main (d97d6d4)
warning: '.resolve-product-dependencies': dependency 'resourceful' 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/danielctull/Resourceful.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/7] Compiling Resourceful Resource.swift
[4/7] Compiling Resourceful Resource+Combine.swift
[5/7] Compiling Resourceful Resource+Async.swift
/Users/admin/builder/spi-builder-workspace/Sources/Resourceful/Resource+Async.swift:22:54: warning: converting a value of type '@Sendable (__shared sending Result<Value, any Error>) -> ()' to type '(Result<Value, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
20 |     public func value<Value>(for resource: Resource<Value>) async throws -> Value {
21 |         try await withUnsafeThrowingContinuation { continuation in
22 |             fetch(resource, completion: continuation.resume)
   |                                                      |- warning: converting a value of type '@Sendable (__shared sending Result<Value, any Error>) -> ()' to type '(Result<Value, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
   |                                                      `- note: converting a function typed value with a sending parameter to one without risks allowing actor-isolated values to escape their isolation domain as an argument to an invocation of value
23 |         }
24 |     }
[6/7] Emitting module Resourceful
[7/7] Compiling Resourceful Resource+Fetch.swift
/Users/admin/builder/spi-builder-workspace/Sources/Resourceful/Resource+Fetch.swift:30:21: warning: capture of 'completion' with non-sendable type '(Result<Value, any Error>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
28 |                 let value = Result { try resource.transform(result.get()) }
29 |                 queue.async {
30 |                     completion(value)
   |                     |- warning: capture of 'completion' with non-sendable type '(Result<Value, any Error>) -> 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'
31 |                 }
32 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Resourceful/Resource+Fetch.swift:30:32: 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
17 |     ///   - completion: Completion handler with the result.
18 |     @discardableResult
19 |     public func fetch<Value>(
   |                       `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
20 |         _ resource: Resource<Value>,
21 |         callbackQueue queue: DispatchQueue = .main,
   :
28 |                 let value = Result { try resource.transform(result.get()) }
29 |                 queue.async {
30 |                     completion(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
31 |                 }
32 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Resourceful/Resource+Fetch.swift:35:17: warning: capture of 'completion' with non-sendable type '(Result<Value, any Error>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |         } catch {
34 |             queue.async {
35 |                 completion(.failure(error))
   |                 |- warning: capture of 'completion' with non-sendable type '(Result<Value, any Error>) -> 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'
36 |             }
37 |             return URLSessionDataTask()
/Users/admin/builder/spi-builder-workspace/Sources/Resourceful/Resource+Fetch.swift:50:17: warning: capture of 'completion' with non-sendable type '(Result<(Data, URLResponse), URLError>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
48 |             guard let data = data, let response = response else {
49 |                 let error = (error as? URLError) ?? URLError(.unknown)
50 |                 completion(.failure(error))
   |                 |- warning: capture of 'completion' with non-sendable type '(Result<(Data, URLResponse), URLError>) -> 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'
51 |                 return
52 |             }
Build complete! (6.66s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Resourceful",
  "name" : "Resourceful",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Resourceful",
      "targets" : [
        "Resourceful"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "ResourcefulTests",
      "module_type" : "SwiftTarget",
      "name" : "ResourcefulTests",
      "path" : "Tests/ResourcefulTests",
      "sources" : [
        "AsyncTests.swift",
        "CombineTests.swift",
        "FetchTests.swift",
        "Helper.swift",
        "ResourceTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "Resourceful"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Resourceful",
      "module_type" : "SwiftTarget",
      "name" : "Resourceful",
      "path" : "Sources/Resourceful",
      "product_memberships" : [
        "Resourceful"
      ],
      "sources" : [
        "Resource+Async.swift",
        "Resource+Combine.swift",
        "Resource+Fetch.swift",
        "Resource.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.