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 Network, reference master (056f55), with Swift 6.1 for macOS (SPM) on 24 Apr 2025 08:52:59 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.60.2-13-gb0b1f23
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/song-usa/Network.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/song-usa/Network
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 056f558 chore: update version
Cloned https://github.com/song-usa/Network.git
Revision (git rev-parse @):
056f5583bf520ebf3caf57525fc9698040c2d01b
SUCCESS checkout https://github.com/song-usa/Network.git at master
Fetching https://github.com/DingSoung/Extension
[1/2590] Fetching extension
Fetched https://github.com/DingSoung/Extension from cache (1.01s)
Creating working copy for https://github.com/DingSoung/Extension
Working copy of https://github.com/DingSoung/Extension resolved at master (717eb06)
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
Fetching https://github.com/song-usa/Network.git
[1/844] Fetching network
Fetched https://github.com/song-usa/Network.git from cache (0.81s)
Fetching https://github.com/DingSoung/Extension from cache
Fetched https://github.com/DingSoung/Extension from cache (0.42s)
error: could not find a branch named ‘master’ in https://github.com/DingSoung/Extension (did you mean ‘main’?)
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/song-usa/Network.git
https://github.com/song-usa/Network.git
{
  "dependencies" : [
    {
      "identity" : "extension",
      "requirement" : {
        "branch" : [
          "master"
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/DingSoung/Extension"
    }
  ],
  "manifest_display_name" : "Network",
  "name" : "Network",
  "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" : "Network",
      "targets" : [
        "Network"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "Network",
      "module_type" : "SwiftTarget",
      "name" : "Network",
      "path" : "Sources",
      "product_dependencies" : [
        "Extension"
      ],
      "product_memberships" : [
        "Network"
      ],
      "sources" : [
        "HTTPMethod.swift",
        "MIMEType.swift",
        "Network.swift",
        "NetworkError.swift",
        "URLRequest+Init.swift",
        "URLRequest+dataTask.swift",
        "URLRequest+downloadTask.swift",
        "URLSessionConfiguration+Init.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/3] Write sources
[2/3] Write swift-version-2F0A5646E1D333AE.txt
[4/58] Emitting module Extension
[5/64] Compiling Extension Color+components.swift
[6/64] Compiling Extension Color+css.swift
[7/64] Compiling Extension Color+hex.swift
[8/64] Compiling Extension Color+rgba.swift
[9/64] Compiling Extension Color.swift
[10/64] Compiling Extension Image+CoreGraphics.swift
[11/64] Compiling Extension NSString+Size.swift
[12/64] Compiling Extension UIApplication+EventTrack.swift
[13/64] Compiling Extension UIControl+Event.swift
[14/64] Compiling Extension UIFont+SymbolicTraits.swift
[15/64] Compiling Extension UINavigationController+Autorotate.swift
[16/64] Compiling Extension UIResponder+Keyboard.swift
[17/64] Compiling Extension UITableView+UIImage.swift
[18/64] Compiling Extension UILabel+chainable.swift
[19/64] Compiling Extension UIView+chainable.swift
[20/64] Compiling Extension WKWebView+contentView.swift
[21/64] Compiling Extension WKWebView+input.swift
[22/64] Compiling Extension WKWebView+registerScheme.swift
[23/64] Compiling Extension URL+String.swift
[24/64] Compiling Extension URL+query.swift
[25/64] Compiling Extension UserDefaults+Codable.swift
[26/64] Compiling Extension UserDefaults+subscript.swift
[27/64] Compiling Extension NSAttribute+chainable.swift
[28/64] Compiling Extension Float+String.swift
[29/64] Compiling Extension SCNetworkReachability+new.swift
[30/64] Compiling Extension SCNetworkReachability+update.swift
[31/64] Compiling Extension String+Dictionary.swift
[32/64] Compiling Extension String+URLEscaped.swift
[33/64] Compiling Extension String+base64.swift
[34/64] Compiling Extension URL+Cookie.swift
[35/64] Compiling Extension ApplicationMainDelegate.swift
[36/64] Compiling Extension Array+UIImage.swift
[37/64] Compiling Extension CGRect+Float.swift
[38/64] Compiling Extension CGSize+Float.swift
[39/64] Compiling Extension CGpoint+Float.swift
[40/64] Compiling Extension NSAttributedString+Content.swift
[41/64] Compiling Extension DispatchQueue+once.swift
[42/64] Compiling Extension Array+JSON.swift
[43/64] Compiling Extension Array+cookieString.swift
[44/64] Compiling Extension Bundle+Localization.swift
[45/64] Compiling Extension CFAbsoluteTime+init.swift
[46/64] Compiling Extension CGFloat+String.swift
[47/64] Compiling Extension Image+Process.swift
[48/64] Compiling Extension Image+pdf.swift
[49/64] Compiling Extension Image.swift
[50/64] Compiling Extension VIew+UIImage.swift
[51/64] Compiling Extension View.swift
[52/64] Compiling Extension runtime.swift
[53/64] Compiling Extension Data+MIMEType.swift
[54/64] Compiling Extension Dictionary+MIMEType.swift
[55/64] Compiling Extension HTTPCookieStorage+setCookie.swift
[56/64] Compiling Extension KeyChain.swift
[57/64] Compiling Extension Locale+Localization.swift
[58/64] Compiling Extension SCNetworkReachability+flags.swift
[59/64] Compiling Extension Int+String.swift
[60/64] Compiling Extension String+regex.swift
[61/64] Compiling Extension Swift+Association.swift
[62/64] Compiling Extension Swift+closuer.swift
[63/64] Compiling Extension Swift+log.swift
[64/64] Compiling Extension Swift+synchronized.swift
[65/73] Compiling Network URLRequest+downloadTask.swift
/Users/admin/builder/spi-builder-workspace/Sources/URLRequest+downloadTask.swift:12:17: warning: capture of 'completion' with non-sendable type '(Data?, URLResponse?, (any Error)?) -> Void' in a '@Sendable' closure
10 |         let task = session.downloadTask(with: self) { (url, response, error) in
11 |             guard let url = url else {
12 |                 completion(nil, response, error)
   |                 |- warning: capture of 'completion' with non-sendable type '(Data?, URLResponse?, (any Error)?) -> Void' in a '@Sendable' closure
   |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
13 |                 return
14 |             }
[66/73] Compiling Network MIMEType.swift
[67/73] Compiling Network URLSessionConfiguration+Init.swift
[68/73] Compiling Network URLRequest+dataTask.swift
/Users/admin/builder/spi-builder-workspace/Sources/URLRequest+dataTask.swift:14:21: warning: capture of 'completion' with non-sendable type '(Any?, URLResponse?, (any Error)?) -> Void' in a '@Sendable' closure
12 |                 if let data = data {
13 |                     let json = try JSONSerialization.jsonObject(with: data)
14 |                     completion(json, response, error)
   |                     |- warning: capture of 'completion' with non-sendable type '(Any?, URLResponse?, (any Error)?) -> Void' in a '@Sendable' closure
   |                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
15 |                 } else {
16 |                     completion(data, response, error)
[69/73] Compiling Network NetworkError.swift
[70/73] Compiling Network URLRequest+Init.swift
[71/73] Emitting module Network
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' may have shared mutable state; this is an error in the Swift 6 language mode
 4 | import Foundation
 5 |
 6 | @objcMembers public final class Network: NSObject {
   |                                 `- note: class 'Network' does not conform to the 'Sendable' protocol
 7 |     public static let shared = Network()
   |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 8 |     fileprivate override init() {}
 9 |     deinit {}
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:45:19: warning: non-final class 'SessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
43 |
44 | extension Network {
45 |     private class SessionDelegate: NSObject, URLSessionDelegate {
   |                   `- warning: non-final class 'SessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
46 |         var sslPinning: Data?
47 |         /// MARK: URLSessionDelegate
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:46:13: warning: stored property 'sslPinning' of 'Sendable'-conforming class 'SessionDelegate' is mutable; this is an error in the Swift 6 language mode
44 | extension Network {
45 |     private class SessionDelegate: NSObject, URLSessionDelegate {
46 |         var sslPinning: Data?
   |             `- warning: stored property 'sslPinning' of 'Sendable'-conforming class 'SessionDelegate' is mutable; this is an error in the Swift 6 language mode
47 |         /// MARK: URLSessionDelegate
48 |         func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) {}
[72/73] Compiling Network HTTPMethod.swift
[73/73] Compiling Network Network.swift
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:7:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' may have shared mutable state; this is an error in the Swift 6 language mode
 4 | import Foundation
 5 |
 6 | @objcMembers public final class Network: NSObject {
   |                                 `- note: class 'Network' does not conform to the 'Sendable' protocol
 7 |     public static let shared = Network()
   |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 8 |     fileprivate override init() {}
 9 |     deinit {}
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:45:19: warning: non-final class 'SessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
43 |
44 | extension Network {
45 |     private class SessionDelegate: NSObject, URLSessionDelegate {
   |                   `- warning: non-final class 'SessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
46 |         var sslPinning: Data?
47 |         /// MARK: URLSessionDelegate
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:46:13: warning: stored property 'sslPinning' of 'Sendable'-conforming class 'SessionDelegate' is mutable; this is an error in the Swift 6 language mode
44 | extension Network {
45 |     private class SessionDelegate: NSObject, URLSessionDelegate {
46 |         var sslPinning: Data?
   |             `- warning: stored property 'sslPinning' of 'Sendable'-conforming class 'SessionDelegate' is mutable; this is an error in the Swift 6 language mode
47 |         /// MARK: URLSessionDelegate
48 |         func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) {}
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:36:38: warning: capture of 'completion' with non-sendable type '(T?, (any Error)?) -> Void' in a '@Sendable' closure
34 |         return request.dataTask(session: Network.shared.session, completion: { (obj, _, error) in
35 |             if let dict = obj as? [String: Any], let json = trasnform(dict) {
36 |                 queue.addOperation { completion(json, nil) }
   |                                      |- warning: capture of 'completion' with non-sendable type '(T?, (any Error)?) -> Void' in a '@Sendable' closure
   |                                      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
37 |             } else {
38 |                 queue.addOperation { completion(nil, error ?? NetworkError(code: .notJSON)) }
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:36:49: warning: capture of 'json' with non-sendable type 'T' in a '@Sendable' closure
28 |
29 | extension Network {
30 |     @discardableResult public class func json<T>(request: URLRequest,
   |                                               `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
31 |                                                  queue: OperationQueue = Network.shared.completionQueue,
32 |                                                  trasnform: @escaping ([String: Any]) -> T?,
   :
34 |         return request.dataTask(session: Network.shared.session, completion: { (obj, _, error) in
35 |             if let dict = obj as? [String: Any], let json = trasnform(dict) {
36 |                 queue.addOperation { completion(json, nil) }
   |                                                 `- warning: capture of 'json' with non-sendable type 'T' in a '@Sendable' closure
37 |             } else {
38 |                 queue.addOperation { completion(nil, error ?? NetworkError(code: .notJSON)) }
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:38:38: warning: capture of 'completion' with non-sendable type '(T?, (any Error)?) -> Void' in a '@Sendable' closure
36 |                 queue.addOperation { completion(json, nil) }
37 |             } else {
38 |                 queue.addOperation { completion(nil, error ?? NetworkError(code: .notJSON)) }
   |                                      |- warning: capture of 'completion' with non-sendable type '(T?, (any Error)?) -> Void' in a '@Sendable' closure
   |                                      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
39 |             }
40 |         })
Build complete! (7.13s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "extension",
      "requirement" : {
        "branch" : [
          "master"
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/DingSoung/Extension"
    }
  ],
  "manifest_display_name" : "Network",
  "name" : "Network",
  "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" : "Network",
      "targets" : [
        "Network"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "Network",
      "module_type" : "SwiftTarget",
      "name" : "Network",
      "path" : "Sources",
      "product_dependencies" : [
        "Extension"
      ],
      "product_memberships" : [
        "Network"
      ],
      "sources" : [
        "HTTPMethod.swift",
        "MIMEType.swift",
        "Network.swift",
        "NetworkError.swift",
        "URLRequest+Init.swift",
        "URLRequest+dataTask.swift",
        "URLRequest+downloadTask.swift",
        "URLSessionConfiguration+Init.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.