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 Apic, reference 5.1.1 (0ac166), with Swift 6.0 for macOS (SPM) on 8 Jul 2024 10:32:05 UTC.

Swift 6 data race errors: 4

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Beta.2.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.45.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/JuanjoArreola/Apic.git
Reference: 5.1.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/JuanjoArreola/Apic
 * tag               5.1.1      -> FETCH_HEAD
HEAD is now at 0ac166a Added public constructors to ResponseContainer
Cloned https://github.com/JuanjoArreola/Apic.git
Revision (git rev-parse @):
0ac166aace6d08c4d2ec9012b82f0b1b09795978
SUCCESS checkout https://github.com/JuanjoArreola/Apic.git at 5.1.1
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/JuanjoArreola/Apic.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Beta.2.app xcrun 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--14728B76ED507284.txt
[4/13] Compiling AsyncRequest RequestError.swift
[5/13] Emitting module AsyncRequest
[6/13] Compiling AsyncRequest Cancellable.swift
[7/13] Compiling AsyncRequest Request.swift
[8/13] Compiling AsyncRequest GroupRequestHandlers.swift
[9/13] Compiling AsyncRequest TimeoutRequest.swift
[10/13] Compiling AsyncRequest URLSessionRequest.swift
[11/13] Compiling AsyncRequest RequestGroup.swift
[12/13] Compiling AsyncRequest RequestHandlers.swift
[13/13] Compiling AsyncRequest UUIDTimeoutRequest.swift
[14/29] Compiling Apic Route.swift
[15/30] Compiling Apic RequestParameters.swift
[16/30] Compiling Apic ResponseContainer.swift
[17/30] Compiling Apic ResponseError.swift
/Users/admin/builder/spi-builder-workspace/Sources/ResponseError.swift:24:25: warning: function call causes an infinite recursion
22 |             }
23 |         default:
24 |             return self.localizedDescription
   |                         `- warning: function call causes an infinite recursion
25 |         }
26 |     }
[18/30] Compiling Apic HostReachabilityInfo.swift
[19/30] Compiling Apic ParameterEncoding.swift
[20/30] Compiling Apic ResponseParser.swift
[21/30] Compiling Apic ReachabilityManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/ReachabilityManager.swift:5:23: warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 3 | public class ReachabilityManager {
 4 |
 5 |     public static var shared = ReachabilityManager()
   |                       |- warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- 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
 6 |
 7 |     func checkReachability(route: Route) throws {
/Users/admin/builder/spi-builder-workspace/Sources/RepositorySessionDataDelegate.swift:3:12: warning: non-final class 'RepositorySessionDataDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 1 | import Foundation
 2 |
 3 | open class RepositorySessionDataDelegate: NSObject, URLSessionDataDelegate {
   |            `- warning: non-final class 'RepositorySessionDataDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 4 |
 5 |     private var completionHandlers: [URLSessionTask: (Data?, URLResponse?, Error?) -> Void] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/RepositorySessionDataDelegate.swift:5:17: warning: stored property 'completionHandlers' of 'Sendable'-conforming class 'RepositorySessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
 3 | open class RepositorySessionDataDelegate: NSObject, URLSessionDataDelegate {
 4 |
 5 |     private var completionHandlers: [URLSessionTask: (Data?, URLResponse?, Error?) -> Void] = [:]
   |                 `- warning: stored property 'completionHandlers' of 'Sendable'-conforming class 'RepositorySessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
 6 |     private var buffers: [URLSessionTask: Data] = [:]
 7 |
[22/30] Compiling Apic RepositorySessionDataDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/ReachabilityManager.swift:5:23: warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 3 | public class ReachabilityManager {
 4 |
 5 |     public static var shared = ReachabilityManager()
   |                       |- warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- 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
 6 |
 7 |     func checkReachability(route: Route) throws {
/Users/admin/builder/spi-builder-workspace/Sources/RepositorySessionDataDelegate.swift:3:12: warning: non-final class 'RepositorySessionDataDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 1 | import Foundation
 2 |
 3 | open class RepositorySessionDataDelegate: NSObject, URLSessionDataDelegate {
   |            `- warning: non-final class 'RepositorySessionDataDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 4 |
 5 |     private var completionHandlers: [URLSessionTask: (Data?, URLResponse?, Error?) -> Void] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/RepositorySessionDataDelegate.swift:5:17: warning: stored property 'completionHandlers' of 'Sendable'-conforming class 'RepositorySessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
 3 | open class RepositorySessionDataDelegate: NSObject, URLSessionDataDelegate {
 4 |
 5 |     private var completionHandlers: [URLSessionTask: (Data?, URLResponse?, Error?) -> Void] = [:]
   |                 `- warning: stored property 'completionHandlers' of 'Sendable'-conforming class 'RepositorySessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
 6 |     private var buffers: [URLSessionTask: Data] = [:]
 7 |
[23/30] Emitting module Apic
/Users/admin/builder/spi-builder-workspace/Sources/Reachability.swift:15:32: warning: static property 'reachabilityInfo' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 13 |     public class Reachability {
 14 |
 15 |         fileprivate static var reachabilityInfo = [String: HostReachabilityInfo]()
    |                                |- warning: static property 'reachabilityInfo' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                                |- note: convert 'reachabilityInfo' to a 'let' constant to make 'Sendable' shared state immutable
    |                                |- note: annotate 'reachabilityInfo' 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
 16 |
 17 |         public class func isConnectedToNetwork() -> Bool {
/Users/admin/builder/spi-builder-workspace/Sources/ReachabilityManager.swift:5:23: warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 3 | public class ReachabilityManager {
 4 |
 5 |     public static var shared = ReachabilityManager()
   |                       |- warning: static property 'shared' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- 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
 6 |
 7 |     func checkReachability(route: Route) throws {
/Users/admin/builder/spi-builder-workspace/Sources/RepositorySessionDataDelegate.swift:3:12: warning: non-final class 'RepositorySessionDataDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 1 | import Foundation
 2 |
 3 | open class RepositorySessionDataDelegate: NSObject, URLSessionDataDelegate {
   |            `- warning: non-final class 'RepositorySessionDataDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 4 |
 5 |     private var completionHandlers: [URLSessionTask: (Data?, URLResponse?, Error?) -> Void] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/RepositorySessionDataDelegate.swift:5:17: warning: stored property 'completionHandlers' of 'Sendable'-conforming class 'RepositorySessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
 3 | open class RepositorySessionDataDelegate: NSObject, URLSessionDataDelegate {
 4 |
 5 |     private var completionHandlers: [URLSessionTask: (Data?, URLResponse?, Error?) -> Void] = [:]
   |                 `- warning: stored property 'completionHandlers' of 'Sendable'-conforming class 'RepositorySessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
 6 |     private var buffers: [URLSessionTask: Data] = [:]
 7 |
[24/30] Compiling Apic Part.swift
/Users/admin/builder/spi-builder-workspace/Sources/Reachability.swift:15:32: warning: static property 'reachabilityInfo' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 13 |     public class Reachability {
 14 |
 15 |         fileprivate static var reachabilityInfo = [String: HostReachabilityInfo]()
    |                                |- warning: static property 'reachabilityInfo' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                                |- note: convert 'reachabilityInfo' to a 'let' constant to make 'Sendable' shared state immutable
    |                                |- note: annotate 'reachabilityInfo' 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
 16 |
 17 |         public class func isConnectedToNetwork() -> Bool {
[25/30] Compiling Apic Reachability.swift
/Users/admin/builder/spi-builder-workspace/Sources/Reachability.swift:15:32: warning: static property 'reachabilityInfo' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 13 |     public class Reachability {
 14 |
 15 |         fileprivate static var reachabilityInfo = [String: HostReachabilityInfo]()
    |                                |- warning: static property 'reachabilityInfo' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                                |- note: convert 'reachabilityInfo' to a 'let' constant to make 'Sendable' shared state immutable
    |                                |- note: annotate 'reachabilityInfo' 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
 16 |
 17 |         public class func isConnectedToNetwork() -> Bool {
[26/30] Compiling Apic AbstractRepository.swift
/Users/admin/builder/spi-builder-workspace/Sources/BaseRepository.swift:59:71: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
49 |     }
50 |
51 |     @inline(__always) func dataTask(with request: URLRequest, completion: @escaping (_ data: Data?, _ response: URLResponse?, _ error: Error?) -> Void) -> URLSessionDataTask {
   |                                                               `- note: parameter 'completion' is implicitly non-sendable
52 |         let session = self.session ?? URLSession.shared
53 |
   :
57 |             delegate.add(completion: completion, for: task)
58 |         } else {
59 |             task = session.dataTask(with: request, completionHandler: completion)
   |                                                                       `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
60 |         }
61 |         task.resume()
[27/30] Compiling Apic BaseRepository.swift
/Users/admin/builder/spi-builder-workspace/Sources/BaseRepository.swift:59:71: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
49 |     }
50 |
51 |     @inline(__always) func dataTask(with request: URLRequest, completion: @escaping (_ data: Data?, _ response: URLResponse?, _ error: Error?) -> Void) -> URLSessionDataTask {
   |                                                               `- note: parameter 'completion' is implicitly non-sendable
52 |         let session = self.session ?? URLSession.shared
53 |
   :
57 |             delegate.add(completion: completion, for: task)
58 |         } else {
59 |             task = session.dataTask(with: request, completionHandler: completion)
   |                                                                       `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
60 |         }
61 |         task.resume()
[28/30] Compiling Apic DefaultResponseParser.swift
/Users/admin/builder/spi-builder-workspace/Sources/DefaultResponseParser.swift:16:27: warning: capture of 'self' with non-sendable type 'DefaultResponseParser' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | open class DefaultResponseParser: ResponseParser {
    |            `- note: class 'DefaultResponseParser' does not conform to the 'Sendable' protocol
  4 |
  5 |     public let decoder = JSONDecoder()
    :
 14 |         decoder.dateDecodingStrategy = JSONDecoder.DateDecodingStrategy.custom({ decoder -> Date in
 15 |             let string = try decoder.singleValueContainer().decode(String.self)
 16 |             if let date = self.date(from: string, using: parser.dateFormats) {
    |                           `- warning: capture of 'self' with non-sendable type 'DefaultResponseParser' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 17 |                 return date
 18 |             }
/Users/admin/builder/spi-builder-workspace/Sources/DefaultResponseParser.swift:16:58: warning: capture of 'parser' with non-sendable type 'any CustomDateParsing' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 14 |         decoder.dateDecodingStrategy = JSONDecoder.DateDecodingStrategy.custom({ decoder -> Date in
 15 |             let string = try decoder.singleValueContainer().decode(String.self)
 16 |             if let date = self.date(from: string, using: parser.dateFormats) {
    |                                                          `- warning: capture of 'parser' with non-sendable type 'any CustomDateParsing' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 17 |                 return date
 18 |             }
    :
105 | }
106 |
107 | public protocol CustomDateParsing {
    |                 `- note: protocol 'CustomDateParsing' does not conform to the 'Sendable' protocol
108 |     var dateFormats: [String] { get }
109 |     var locale: Locale { get }
[29/30] Compiling Apic ErrorContainer.swift
/Users/admin/builder/spi-builder-workspace/Sources/DefaultResponseParser.swift:16:27: warning: capture of 'self' with non-sendable type 'DefaultResponseParser' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | open class DefaultResponseParser: ResponseParser {
    |            `- note: class 'DefaultResponseParser' does not conform to the 'Sendable' protocol
  4 |
  5 |     public let decoder = JSONDecoder()
    :
 14 |         decoder.dateDecodingStrategy = JSONDecoder.DateDecodingStrategy.custom({ decoder -> Date in
 15 |             let string = try decoder.singleValueContainer().decode(String.self)
 16 |             if let date = self.date(from: string, using: parser.dateFormats) {
    |                           `- warning: capture of 'self' with non-sendable type 'DefaultResponseParser' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 17 |                 return date
 18 |             }
/Users/admin/builder/spi-builder-workspace/Sources/DefaultResponseParser.swift:16:58: warning: capture of 'parser' with non-sendable type 'any CustomDateParsing' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 14 |         decoder.dateDecodingStrategy = JSONDecoder.DateDecodingStrategy.custom({ decoder -> Date in
 15 |             let string = try decoder.singleValueContainer().decode(String.self)
 16 |             if let date = self.date(from: string, using: parser.dateFormats) {
    |                                                          `- warning: capture of 'parser' with non-sendable type 'any CustomDateParsing' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 17 |                 return date
 18 |             }
    :
105 | }
106 |
107 | public protocol CustomDateParsing {
    |                 `- note: protocol 'CustomDateParsing' does not conform to the 'Sendable' protocol
108 |     var dateFormats: [String] { get }
109 |     var locale: Locale { get }
[30/30] Compiling Apic URLRequest+ParameterEncoding.swift
Build complete! (20.41s)
Fetching https://github.com/JuanjoArreola/AsyncRequest.git
[1/137] Fetching asyncrequest
Fetched https://github.com/JuanjoArreola/AsyncRequest.git from cache (0.68s)
Computing version for https://github.com/JuanjoArreola/AsyncRequest.git
Computed https://github.com/JuanjoArreola/AsyncRequest.git at 2.3.0 (2.05s)
Creating working copy for https://github.com/JuanjoArreola/AsyncRequest.git
Working copy of https://github.com/JuanjoArreola/AsyncRequest.git resolved at 2.3.0
Build complete.
{
  "dependencies" : [
    {
      "identity" : "asyncrequest",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "2.2.0",
            "upper_bound" : "3.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/JuanjoArreola/AsyncRequest.git"
    }
  ],
  "manifest_display_name" : "Apic",
  "name" : "Apic",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Apic",
      "targets" : [
        "Apic"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "ApicTests",
      "module_type" : "SwiftTarget",
      "name" : "ApicTests",
      "path" : "Tests",
      "sources" : [
        "ApicTests/ArrayTests.swift",
        "ApicTests/DateTests.swift",
        "ApicTests/DecimalTests.swift",
        "ApicTests/DictionaryTests.swift",
        "ApicTests/Movie.swift",
        "ApicTests/ReachabilityTests.swift",
        "LinuxMain.swift"
      ],
      "target_dependencies" : [
        "Apic"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Apic",
      "module_type" : "SwiftTarget",
      "name" : "Apic",
      "path" : "Sources",
      "product_dependencies" : [
        "AsyncRequest"
      ],
      "product_memberships" : [
        "Apic"
      ],
      "sources" : [
        "AbstractRepository.swift",
        "BaseRepository.swift",
        "DefaultResponseParser.swift",
        "ErrorContainer.swift",
        "HostReachabilityInfo.swift",
        "ParameterEncoding.swift",
        "Part.swift",
        "Reachability.swift",
        "ReachabilityManager.swift",
        "RepositorySessionDataDelegate.swift",
        "RequestParameters.swift",
        "ResponseContainer.swift",
        "ResponseError.swift",
        "ResponseParser.swift",
        "Route.swift",
        "URLRequest+ParameterEncoding.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "4.0"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.