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 PromiseQ, reference master (539a98), with Swift 6.0 for macOS (SPM) on 28 Nov 2024 06:09:52 UTC.

Swift 6 data race errors: 6

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/ikhvorost/PromiseQ.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/ikhvorost/PromiseQ
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 539a987 Readme: added isCancelled, new await
Cloned https://github.com/ikhvorost/PromiseQ.git
Revision (git rev-parse @):
539a987b5a74da758d1a4d245af5551ee1e35282
SUCCESS checkout https://github.com/ikhvorost/PromiseQ.git at master
========================================
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": "promiseq",
      "name": "PromiseQ",
      "url": "https://github.com/ikhvorost/PromiseQ.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/PromiseQ",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/ikhvorost/PromiseQ.git
[1/716] Fetching promiseq
Fetched https://github.com/ikhvorost/PromiseQ.git from cache (0.75s)
Creating working copy for https://github.com/ikhvorost/PromiseQ.git
Working copy of https://github.com/ikhvorost/PromiseQ.git resolved at master (539a987)
warning: '.resolve-product-dependencies': dependency 'promiseq' 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/ikhvorost/PromiseQ.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/6] Compiling PromiseQ PromiseQ.swift
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/PromiseQ.swift:56:24: warning: passing non-sendable parameter 'f' to function expecting a @Sendable closure
  49 | }
  50 |
  51 | private func execute(_ queue: DispatchQueue, f: @escaping () -> Void) {
     |                                              `- note: parameter 'f' is implicitly non-sendable
  52 | 	if queue.label == String(cString: __dispatch_queue_get_label(nil)) {
  53 | 		f()
  54 | 	}
  55 | 	else {
  56 | 		queue.async(execute: f)
     |                        `- warning: passing non-sendable parameter 'f' to function expecting a @Sendable closure
  57 | 	}
  58 | }
[4/6] Emitting module PromiseQ
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:60:1: warning: extension declares a conformance of imported type 'String' to imported protocols 'LocalizedError', 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
 58 |
 59 | /// String errors
 60 | extension String : LocalizedError {
    | |- warning: extension declares a conformance of imported type 'String' to imported protocols 'LocalizedError', 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
    | `- note: add '@retroactive' to silence this warning
 61 | 	/// A localized message describing what error occurred.
 62 | 	public var errorDescription: String? { return self }
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:309:15: warning: non-final class 'SessionDownloadDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
307 | public typealias Progress = (_ task: URLSessionTask, _ bytes: Int64, _ totalBytes: Int64) -> Void
308 |
309 | private class SessionDownloadDelegate: NSObject, URLSessionDownloadDelegate {
    |               `- warning: non-final class 'SessionDownloadDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
310 | 	let resolve: (HTTPResponse) -> Void
311 | 	let reject: (Error) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:310:6: warning: stored property 'resolve' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type '(HTTPResponse) -> Void'; this is an error in the Swift 6 language mode
308 |
309 | private class SessionDownloadDelegate: NSObject, URLSessionDownloadDelegate {
310 | 	let resolve: (HTTPResponse) -> Void
    |      |- warning: stored property 'resolve' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type '(HTTPResponse) -> Void'; this is an error in the Swift 6 language mode
    |      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
311 | 	let reject: (Error) -> Void
312 | 	let progress: Progress?
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:311:6: warning: stored property 'reject' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type '(any Error) -> Void'; this is an error in the Swift 6 language mode
309 | private class SessionDownloadDelegate: NSObject, URLSessionDownloadDelegate {
310 | 	let resolve: (HTTPResponse) -> Void
311 | 	let reject: (Error) -> Void
    |      |- warning: stored property 'reject' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type '(any Error) -> Void'; this is an error in the Swift 6 language mode
    |      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
312 | 	let progress: Progress?
313 |
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:312:6: warning: stored property 'progress' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type 'Progress?' (aka 'Optional<(URLSessionTask, Int64, Int64) -> ()>'); this is an error in the Swift 6 language mode
310 | 	let resolve: (HTTPResponse) -> Void
311 | 	let reject: (Error) -> Void
312 | 	let progress: Progress?
    |      |- warning: stored property 'progress' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type 'Progress?' (aka 'Optional<(URLSessionTask, Int64, Int64) -> ()>'); this is an error in the Swift 6 language mode
    |      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
313 |
314 | 	init(resolve: @escaping (HTTPResponse) -> Void, reject: @escaping (Error) -> Void, progress: Progress?) {
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:392:15: warning: non-final class 'SessionTaskDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
390 | // MARK: - Upload
391 |
392 | private class SessionTaskDelegate: NSObject, URLSessionTaskDelegate {
    |               `- warning: non-final class 'SessionTaskDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
393 | 	let progress: Progress?
394 |
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:393:6: warning: stored property 'progress' of 'Sendable'-conforming class 'SessionTaskDelegate' has non-sendable type 'Progress?' (aka 'Optional<(URLSessionTask, Int64, Int64) -> ()>'); this is an error in the Swift 6 language mode
391 |
392 | private class SessionTaskDelegate: NSObject, URLSessionTaskDelegate {
393 | 	let progress: Progress?
    |      |- warning: stored property 'progress' of 'Sendable'-conforming class 'SessionTaskDelegate' has non-sendable type 'Progress?' (aka 'Optional<(URLSessionTask, Int64, Int64) -> ()>'); this is an error in the Swift 6 language mode
    |      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
394 |
395 | 	init(progress: Progress?) {
[5/6] Compiling PromiseQ Fetch.swift
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:60:1: warning: extension declares a conformance of imported type 'String' to imported protocols 'LocalizedError', 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
 58 |
 59 | /// String errors
 60 | extension String : LocalizedError {
    | |- warning: extension declares a conformance of imported type 'String' to imported protocols 'LocalizedError', 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
    | `- note: add '@retroactive' to silence this warning
 61 | 	/// A localized message describing what error occurred.
 62 | 	public var errorDescription: String? { return self }
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:309:15: warning: non-final class 'SessionDownloadDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
307 | public typealias Progress = (_ task: URLSessionTask, _ bytes: Int64, _ totalBytes: Int64) -> Void
308 |
309 | private class SessionDownloadDelegate: NSObject, URLSessionDownloadDelegate {
    |               `- warning: non-final class 'SessionDownloadDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
310 | 	let resolve: (HTTPResponse) -> Void
311 | 	let reject: (Error) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:310:6: warning: stored property 'resolve' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type '(HTTPResponse) -> Void'; this is an error in the Swift 6 language mode
308 |
309 | private class SessionDownloadDelegate: NSObject, URLSessionDownloadDelegate {
310 | 	let resolve: (HTTPResponse) -> Void
    |      |- warning: stored property 'resolve' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type '(HTTPResponse) -> Void'; this is an error in the Swift 6 language mode
    |      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
311 | 	let reject: (Error) -> Void
312 | 	let progress: Progress?
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:311:6: warning: stored property 'reject' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type '(any Error) -> Void'; this is an error in the Swift 6 language mode
309 | private class SessionDownloadDelegate: NSObject, URLSessionDownloadDelegate {
310 | 	let resolve: (HTTPResponse) -> Void
311 | 	let reject: (Error) -> Void
    |      |- warning: stored property 'reject' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type '(any Error) -> Void'; this is an error in the Swift 6 language mode
    |      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
312 | 	let progress: Progress?
313 |
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:312:6: warning: stored property 'progress' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type 'Progress?' (aka 'Optional<(URLSessionTask, Int64, Int64) -> ()>'); this is an error in the Swift 6 language mode
310 | 	let resolve: (HTTPResponse) -> Void
311 | 	let reject: (Error) -> Void
312 | 	let progress: Progress?
    |      |- warning: stored property 'progress' of 'Sendable'-conforming class 'SessionDownloadDelegate' has non-sendable type 'Progress?' (aka 'Optional<(URLSessionTask, Int64, Int64) -> ()>'); this is an error in the Swift 6 language mode
    |      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
313 |
314 | 	init(resolve: @escaping (HTTPResponse) -> Void, reject: @escaping (Error) -> Void, progress: Progress?) {
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:392:15: warning: non-final class 'SessionTaskDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
390 | // MARK: - Upload
391 |
392 | private class SessionTaskDelegate: NSObject, URLSessionTaskDelegate {
    |               `- warning: non-final class 'SessionTaskDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
393 | 	let progress: Progress?
394 |
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:393:6: warning: stored property 'progress' of 'Sendable'-conforming class 'SessionTaskDelegate' has non-sendable type 'Progress?' (aka 'Optional<(URLSessionTask, Int64, Int64) -> ()>'); this is an error in the Swift 6 language mode
391 |
392 | private class SessionTaskDelegate: NSObject, URLSessionTaskDelegate {
393 | 	let progress: Progress?
    |      |- warning: stored property 'progress' of 'Sendable'-conforming class 'SessionTaskDelegate' has non-sendable type 'Progress?' (aka 'Optional<(URLSessionTask, Int64, Int64) -> ()>'); this is an error in the Swift 6 language mode
    |      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
394 |
395 | 	init(progress: Progress?) {
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:192:6: warning: capture of 'reject' with non-sendable type '(any Error) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
190 | 			task = self.dataTask(with: request) { data, response, error in
191 | 				guard error == nil else {
192 | 					reject(error!)
    |      |- warning: capture of 'reject' with non-sendable type '(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'
193 | 					return
194 | 				}
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:197:5: warning: capture of 'resolve' with non-sendable type '(HTTPResponse) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
195 |
196 | 				assert(data != nil)
197 | 				resolve(HTTPResponse(response: response as! HTTPURLResponse, result: .data(data!)))
    |     |- warning: capture of 'resolve' with non-sendable type '(HTTPResponse) -> 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'
198 | 			}
199 | 			task?.resume()
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:433:78: warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
431 |
432 | 				task = file != nil
433 | 					? session.uploadTask(with: request, fromFile: file!, completionHandler: completion)
    |                                                                              `- warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
434 | 					: session.uploadTask(with: request, from: data, completionHandler: completion)
435 | 				task?.resume()
/Users/admin/builder/spi-builder-workspace/Sources/PromiseQ/Fetch.swift:434:73: warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
432 | 				task = file != nil
433 | 					? session.uploadTask(with: request, fromFile: file!, completionHandler: completion)
434 | 					: session.uploadTask(with: request, from: data, completionHandler: completion)
    |                                                                         `- warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
435 | 				task?.resume()
436 | 			}
[6/6] Compiling PromiseQ Monitor.swift
Build complete! (7.62s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "PromiseQ",
  "name" : "PromiseQ",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "9.0"
    },
    {
      "name" : "macos",
      "version" : "10.10"
    },
    {
      "name" : "tvos",
      "version" : "9.0"
    },
    {
      "name" : "watchos",
      "version" : "2.0"
    }
  ],
  "products" : [
    {
      "name" : "PromiseQ",
      "targets" : [
        "PromiseQ"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "PromiseQTests",
      "module_type" : "SwiftTarget",
      "name" : "PromiseQTests",
      "path" : "Tests/PromiseQTests",
      "sources" : [
        "PromiseQTests.swift"
      ],
      "target_dependencies" : [
        "PromiseQ"
      ],
      "type" : "test"
    },
    {
      "c99name" : "PromiseQ",
      "module_type" : "SwiftTarget",
      "name" : "PromiseQ",
      "path" : "Sources/PromiseQ",
      "product_memberships" : [
        "PromiseQ"
      ],
      "sources" : [
        "Fetch.swift",
        "Monitor.swift",
        "PromiseQ.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Done.