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

Failed to build JSONHTTPClient, reference develop (345021), with Swift 6.0 for Linux on 16 Sep 2024 04:19:16 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/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 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/otaviokz/JSONHTTPClient.git
Reference: develop
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/otaviokz/JSONHTTPClient
 * branch            develop    -> FETCH_HEAD
 * [new branch]      develop    -> origin/develop
HEAD is now at 3450210 Merge pull request #3 from otaviokz/v1.1.0
Cloned https://github.com/otaviokz/JSONHTTPClient.git
Revision (git rev-parse @):
34502106a676cac3d86209814a9bb99ddab66ea2
SUCCESS checkout https://github.com/otaviokz/JSONHTTPClient.git at develop
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/otaviokz/JSONHTTPClient.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/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 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:9d7dab235f2b0b46edadd73b1fb0c3b5323df02053420324a4a2f8ca89cb54a5
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
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/6] Compiling JSONHTTPClient JSONHTTPClientError.swift
[4/6] Emitting module JSONHTTPClient
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:14:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'JSONHTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | @available(iOS 13.0.0, *)
13 | public struct JSONHTTPClient: JSONHTTPClientType {
   |               `- note: consider making struct 'JSONHTTPClient' conform to the 'Sendable' protocol
14 |     public static let shared = JSONHTTPClient()
   |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'JSONHTTPClient' 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
15 |
16 |     private init() {}
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:30:43: error: cannot find type 'URLRequest' in scope
28 | @available(iOS 13.0.0, *)
29 | private extension JSONHTTPClient {
30 |     func connect<T: Decodable>(_ request: URLRequest) async throws -> T {
   |                                           `- error: cannot find type 'URLRequest' in scope
31 |         let (data, rulResponse) = try await URLSession.shared.data(for: request)
32 |         if let httpUrlResponse = rulResponse as? HTTPURLResponse {
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:15:11: error: cannot find type 'URLRequest' in scope
13 | }
14 |
15 | extension URLRequest {
   |           `- error: cannot find type 'URLRequest' in scope
16 |     private func method(_ method: HTTPMethod) -> URLRequest {
17 |         var request = self
[5/6] Compiling JSONHTTPClient URLRequests+Utils.swift
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:15:11: error: cannot find type 'URLRequest' in scope
13 | }
14 |
15 | extension URLRequest {
   |           `- error: cannot find type 'URLRequest' in scope
16 |     private func method(_ method: HTTPMethod) -> URLRequest {
17 |         var request = self
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:16:50: error: cannot find type 'URLRequest' in scope
14 |
15 | extension URLRequest {
16 |     private func method(_ method: HTTPMethod) -> URLRequest {
   |                                                  `- error: cannot find type 'URLRequest' in scope
17 |         var request = self
18 |         request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:22:32: error: cannot find type 'URLRequest' in scope
20 |     }
21 |
22 |     func body(_ body: Data) -> URLRequest {
   |                                `- error: cannot find type 'URLRequest' in scope
23 |         var request = self
24 |         request.httpBody = body
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:28:56: error: cannot find type 'URLRequest' in scope
26 |     }
27 |
28 |     static func postData(_ body: Data, to url: URL) -> URLRequest {
   |                                                        `- error: cannot find type 'URLRequest' in scope
29 |         URLRequest(url: url).method(.post).body(body)
30 |     }
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:32:56: error: cannot find type 'URLRequest' in scope
30 |     }
31 |
32 |     static func postJSON(_ body: Data, to url: URL) -> URLRequest {
   |                                                        `- error: cannot find type 'URLRequest' in scope
33 |         postData(body, to: url).withJSONHeaders()
34 |     }
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:49:88: error: cannot find type 'URLRequest' in scope
47 |     }
48 |
49 |     static func get(_ url: URL, cachePolicy: CachePolicy = .useProtocolCachePolicy) -> URLRequest {
   |                                                                                        `- error: cannot find type 'URLRequest' in scope
50 |         URLRequest(url: url, cachePolicy: cachePolicy).method(.get)
51 |     }
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:49:46: error: cannot find type 'CachePolicy' in scope
47 |     }
48 |
49 |     static func get(_ url: URL, cachePolicy: CachePolicy = .useProtocolCachePolicy) -> URLRequest {
   |                                              `- error: cannot find type 'CachePolicy' in scope
50 |         URLRequest(url: url, cachePolicy: cachePolicy).method(.get)
51 |     }
[6/6] Compiling JSONHTTPClient JSONHTTPClient.swift
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:14:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'JSONHTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | @available(iOS 13.0.0, *)
13 | public struct JSONHTTPClient: JSONHTTPClientType {
   |               `- note: consider making struct 'JSONHTTPClient' conform to the 'Sendable' protocol
14 |     public static let shared = JSONHTTPClient()
   |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'JSONHTTPClient' 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
15 |
16 |     private init() {}
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:30:43: error: cannot find type 'URLRequest' in scope
28 | @available(iOS 13.0.0, *)
29 | private extension JSONHTTPClient {
30 |     func connect<T: Decodable>(_ request: URLRequest) async throws -> T {
   |                                           `- error: cannot find type 'URLRequest' in scope
31 |         let (data, rulResponse) = try await URLSession.shared.data(for: request)
32 |         if let httpUrlResponse = rulResponse as? HTTPURLResponse {
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:19:28: error: cannot infer contextual base in reference to member 'get'
17 |
18 |     public func get<T: Decodable>(_ url: URL, httpHeaders: [String: String]?) async throws -> T {
19 |         try await connect(.get(url).headers(httpHeaders))
   |                            `- error: cannot infer contextual base in reference to member 'get'
20 |
21 |     }
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:24:28: error: cannot infer contextual base in reference to member 'postJSON'
22 |
23 |     public func postJSON<T: Decodable>(_ url: URL, body: Data, httpHeaders: [String: String]?) async throws -> T {
24 |         try await connect(.postJSON(body, to: url).headers(httpHeaders))
   |                            `- error: cannot infer contextual base in reference to member 'postJSON'
25 |     }
26 | }
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:31:56: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
29 | private extension JSONHTTPClient {
30 |     func connect<T: Decodable>(_ request: URLRequest) async throws -> T {
31 |         let (data, rulResponse) = try await URLSession.shared.data(for: request)
   |                                                        `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
32 |         if let httpUrlResponse = rulResponse as? HTTPURLResponse {
33 |             guard httpUrlResponse.statusCode == 200 else {
BUILD FAILURE 6.0 linux