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 SwiftRestClient, reference 0.7.1 (eb7b2f), with Swift 6.0 for Linux on 27 Dec 2024 00:11:58 UTC.

Swift 6 data race errors: 1

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.60.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/duhnnie/SwiftRestClient.git
Reference: 0.7.1
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/duhnnie/SwiftRestClient
 * tag               0.7.1      -> FETCH_HEAD
HEAD is now at eb7b2fc Merge pull request #21 from duhnnie/release/0.7.1
Cloned https://github.com/duhnnie/SwiftRestClient.git
Revision (git rev-parse @):
eb7b2fcf534b0293e11e139866c5117bc56e7695
SUCCESS checkout https://github.com/duhnnie/SwiftRestClient.git at 0.7.1
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/duhnnie/SwiftRestClient.git
https://github.com/duhnnie/SwiftRestClient.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftRestClient",
  "name" : "SwiftRestClient",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "watchos",
      "version" : "4.0"
    },
    {
      "name" : "tvos",
      "version" : "11.0"
    },
    {
      "name" : "maccatalyst",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftRestClient",
      "targets" : [
        "SwiftRestClient"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "SwiftRestClientTests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftRestClientTests",
      "path" : "Tests/SwiftRestClientTests",
      "sources" : [
        "SwiftRestClientTests.swift"
      ],
      "target_dependencies" : [
        "SwiftRestClient"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftRestClient",
      "module_type" : "SwiftTarget",
      "name" : "SwiftRestClient",
      "path" : "Sources/SwiftRestClient",
      "product_memberships" : [
        "SwiftRestClient"
      ],
      "sources" : [
        "Encoders/HTTPFormURLEncoded.swift",
        "SwiftRestClient.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:081dcf4fb829aea9d08447f4790431afbdfbcc335bfeed728ca69c6f181ae2aa
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/5] Emitting module SwiftRestClient
/host/spi-builder-workspace/Sources/SwiftRestClient/SwiftRestClient.swift:18:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SwiftRestClient' may have shared mutable state; this is an error in the Swift 6 language mode
  4 | #endif
  5 |
  6 | public class SwiftRestClient {
    |              `- note: class 'SwiftRestClient' does not conform to the 'Sendable' protocol
  7 |     private enum HTTPMethod: String {
  8 |         case GET
    :
 16 |     }
 17 |
 18 |     public static let shared = SwiftRestClient()
    |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SwiftRestClient' 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
 19 |     public typealias RequestCompletion = (Data?, URLResponse?, Error?) -> Void
 20 |     public typealias Headers = [String: String]
[4/5] Compiling SwiftRestClient HTTPFormURLEncoded.swift
[5/5] Compiling SwiftRestClient SwiftRestClient.swift
/host/spi-builder-workspace/Sources/SwiftRestClient/SwiftRestClient.swift:18:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SwiftRestClient' may have shared mutable state; this is an error in the Swift 6 language mode
  4 | #endif
  5 |
  6 | public class SwiftRestClient {
    |              `- note: class 'SwiftRestClient' does not conform to the 'Sendable' protocol
  7 |     private enum HTTPMethod: String {
  8 |         case GET
    :
 16 |     }
 17 |
 18 |     public static let shared = SwiftRestClient()
    |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SwiftRestClient' 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
 19 |     public typealias RequestCompletion = (Data?, URLResponse?, Error?) -> Void
 20 |     public typealias Headers = [String: String]
/host/spi-builder-workspace/Sources/SwiftRestClient/SwiftRestClient.swift:43:85: warning: passing non-sendable parameter 'onCompletion' to function expecting a @Sendable closure
 27 |         body: Data? = nil,
 28 |         headers: Headers? = nil,
 29 |         onCompletion: @escaping RequestCompletion
    |         `- note: parameter 'onCompletion' is implicitly non-sendable
 30 |     ) -> Void {
 31 |         var request = URLRequest(url: url)
    :
 41 |         request.httpBody = body
 42 |
 43 |         let dataTask = URLSession.shared.dataTask(with: request, completionHandler: onCompletion)
    |                                                                                     `- warning: passing non-sendable parameter 'onCompletion' to function expecting a @Sendable closure
 44 |
 45 |         dataTask.resume()
Build complete! (9.94s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftRestClient",
  "name" : "SwiftRestClient",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "watchos",
      "version" : "4.0"
    },
    {
      "name" : "tvos",
      "version" : "11.0"
    },
    {
      "name" : "maccatalyst",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftRestClient",
      "targets" : [
        "SwiftRestClient"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "SwiftRestClientTests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftRestClientTests",
      "path" : "Tests/SwiftRestClientTests",
      "sources" : [
        "SwiftRestClientTests.swift"
      ],
      "target_dependencies" : [
        "SwiftRestClient"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftRestClient",
      "module_type" : "SwiftTarget",
      "name" : "SwiftRestClient",
      "path" : "Sources/SwiftRestClient",
      "product_memberships" : [
        "SwiftRestClient"
      ],
      "sources" : [
        "Encoders/HTTPFormURLEncoded.swift",
        "SwiftRestClient.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:081dcf4fb829aea9d08447f4790431afbdfbcc335bfeed728ca69c6f181ae2aa
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.