Build Information
Successful build of HPNetwork, reference main (1bfc33
), 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: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/henrik-dmg/HPNetwork
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 1bfc33b Update dependencies
Cloned https://github.com/henrik-dmg/HPNetwork.git
Revision (git rev-parse @):
1bfc33b997bbbf9f76aab135b09c612eaf8aefbe
SUCCESS checkout https://github.com/henrik-dmg/HPNetwork.git at main
Fetching https://github.com/apple/swift-http-types.git
[7/648] Fetching swift-http-types
Fetched https://github.com/apple/swift-http-types.git from cache (1.36s)
Computing version for https://github.com/apple/swift-http-types.git
Computed https://github.com/apple/swift-http-types.git at 1.3.0 (3.04s)
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
========================================
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.11s)
Fetching https://github.com/apple/swift-http-types.git from cache
Fetched https://github.com/apple/swift-http-types.git from cache (0.50s)
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.02s)
Creating working copy for https://github.com/henrik-dmg/HPNetwork.git
Working copy of https://github.com/henrik-dmg/HPNetwork.git resolved at main (1bfc33b)
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
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/13] Compiling HTTPTypes ISOLatin1String.swift
[7/13] Compiling HTTPTypes HTTPRequest.swift
[8/13] Compiling HTTPTypes HTTPParsedFields.swift
[9/13] Compiling HTTPTypes HTTPResponse.swift
[10/13] Compiling HTTPTypes HTTPField.swift
[11/13] Compiling HTTPTypes HTTPFieldName.swift
[12/13] Emitting module HTTPTypes
[13/13] Compiling HTTPTypes HTTPFields.swift
[14/19] Compiling HTTPTypesFoundation URLSession+HTTPTypes.swift
[15/19] Compiling HTTPTypesFoundation URLRequest+HTTPTypes.swift
[16/19] Compiling HTTPTypesFoundation URLResponse+HTTPTypes.swift
[17/19] Compiling HTTPTypesFoundation HTTPTypes+ISOLatin1.swift
[18/19] Compiling HTTPTypesFoundation HTTPRequest+URL.swift
[19/19] Emitting module HTTPTypesFoundation
[20/32] Compiling HPNetwork DownloadRequest.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DownloadRequest.swift:82: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
80 | let result = await result(urlSession: urlSession, delegate: delegate)
81 | finishingQueue.async {
82 | 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'
83 | }
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DownloadRequest.swift:82: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
80 | let result = await result(urlSession: urlSession, delegate: delegate)
81 | finishingQueue.async {
82 | 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
83 | }
84 | }
/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:79: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
77 | completion: @escaping (RequestResult) -> Void
78 | ) -> Task<Void, Never> {
79 | 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
80 | let result = await result(urlSession: urlSession, delegate: delegate)
| `- note: closure captures non-Sendable 'self'
81 | finishingQueue.async {
82 | completion(result)
| `- note: closure captures non-Sendable 'completion'
83 | }
84 | }
[21/33] Compiling HPNetwork NetworkRequest.swift
[22/33] Compiling HPNetwork DecodableRequest.swift
[23/33] Compiling HPNetwork DataRequest.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DataRequest.swift:120: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
118 | let result = await result(urlSession: urlSession, delegate: delegate)
119 | finishingQueue.async {
120 | 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'
121 | }
122 | }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetwork/Requests/DataRequest.swift:120: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
118 | let result = await result(urlSession: urlSession, delegate: delegate)
119 | finishingQueue.async {
120 | 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
121 | }
122 | }
/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:117: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
115 | completion: @escaping (RequestResult) -> Void
116 | ) -> Task<Void, Never> {
117 | 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
118 | let result = await result(urlSession: urlSession, delegate: delegate)
| `- note: closure captures non-Sendable 'self'
119 | finishingQueue.async {
120 | completion(result)
| `- note: closure captures non-Sendable 'completion'
121 | }
122 | }
[24/33] Compiling HPNetwork HTTPTypes+Proxy.swift
[25/33] Compiling HPNetwork ContentType+HTTPField.swift
[26/33] Compiling HPNetwork NetworkClient.swift
[27/33] Compiling HPNetwork HTTPFieldBuilder.swift
[28/33] Compiling HPNetwork NetworkResponse.swift
[29/33] Compiling HPNetwork Authorization.swift
[30/33] Compiling HPNetwork BasicAuthorization.swift
[31/33] 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)
[32/33] 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)
[33/33] Emitting module HPNetwork
[34/36] Emitting module HPNetworkMock
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/URLSessionMock.swift:26: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
24 | // MARK: - Properties
25 |
26 | 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
27 |
28 | // MARK: - Registering Mocks
[35/36] Compiling HPNetworkMock NetworkClientMock.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/NetworkClientMock.swift:73: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
71 | let result = await result(request, delegate: delegate)
72 | finishingQueue.async {
73 | 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'
74 | }
75 | }
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/NetworkClientMock.swift:73: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
71 | let result = await result(request, delegate: delegate)
72 | finishingQueue.async {
73 | 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
74 | }
75 | }
/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:70: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
68 | completion: @escaping (Request.RequestResult) -> Void
69 | ) -> Task<Void, Never> {
70 | 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
71 | let result = await result(request, delegate: delegate)
| `- note: closure captures 'self' which is accessible to code in the current task
72 | finishingQueue.async {
73 | completion(result)
[36/36] Compiling HPNetworkMock URLSessionMock.swift
/Users/admin/builder/spi-builder-workspace/Sources/HPNetworkMock/URLSessionMock.swift:26: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
24 | // MARK: - Properties
25 |
26 | 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
27 |
28 | // MARK: - Registering Mocks
Build complete! (18.89s)
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.10"
}
Done.