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 HPNetwork, reference 4.0.1 (a46290), with Swift 6.0 for macOS (SPM) on 4 Nov 2024 20:33:39 UTC.

Swift 6 data race errors: 1

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

Build Log

========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/henrik-dmg/HPNetwork.git
Reference: 4.0.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/henrik-dmg/HPNetwork
 * tag               4.0.1      -> FETCH_HEAD
HEAD is now at a462903 Better Documentation (#5)
Cloned https://github.com/henrik-dmg/HPNetwork.git
Revision (git rev-parse @):
a4629039573f695f97fc044032c4e654b40671b0
SUCCESS checkout https://github.com/henrik-dmg/HPNetwork.git at 4.0.1
Fetching https://github.com/apple/swift-http-types.git
[1/648] Fetching swift-http-types
Fetched https://github.com/apple/swift-http-types.git from cache (1.39s)
Computing version for https://github.com/apple/swift-http-types.git
Computed https://github.com/apple/swift-http-types.git at 1.0.3 (0.84s)
Creating working copy for https://github.com/apple/swift-http-types.git
Working copy of https://github.com/apple/swift-http-types.git resolved at 1.0.3
========================================
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": "hpnetwork",
      "name": "HPNetwork",
      "url": "https://github.com/henrik-dmg/HPNetwork.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/HPNetwork",
      "dependencies": [
        {
          "identity": "swift-http-types",
          "name": "swift-http-types",
          "url": "https://github.com/apple/swift-http-types.git",
          "version": "1.3.0",
          "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/swift-http-types",
          "dependencies": [
          ]
        }
      ]
    }
  ]
}
Fetching https://github.com/henrik-dmg/HPNetwork.git
[1/1499] Fetching hpnetwork
Fetched https://github.com/henrik-dmg/HPNetwork.git from cache (1.09s)
Fetching https://github.com/apple/swift-http-types.git from cache
Fetched https://github.com/apple/swift-http-types.git from cache (0.48s)
Computing version for https://github.com/apple/swift-http-types.git
Computed https://github.com/apple/swift-http-types.git at 1.3.0 (0.03s)
Creating working copy for https://github.com/apple/swift-http-types.git
Working copy of https://github.com/apple/swift-http-types.git resolved at 1.3.0
Creating working copy for https://github.com/henrik-dmg/HPNetwork.git
Working copy of https://github.com/henrik-dmg/HPNetwork.git resolved at 4.0.1 (a462903)
warning: '.resolve-product-dependencies': dependency 'hpnetwork' is not used by any target
Found 1 product dependencies
  - swift-http-types
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/henrik-dmg/HPNetwork.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
Building for debugging...
[0/5] Write sources
[4/5] Write swift-version--7754E27361AE5C74.txt
[6/12] Compiling HTTPTypes HTTPResponse.swift
[7/12] Compiling HTTPTypes HTTPRequest.swift
[8/12] Compiling HTTPTypes ISOLatin1String.swift
[9/12] Compiling HTTPTypes HTTPFieldName.swift
[10/12] Compiling HTTPTypes HTTPField.swift
[11/12] Compiling HTTPTypes HTTPFields.swift
[12/12] Emitting module HTTPTypes
[13/18] Compiling HTTPTypesFoundation URLSession+HTTPTypes.swift
[14/18] Compiling HTTPTypesFoundation URLRequest+HTTPTypes.swift
[15/18] Compiling HTTPTypesFoundation HTTPTypes+ISOLatin1.swift
[16/18] Compiling HTTPTypesFoundation URLResponse+HTTPTypes.swift
[17/18] Compiling HTTPTypesFoundation HTTPRequest+URL.swift
[18/18] Emitting module HTTPTypesFoundation
[19/31] Compiling HPNetwork NetworkRequest.swift
[20/32] Compiling HPNetwork DataRequest.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DataRequest.swift:114:17: warning: capture of 'completion' with non-sendable type '(Self.RequestResult) -> Void' (aka '(Result<NetworkResponse<Self.Output>, any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
112 |             let result = await result(urlSession: urlSession, delegate: delegate)
113 |             finishingQueue.async {
114 |                 completion(result)
    |                 |- warning: capture of 'completion' with non-sendable type '(Self.RequestResult) -> Void' (aka '(Result<NetworkResponse<Self.Output>, any Error>) -> ()') 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'
115 |             }
116 |         }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DataRequest.swift:114:28: warning: capture of 'result' with non-sendable type 'Result<NetworkResponse<Self.Output>, any Error>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
112 |             let result = await result(urlSession: urlSession, delegate: delegate)
113 |             finishingQueue.async {
114 |                 completion(result)
    |                            `- warning: capture of 'result' with non-sendable type 'Result<NetworkResponse<Self.Output>, any Error>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
115 |             }
116 |         }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Responses/NetworkResponse.swift:5:15: note: consider making generic struct 'NetworkResponse' conform to the 'Sendable' protocol
 3 |
 4 | /// A wrapper type representing the result of a network request.
 5 | public struct NetworkResponse<Output> {
   |               `- note: consider making generic struct 'NetworkResponse' conform to the 'Sendable' protocol
 6 |
 7 |     /// The actual output of the network request.
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DataRequest.swift:111:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
109 |         completion: @escaping (RequestResult) -> Void
110 |     ) -> Task<Void, Never> {
111 |         Task {
    |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
112 |             let result = await result(urlSession: urlSession, delegate: delegate)
    |                                `- note: closure captures non-Sendable 'self'
113 |             finishingQueue.async {
114 |                 completion(result)
    |                 `- note: closure captures non-Sendable 'completion'
115 |             }
116 |         }
[21/32] Compiling HPNetwork DecodableRequest.swift
[22/32] Compiling HPNetwork DownloadRequest.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DownloadRequest.swift:77:17: warning: capture of 'completion' with non-sendable type '(Self.RequestResult) -> Void' (aka '(Result<NetworkResponse<URL>, any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
75 |             let result = await result(urlSession: urlSession, delegate: delegate)
76 |             finishingQueue.async {
77 |                 completion(result)
   |                 |- warning: capture of 'completion' with non-sendable type '(Self.RequestResult) -> Void' (aka '(Result<NetworkResponse<URL>, any Error>) -> ()') 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'
78 |             }
79 |         }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DownloadRequest.swift:77:28: warning: capture of 'result' with non-sendable type 'Result<NetworkResponse<URL>, any Error>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
75 |             let result = await result(urlSession: urlSession, delegate: delegate)
76 |             finishingQueue.async {
77 |                 completion(result)
   |                            `- warning: capture of 'result' with non-sendable type 'Result<NetworkResponse<URL>, any Error>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 |             }
79 |         }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Responses/NetworkResponse.swift:5:15: note: consider making generic struct 'NetworkResponse' conform to the 'Sendable' protocol
 3 |
 4 | /// A wrapper type representing the result of a network request.
 5 | public struct NetworkResponse<Output> {
   |               `- note: consider making generic struct 'NetworkResponse' conform to the 'Sendable' protocol
 6 |
 7 |     /// The actual output of the network request.
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DownloadRequest.swift:74:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
72 |         completion: @escaping (RequestResult) -> Void
73 |     ) -> Task<Void, Never> {
74 |         Task {
   |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
75 |             let result = await result(urlSession: urlSession, delegate: delegate)
   |                                `- note: closure captures non-Sendable 'self'
76 |             finishingQueue.async {
77 |                 completion(result)
   |                 `- note: closure captures non-Sendable 'completion'
78 |             }
79 |         }
[23/32] Compiling HPNetwork NetworkResponse.swift
[24/32] Compiling HPNetwork NetworkClient.swift
[25/32] Compiling HPNetwork HTTPFieldBuilder.swift
[26/32] Compiling HPNetwork HTTPTypes+Proxy.swift
[27/32] Compiling HPNetwork ContentType+HTTPField.swift
[28/32] Compiling HPNetwork BearerAuthorization.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/ConnectionMonitor.swift:35:13: warning: capture of 'self' with non-sendable type 'ConnectionMonitor?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 2 | import Network
 3 |
 4 | public final class ConnectionMonitor: ObservableObject {
   |                    `- note: class 'ConnectionMonitor' does not conform to the 'Sendable' protocol
 5 |
 6 |     // MARK: - Properties
   :
33 |
34 |         self.pathMonitor.pathUpdateHandler = { [weak self] path in
35 |             self?.emitNotification(path)
   |             `- warning: capture of 'self' with non-sendable type 'ConnectionMonitor?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
36 |         }
37 |         self.pathMonitor.start(queue: queue)
[29/32] Compiling HPNetwork ConnectionMonitor.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/ConnectionMonitor.swift:35:13: warning: capture of 'self' with non-sendable type 'ConnectionMonitor?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 2 | import Network
 3 |
 4 | public final class ConnectionMonitor: ObservableObject {
   |                    `- note: class 'ConnectionMonitor' does not conform to the 'Sendable' protocol
 5 |
 6 |     // MARK: - Properties
   :
33 |
34 |         self.pathMonitor.pathUpdateHandler = { [weak self] path in
35 |             self?.emitNotification(path)
   |             `- warning: capture of 'self' with non-sendable type 'ConnectionMonitor?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
36 |         }
37 |         self.pathMonitor.start(queue: queue)
[30/32] Emitting module HPNetwork
[31/32] Compiling HPNetwork Authorization.swift
[32/32] Compiling HPNetwork BasicAuthorization.swift
[33/35] Emitting module HPNetworkMock
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/URLSessionMock.swift:24:24: warning: static property 'mockedRequests' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 22 |     // MARK: - Properties
 23 |
 24 |     private static var mockedRequests: [UUID: MockedNetworkRequest] = [:]
    |                        |- warning: static property 'mockedRequests' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'mockedRequests' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'mockedRequests' 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
 25 |
 26 |     // MARK: - Registering Mocks
[34/35] Compiling HPNetworkMock URLSessionMock.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/URLSessionMock.swift:24:24: warning: static property 'mockedRequests' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 22 |     // MARK: - Properties
 23 |
 24 |     private static var mockedRequests: [UUID: MockedNetworkRequest] = [:]
    |                        |- warning: static property 'mockedRequests' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'mockedRequests' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'mockedRequests' 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
 25 |
 26 |     // MARK: - Registering Mocks
[35/35] Compiling HPNetworkMock NetworkClientMock.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/NetworkClientMock.swift:71:17: warning: capture of 'completion' with non-sendable type '(Request.RequestResult) -> Void' (aka '(Result<NetworkResponse<Request.Output>, any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |             let result = await result(request, delegate: delegate)
70 |             finishingQueue.async {
71 |                 completion(result)
   |                 |- warning: capture of 'completion' with non-sendable type '(Request.RequestResult) -> Void' (aka '(Result<NetworkResponse<Request.Output>, any Error>) -> ()') 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'
72 |             }
73 |         }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/NetworkClientMock.swift:71:28: warning: capture of 'result' with non-sendable type 'Result<NetworkResponse<Request.Output>, any Error>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
69 |             let result = await result(request, delegate: delegate)
70 |             finishingQueue.async {
71 |                 completion(result)
   |                            `- warning: capture of 'result' with non-sendable type 'Result<NetworkResponse<Request.Output>, any Error>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 |             }
73 |         }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Responses/NetworkResponse.swift:5:15: note: generic struct 'NetworkResponse' does not conform to the 'Sendable' protocol
 3 |
 4 | /// A wrapper type representing the result of a network request.
 5 | public struct NetworkResponse<Output> {
   |               `- note: generic struct 'NetworkResponse' does not conform to the 'Sendable' protocol
 6 |
 7 |     /// The actual output of the network request.
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/NetworkClientMock.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'HPNetwork'
 1 | import Foundation
 2 | import HPNetwork
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'HPNetwork'
 3 | import HTTPTypes
 4 |
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/NetworkClientMock.swift:68:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
66 |         completion: @escaping (Request.RequestResult) -> Void
67 |     ) -> Task<Void, Never> {
68 |         Task {
   |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
69 |             let result = await result(request, delegate: delegate)
   |                                `- note: closure captures 'self' which is accessible to code in the current task
70 |             finishingQueue.async {
71 |                 completion(result)
Build complete! (19.79s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "swift-http-types",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.0.0",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/apple/swift-http-types.git"
    }
  ],
  "manifest_display_name" : "HPNetwork",
  "name" : "HPNetwork",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "tvos",
      "version" : "15.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    },
    {
      "name" : "macos",
      "version" : "12.0"
    }
  ],
  "products" : [
    {
      "name" : "HPNetwork",
      "targets" : [
        "HPNetwork"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "HPNetworkMock",
      "targets" : [
        "HPNetworkMock"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "HPNetworkTests",
      "module_type" : "SwiftTarget",
      "name" : "HPNetworkTests",
      "path" : "Tests/HPNetworkTests",
      "sources" : [
        "AuthorizationTests.swift",
        "ConnectionMonitorTests.swift",
        "DataRequestTests.swift",
        "DownloadRequestTests.swift",
        "HTTPFieldBuilderTests.swift",
        "Helpers/BasicDataRequest.swift",
        "Helpers/BasicDecodableRequest.swift",
        "Helpers/BasicDownloadRequest.swift",
        "Helpers/FaultyRequest.swift",
        "NetworkClientMockTests.swift",
        "NetworkRequestTests.swift"
      ],
      "target_dependencies" : [
        "HPNetwork",
        "HPNetworkMock"
      ],
      "type" : "test"
    },
    {
      "c99name" : "HPNetworkMock",
      "module_type" : "SwiftTarget",
      "name" : "HPNetworkMock",
      "path" : "Sources/HPNetworkMock",
      "product_memberships" : [
        "HPNetworkMock"
      ],
      "sources" : [
        "NetworkClientMock.swift",
        "URLSessionMock.swift"
      ],
      "target_dependencies" : [
        "HPNetwork"
      ],
      "type" : "library"
    },
    {
      "c99name" : "HPNetwork",
      "module_type" : "SwiftTarget",
      "name" : "HPNetwork",
      "path" : "Sources/HPNetwork",
      "product_dependencies" : [
        "HTTPTypes",
        "HTTPTypesFoundation"
      ],
      "product_memberships" : [
        "HPNetwork",
        "HPNetworkMock"
      ],
      "sources" : [
        "Authorization/Authorization.swift",
        "Authorization/BasicAuthorization.swift",
        "Authorization/BearerAuthorization.swift",
        "ConnectionMonitor.swift",
        "HTTPTypes+Proxy.swift",
        "Header Fields/ContentType+HTTPField.swift",
        "Header Fields/HTTPFieldBuilder.swift",
        "NetworkClient.swift",
        "Requests/DataRequest.swift",
        "Requests/DecodableRequest.swift",
        "Requests/DownloadRequest.swift",
        "Requests/NetworkRequest.swift",
        "Responses/NetworkResponse.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Done.