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

Swift 6 data race errors: 0

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/yonaskolb/NetworkRequest.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/yonaskolb/NetworkRequest
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at b46f1ea make DecodingError.decodingError public
Cloned https://github.com/yonaskolb/NetworkRequest.git
Revision (git rev-parse @):
b46f1ea66f6e11af2f199098061a38ffc343522c
SUCCESS checkout https://github.com/yonaskolb/NetworkRequest.git at master
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/yonaskolb/NetworkRequest.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/2] Write sources
[1/2] Write swift-version-6F35C1178C84523A.txt
[3/12] Compiling NetworkRequest DecodableRequest.swift
[4/12] Compiling NetworkRequest EncodableRequest.swift
[5/12] Compiling NetworkRequest RequestHandler.swift
[6/12] Compiling NetworkRequest NetworkServiceGroup.swift
[7/12] Compiling NetworkRequest MockNetworkService.swift
[8/12] Compiling NetworkRequest NetworkService.swift
[9/12] Compiling NetworkRequest RequestError.swift
[10/12] Compiling NetworkRequest HTTPNetworkService.swift
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:34:17: warning: capture of 'requestHandler' with non-sendable type 'AnyRequestHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 32 |         func complete(_ result: RequestResult<R.ResponseType>) {
 33 |             completionQueue.async {
 34 |                 requestHandler.requestCompleted(result: result.map { $0 })
    |                 `- warning: capture of 'requestHandler' with non-sendable type 'AnyRequestHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 35 |                 completion(result)
 36 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/RequestHandler.swift:96:15: note: consider making struct 'AnyRequestHandler' conform to the 'Sendable' protocol
 94 |
 95 | /// Wraps a RequestHandler in an easy to use struct that can be initialized with any request
 96 | public struct AnyRequestHandler {
    |               `- note: consider making struct 'AnyRequestHandler' conform to the 'Sendable' protocol
 97 |
 98 |     let id: String
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:34:57: warning: capture of 'result' with non-sendable type 'RequestResult<R.ResponseType>' (aka 'Result<R.ResponseType, RequestError>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
 32 |         func complete(_ result: RequestResult<R.ResponseType>) {
 33 |             completionQueue.async {
 34 |                 requestHandler.requestCompleted(result: result.map { $0 })
    |                                                         `- warning: capture of 'result' with non-sendable type 'RequestResult<R.ResponseType>' (aka 'Result<R.ResponseType, RequestError>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
 35 |                 completion(result)
 36 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:35:17: warning: capture of 'completion' with non-sendable type '(RequestResult<R.ResponseType>) -> Void' (aka '(Result<R.ResponseType, RequestError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |             completionQueue.async {
 34 |                 requestHandler.requestCompleted(result: result.map { $0 })
 35 |                 completion(result)
    |                 |- warning: capture of 'completion' with non-sendable type '(RequestResult<R.ResponseType>) -> Void' (aka '(Result<R.ResponseType, RequestError>) -> ()') 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'
 36 |             }
 37 |         }
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:69:21: warning: capture of 'requestHandler' with non-sendable type 'AnyRequestHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 67 |             case .success(let urlRequest):
 68 |                 dataTask = self.urlSession.dataTask(with: urlRequest) { (data, urlResponse, error) in
 69 |                     requestHandler.requestResponded(data: data, urlResponse: urlResponse as? HTTPURLResponse, error: error)
    |                     `- warning: capture of 'requestHandler' with non-sendable type 'AnyRequestHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 70 |                     if let error = error {
 71 |                         if let urlError = error as? URLError {
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/RequestHandler.swift:96:15: note: consider making struct 'AnyRequestHandler' conform to the 'Sendable' protocol
 94 |
 95 | /// Wraps a RequestHandler in an easy to use struct that can be initialized with any request
 96 | public struct AnyRequestHandler {
    |               `- note: consider making struct 'AnyRequestHandler' conform to the 'Sendable' protocol
 97 |
 98 |     let id: String
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:72:29: warning: capture of 'fail' with non-sendable type '(RequestError) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 70 |                     if let error = error {
 71 |                         if let urlError = error as? URLError {
 72 |                             fail(.networkError(urlError, data, urlResponse as? HTTPURLResponse))
    |                             |- warning: capture of 'fail' with non-sendable type '(RequestError) -> ()' 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'
 73 |                         } else {
 74 |                             fail(.genericError(error))
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:79:28: warning: capture of 'request' with non-sendable type 'R' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 20 |
 21 |     @discardableResult
 22 |     open func makeRequest<R: Request>(_ request: R, completion: @escaping (RequestResult<R.ResponseType>) -> Void) -> Cancellable? {
    |                           `- note: consider making generic parameter 'R' conform to the 'Sendable' protocol
 23 |
 24 |         let id = UUID().uuidString
    :
 77 |                         let response = urlResponse as? HTTPURLResponse
 78 |                         let statusCode = response?.statusCode ?? 0
 79 |                         if request.validStatusCode(statusCode) {
    |                            `- warning: capture of 'request' with non-sendable type 'R' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 80 |                             do {
 81 |                                 let value = try request.decodeResponse(data: data, statusCode: statusCode)
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:82:33: warning: capture of 'complete' with non-sendable type '(RequestResult<R.ResponseType>) -> ()' (aka '(Result<R.ResponseType, RequestError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
 80 |                             do {
 81 |                                 let value = try request.decodeResponse(data: data, statusCode: statusCode)
 82 |                                 complete(.success(value))
    |                                 |- warning: capture of 'complete' with non-sendable type '(RequestResult<R.ResponseType>) -> ()' (aka '(Result<R.ResponseType, RequestError>) -> ()') 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'
 83 |                             } catch {
 84 |                                 fail(.decodingError(data, error))
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:28:14: warning: concurrently-executed local function 'fail' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
 26 |         requestHandler.requestCreated()
 27 |
 28 |         func fail(_ error: RequestError) {
    |              `- warning: concurrently-executed local function 'fail' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
 29 |             complete(.failure(error))
 30 |         }
/Users/admin/builder/spi-builder-workspace/Sources/NetworkRequest/NetworkService/HTTPNetworkService.swift:32:14: warning: concurrently-executed local function 'complete' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
 30 |         }
 31 |
 32 |         func complete(_ result: RequestResult<R.ResponseType>) {
    |              `- warning: concurrently-executed local function 'complete' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
 33 |             completionQueue.async {
 34 |                 requestHandler.requestCompleted(result: result.map { $0 })
[11/12] Emitting module NetworkRequest
[12/12] Compiling NetworkRequest Request.swift
Build complete! (22.30s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "NetworkRequest",
  "name" : "NetworkRequest",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "NetworkRequest",
      "targets" : [
        "NetworkRequest"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "NetworkRequestTests",
      "module_type" : "SwiftTarget",
      "name" : "NetworkRequestTests",
      "path" : "Tests/NetworkRequestTests",
      "sources" : [
        "HTTPNetworkTests.swift",
        "MockNetworkTests.swift",
        "NetworkServiceGroupTests.swift",
        "RequestHandlerTests.swift",
        "TestHelpers.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "NetworkRequest"
      ],
      "type" : "test"
    },
    {
      "c99name" : "NetworkRequest",
      "module_type" : "SwiftTarget",
      "name" : "NetworkRequest",
      "path" : "Sources/NetworkRequest",
      "product_memberships" : [
        "NetworkRequest"
      ],
      "sources" : [
        "NetworkService/HTTPNetworkService.swift",
        "NetworkService/MockNetworkService.swift",
        "NetworkService/NetworkService.swift",
        "NetworkService/NetworkServiceGroup.swift",
        "NetworkService/RequestError.swift",
        "NetworkService/RequestHandler.swift",
        "Request/DecodableRequest.swift",
        "Request/EncodableRequest.swift",
        "Request/Request.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.