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 SwiftRestClient with Swift 6.0 for Linux.

Swift 6 data race errors: 2

Build Command

bash -c docker run --rm -v "checkouts-4609320-1":/host -w "$workDir" 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 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/duhnnie/SwiftRestClient.git
Reference: main
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
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at f6828e8 Merge pull request #8 from duhnnie/develop
Cloned https://github.com/duhnnie/SwiftRestClient.git
Revision (git rev-parse @):
f6828e84d000aa9fc05137ce459d0013e3474831
SUCCESS checkout https://github.com/duhnnie/SwiftRestClient.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $workDir
https://github.com/duhnnie/SwiftRestClient.git
Running build ...
bash -c docker run --rm -v "checkouts-4609320-1":/host -w "$workDir" 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 2>&1
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/Encoders/HTTPFormURLEncoded.swift:51:24: warning: static property 'sAllowedCharacters' is not concurrency-safe because non-'Sendable' type 'CharacterSet' may have shared mutable state; this is an error in the Swift 6 language mode
49 |     /// The characters that are don't need to be percent encoded in an `application/x-www-form-urlencoded` value.
50 |
51 |     private static let sAllowedCharacters: CharacterSet = {
   |                        `- warning: static property 'sAllowedCharacters' is not concurrency-safe because non-'Sendable' type 'CharacterSet' may have shared mutable state; this is an error in the Swift 6 language mode
52 |         // Start with `CharacterSet.urlQueryAllowed` then add " " (it's converted to "+" later)
53 |         // and remove "+" (it has to be percent encoded to prevent a conflict with " ").
Foundation.CharacterSet:1:15: note: struct 'CharacterSet' does not conform to the 'Sendable' protocol
 1 | public struct CharacterSet : ReferenceConvertible, Equatable, Hashable, SetAlgebra {
   |               `- note: struct 'CharacterSet' does not conform to the 'Sendable' protocol
 2 |     public typealias ReferenceType = NSCharacterSet
 3 |     public init()
/host/spi-builder-workspace/Sources/SwiftRestClient/Encoders/HTTPFormURLEncoded.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 1 | // From https://developer.apple.com/forums/thread/113632
 2 |
 3 | import Foundation
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 4 |
 5 | public enum HTTPFormURLEncoded {
   :
49 |     /// The characters that are don't need to be percent encoded in an `application/x-www-form-urlencoded` value.
50 |
51 |     private static let sAllowedCharacters: CharacterSet = {
   |                        |- note: annotate 'sAllowedCharacters' 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
52 |         // Start with `CharacterSet.urlQueryAllowed` then add " " (it's converted to "+" later)
53 |         // and remove "+" (it has to be percent encoded to prevent a conflict with " ").
/host/spi-builder-workspace/Sources/SwiftRestClient/SwiftRestClient.swift:12: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
   :
10 |     }
11 |
12 |     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
13 |     public typealias RequestCompletion = (Data?, URLResponse?, Error?) -> Void
14 |     public typealias Headers = [String: String]
[4/5] Compiling SwiftRestClient SwiftRestClient.swift
/host/spi-builder-workspace/Sources/SwiftRestClient/SwiftRestClient.swift:12: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
   :
10 |     }
11 |
12 |     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
13 |     public typealias RequestCompletion = (Data?, URLResponse?, Error?) -> Void
14 |     public typealias Headers = [String: String]
[5/5] Compiling SwiftRestClient HTTPFormURLEncoded.swift
/host/spi-builder-workspace/Sources/SwiftRestClient/Encoders/HTTPFormURLEncoded.swift:51:24: warning: static property 'sAllowedCharacters' is not concurrency-safe because non-'Sendable' type 'CharacterSet' may have shared mutable state; this is an error in the Swift 6 language mode
49 |     /// The characters that are don't need to be percent encoded in an `application/x-www-form-urlencoded` value.
50 |
51 |     private static let sAllowedCharacters: CharacterSet = {
   |                        `- warning: static property 'sAllowedCharacters' is not concurrency-safe because non-'Sendable' type 'CharacterSet' may have shared mutable state; this is an error in the Swift 6 language mode
52 |         // Start with `CharacterSet.urlQueryAllowed` then add " " (it's converted to "+" later)
53 |         // and remove "+" (it has to be percent encoded to prevent a conflict with " ").
Foundation.CharacterSet:1:15: note: struct 'CharacterSet' does not conform to the 'Sendable' protocol
 1 | public struct CharacterSet : ReferenceConvertible, Equatable, Hashable, SetAlgebra {
   |               `- note: struct 'CharacterSet' does not conform to the 'Sendable' protocol
 2 |     public typealias ReferenceType = NSCharacterSet
 3 |     public init()
/host/spi-builder-workspace/Sources/SwiftRestClient/Encoders/HTTPFormURLEncoded.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 1 | // From https://developer.apple.com/forums/thread/113632
 2 |
 3 | import Foundation
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 4 |
 5 | public enum HTTPFormURLEncoded {
   :
49 |     /// The characters that are don't need to be percent encoded in an `application/x-www-form-urlencoded` value.
50 |
51 |     private static let sAllowedCharacters: CharacterSet = {
   |                        |- note: annotate 'sAllowedCharacters' 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
52 |         // Start with `CharacterSet.urlQueryAllowed` then add " " (it's converted to "+" later)
53 |         // and remove "+" (it has to be percent encoded to prevent a conflict with " ").
Build complete! (10.60s)
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"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.