This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

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 with Swift 6.0 for macOS (SPM).

Swift 6 data race errors: 3

Build Command

env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/DingSoung/Network.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/DingSoung/Network
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 056f558 chore: update version
Cloned https://github.com/DingSoung/Network.git
Revision (git rev-parse @):
056f5583bf520ebf3caf57525fc9698040c2d01b
SUCCESS checkout https://github.com/DingSoung/Network.git at master
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/DingSoung/Network.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-6F35C1178C84523A.txt
[4/58] Emitting module Extension
[5/64] Compiling Extension NSString+Size.swift
[6/64] Compiling Extension UIApplication+EventTrack.swift
[7/64] Compiling Extension UIControl+Event.swift
[8/64] Compiling Extension UIFont+SymbolicTraits.swift
[9/64] Compiling Extension UINavigationController+Autorotate.swift
[10/64] Compiling Extension UIResponder+Keyboard.swift
[11/64] Compiling Extension UITableView+UIImage.swift
[12/64] Compiling Extension UILabel+chainable.swift
[13/64] Compiling Extension UIView+chainable.swift
[14/64] Compiling Extension WKWebView+contentView.swift
[15/64] Compiling Extension WKWebView+input.swift
[16/64] Compiling Extension WKWebView+registerScheme.swift
[17/64] Compiling Extension Color+components.swift
[18/64] Compiling Extension Color+css.swift
[19/64] Compiling Extension Color+hex.swift
[20/64] Compiling Extension Color+rgba.swift
[21/64] Compiling Extension Color.swift
[22/64] Compiling Extension Image+CoreGraphics.swift
[23/64] Compiling Extension ApplicationMainDelegate.swift
[24/64] Compiling Extension Array+UIImage.swift
[25/64] Compiling Extension CGRect+Float.swift
[26/64] Compiling Extension CGSize+Float.swift
[27/64] Compiling Extension CGpoint+Float.swift
[28/64] Compiling Extension NSAttributedString+Content.swift
[29/64] Compiling Extension Data+MIMEType.swift
[30/64] Compiling Extension Dictionary+MIMEType.swift
[31/64] Compiling Extension HTTPCookieStorage+setCookie.swift
[32/64] Compiling Extension KeyChain.swift
[33/64] Compiling Extension Locale+Localization.swift
[34/64] Compiling Extension SCNetworkReachability+flags.swift
[35/64] Compiling Extension SCNetworkReachability+new.swift
[36/64] Compiling Extension SCNetworkReachability+update.swift
[37/64] Compiling Extension String+Dictionary.swift
[38/64] Compiling Extension String+URLEscaped.swift
[39/64] Compiling Extension String+base64.swift
[40/64] Compiling Extension URL+Cookie.swift
[41/64] Compiling Extension URL+String.swift
[42/64] Compiling Extension URL+query.swift
[43/64] Compiling Extension UserDefaults+Codable.swift
[44/64] Compiling Extension UserDefaults+subscript.swift
[45/64] Compiling Extension NSAttribute+chainable.swift
[46/64] Compiling Extension Float+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 DispatchQueue+once.swift
[54/64] Compiling Extension Array+JSON.swift
[55/64] Compiling Extension Array+cookieString.swift
[56/64] Compiling Extension Bundle+Localization.swift
[57/64] Compiling Extension CFAbsoluteTime+init.swift
[58/64] Compiling Extension CGFloat+String.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; this is an error in the Swift 6 language mode
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; this is an error in the Swift 6 language mode
   |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
13 |                 return
14 |             }
[66/73] Compiling Network URLSessionConfiguration+Init.swift
[67/73] Compiling Network URLRequest+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; this is an error in the Swift 6 language mode
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; this is an error in the Swift 6 language mode
   |                     `- 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 HTTPMethod.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: annotate 'shared' 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
 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 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: annotate 'shared' 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
 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; this is an error in the Swift 6 language mode
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; this is an error in the Swift 6 language mode
   |                                      `- 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; this is an error in the Swift 6 language mode
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; this is an error in the Swift 6 language mode
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; this is an error in the Swift 6 language mode
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; this is an error in the Swift 6 language mode
   |                                      `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
39 |             }
40 |         })
[73/73] Compiling Network MIMEType.swift
Build complete! (26.85s)
Fetching https://github.com/DingSoung/Extension
[1/2590] Fetching extension
Fetched https://github.com/DingSoung/Extension from cache (1.18s)
Creating working copy for https://github.com/DingSoung/Extension
Working copy of https://github.com/DingSoung/Extension resolved at master (717eb06)
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.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.