Build Information
Successful build of AENetwork with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 4
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/tadija/AENetwork.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/tadija/AENetwork
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 50f4073 Merge branch 'release/0.9.1'
Cloned https://github.com/tadija/AENetwork.git
Revision (git rev-parse @):
50f407338632d912431abecbfe9de002ae20bb07
SUCCESS checkout https://github.com/tadija/AENetwork.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/tadija/AENetwork.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 AENetwork Network.swift
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Network.swift:15:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' may have shared mutable state; this is an error in the Swift 6 language mode
9 | // MARK: - Network
10 |
11 | open class Network {
| `- note: class 'Network' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: Singleton
14 |
15 | public static let shared = Network()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' 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
16 |
17 | // MARK: Properties
[4/12] Compiling AENetwork URLRequest+Helpers.swift
[5/12] Compiling AENetwork Reachability.swift
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Reachability.swift:98:13: warning: capture of 'self' with non-sendable type 'Reachability?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import SystemConfiguration
10 |
11 | open class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: Types
:
96 |
97 | queue.async { [weak self] in
98 | self?.callListenersIfNeeded()
| `- warning: capture of 'self' with non-sendable type 'Reachability?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
99 | }
100 |
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Reachability.swift:120:33: warning: capture of 'self' with non-sendable type 'Reachability?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import SystemConfiguration
10 |
11 | open class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: Types
:
118 |
119 | DispatchQueue.main.async { [weak self] in
120 | if let strongSelf = self {
| `- warning: capture of 'self' with non-sendable type 'Reachability?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
121 | strongSelf.stateDidChange?(strongSelf.state)
122 | }
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Reachability.swift:120:33: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
118 |
119 | DispatchQueue.main.async { [weak self] in
120 | if let strongSelf = self {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
121 | strongSelf.stateDidChange?(strongSelf.state)
122 | }
[6/12] Compiling AENetwork HTTPURLResponse+Helpers.swift
[7/12] Compiling AENetwork APIClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Network.swift:15:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' may have shared mutable state; this is an error in the Swift 6 language mode
9 | // MARK: - Network
10 |
11 | open class Network {
| `- note: class 'Network' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: Singleton
14 |
15 | public static let shared = Network()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' 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
16 |
17 | // MARK: Properties
[8/12] Compiling AENetwork Downloader.swift
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Downloader.swift:61:37: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
59 | // MARK: - Downloader
60 |
61 | public protocol DownloaderDelegate: class, DownloadStatusDelegate {}
| `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
62 |
63 | open class Downloader: NSObject {
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Downloader.swift:63:12: warning: non-final class 'Downloader' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
61 | public protocol DownloaderDelegate: class, DownloadStatusDelegate {}
62 |
63 | open class Downloader: NSObject {
| `- warning: non-final class 'Downloader' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
64 |
65 | public static let defaultConfiguration: URLSessionConfiguration = .background(
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Downloader.swift:71:29: warning: stored property 'items' of 'Sendable'-conforming class 'Downloader' is mutable; this is an error in the Swift 6 language mode
69 | // MARK: Properties
70 |
71 | public private(set) var items = [Downloadable]()
| `- warning: stored property 'items' of 'Sendable'-conforming class 'Downloader' is mutable; this is an error in the Swift 6 language mode
72 | public weak var delegate: DownloaderDelegate?
73 |
[9/12] Emitting module AENetwork
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Downloader.swift:61:37: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
59 | // MARK: - Downloader
60 |
61 | public protocol DownloaderDelegate: class, DownloadStatusDelegate {}
| `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
62 |
63 | open class Downloader: NSObject {
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Downloader.swift:63:12: warning: non-final class 'Downloader' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
61 | public protocol DownloaderDelegate: class, DownloadStatusDelegate {}
62 |
63 | open class Downloader: NSObject {
| `- warning: non-final class 'Downloader' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
64 |
65 | public static let defaultConfiguration: URLSessionConfiguration = .background(
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Downloader.swift:71:29: warning: stored property 'items' of 'Sendable'-conforming class 'Downloader' is mutable; this is an error in the Swift 6 language mode
69 | // MARK: Properties
70 |
71 | public private(set) var items = [Downloadable]()
| `- warning: stored property 'items' of 'Sendable'-conforming class 'Downloader' is mutable; this is an error in the Swift 6 language mode
72 | public weak var delegate: DownloaderDelegate?
73 |
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:11:34: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
9 | // MARK: - FetcherDelegate
10 |
11 | public protocol FetcherDelegate: class {
| `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
12 | func willSendRequest(_ request: URLRequest, sender: Fetcher)
13 | func willReceiveResult(_ result: Fetcher.ResponseResult, sender: Fetcher)
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:54:14: warning: associated value 'invalidResponse' of 'Sendable'-conforming enum 'Error' has non-sendable type 'Fetcher.Response'; this is an error in the Swift 6 language mode
37 | // MARK: Types
38 |
39 | public struct Response: APIResponse {
| `- note: consider making struct 'Response' conform to the 'Sendable' protocol
40 | public let request: URLRequest
41 | public let response: HTTPURLResponse
:
52 |
53 | public enum Error: Swift.Error {
54 | case invalidResponse(Response)
| `- warning: associated value 'invalidResponse' of 'Sendable'-conforming enum 'Error' has non-sendable type 'Fetcher.Response'; this is an error in the Swift 6 language mode
55 | }
56 |
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Helpers/URL+Helpers.swift:11:1: warning: extension declares a conformance of imported type 'URL' to imported protocols 'ExpressibleByStringLiteral', 'ExpressibleByExtendedGraphemeClusterLiteral', 'ExpressibleByUnicodeScalarLiteral'; this will not behave correctly if the owners of 'Foundation' introduce this conformance in the future
9 | // MARK: - ExpressibleByStringLiteral
10 |
11 | extension URL: ExpressibleByStringLiteral {
| |- warning: extension declares a conformance of imported type 'URL' to imported protocols 'ExpressibleByStringLiteral', 'ExpressibleByExtendedGraphemeClusterLiteral', 'ExpressibleByUnicodeScalarLiteral'; this will not behave correctly if the owners of 'Foundation' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
12 | public static let mock = URL(string: "https://mock.url")!
13 |
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Network.swift:15:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' may have shared mutable state; this is an error in the Swift 6 language mode
9 | // MARK: - Network
10 |
11 | open class Network {
| `- note: class 'Network' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: Singleton
14 |
15 | public static let shared = Network()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Network' 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
16 |
17 | // MARK: Properties
[10/12] Compiling AENetwork Data+Helpers.swift
[11/12] Compiling AENetwork URL+Helpers.swift
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Helpers/URL+Helpers.swift:11:1: warning: extension declares a conformance of imported type 'URL' to imported protocols 'ExpressibleByStringLiteral', 'ExpressibleByExtendedGraphemeClusterLiteral', 'ExpressibleByUnicodeScalarLiteral'; this will not behave correctly if the owners of 'Foundation' introduce this conformance in the future
9 | // MARK: - ExpressibleByStringLiteral
10 |
11 | extension URL: ExpressibleByStringLiteral {
| |- warning: extension declares a conformance of imported type 'URL' to imported protocols 'ExpressibleByStringLiteral', 'ExpressibleByExtendedGraphemeClusterLiteral', 'ExpressibleByUnicodeScalarLiteral'; this will not behave correctly if the owners of 'Foundation' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
12 | public static let mock = URL(string: "https://mock.url")!
13 |
[12/12] Compiling AENetwork Fetcher.swift
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:11:34: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
9 | // MARK: - FetcherDelegate
10 |
11 | public protocol FetcherDelegate: class {
| `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
12 | func willSendRequest(_ request: URLRequest, sender: Fetcher)
13 | func willReceiveResult(_ result: Fetcher.ResponseResult, sender: Fetcher)
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:54:14: warning: associated value 'invalidResponse' of 'Sendable'-conforming enum 'Error' has non-sendable type 'Fetcher.Response'; this is an error in the Swift 6 language mode
37 | // MARK: Types
38 |
39 | public struct Response: APIResponse {
| `- note: consider making struct 'Response' conform to the 'Sendable' protocol
40 | public let request: URLRequest
41 | public let response: HTTPURLResponse
:
52 |
53 | public enum Error: Swift.Error {
54 | case invalidResponse(Response)
| `- warning: associated value 'invalidResponse' of 'Sendable'-conforming enum 'Error' has non-sendable type 'Fetcher.Response'; this is an error in the Swift 6 language mode
55 | }
56 |
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:77:13: warning: capture of 'self' with non-sendable type 'Fetcher' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 | // MARK: - Fetcher
34 |
35 | open class Fetcher {
| `- note: class 'Fetcher' does not conform to the 'Sendable' protocol
36 |
37 | // MARK: Types
:
75 | public func send(_ request: URLRequest, completion: @escaping Callback) {
76 | queue.async { [unowned self] in
77 | self.handleRequest(request, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'Fetcher' in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 | }
79 | }
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:77:53: warning: capture of 'completion' with non-sendable type 'Fetcher.Callback' (aka '(Result<Fetcher.Response, any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
75 | public func send(_ request: URLRequest, completion: @escaping Callback) {
76 | queue.async { [unowned self] in
77 | self.handleRequest(request, completion: completion)
| |- warning: capture of 'completion' with non-sendable type 'Fetcher.Callback' (aka '(Result<Fetcher.Response, 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'
78 | }
79 | }
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:115:17: warning: capture of 'self' with non-sendable type 'Fetcher?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 | // MARK: - Fetcher
34 |
35 | open class Fetcher {
| `- note: class 'Fetcher' does not conform to the 'Sendable' protocol
36 |
37 | // MARK: Types
:
113 | session.dataTask(with: request) { [weak self] data, response, error in
114 | if error == nil, let response = response as? HTTPURLResponse, let data = data {
115 | self?.handleValidResponse(
| `- warning: capture of 'self' with non-sendable type 'Fetcher?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
116 | response, with: data, from: request, completion: completion
117 | )
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:116:70: warning: capture of 'completion' with non-sendable type 'Fetcher.Callback' (aka '(Result<Fetcher.Response, any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
114 | if error == nil, let response = response as? HTTPURLResponse, let data = data {
115 | self?.handleValidResponse(
116 | response, with: data, from: request, completion: completion
| |- warning: capture of 'completion' with non-sendable type 'Fetcher.Callback' (aka '(Result<Fetcher.Response, 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'
117 | )
118 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:136:13: warning: capture of 'completion' with non-sendable type 'Fetcher.Callback' (aka '(Result<Fetcher.Response, any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
134 | private func dispatchResult(_ result: ResponseResult, completion: @escaping Callback) {
135 | DispatchQueue.main.async {
136 | completion(result)
| |- warning: capture of 'completion' with non-sendable type 'Fetcher.Callback' (aka '(Result<Fetcher.Response, 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'
137 | }
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:136:24: warning: capture of 'result' with non-sendable type 'Fetcher.ResponseResult' (aka 'Result<Fetcher.Response, any Error>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
37 | // MARK: Types
38 |
39 | public struct Response: APIResponse {
| `- note: consider making struct 'Response' conform to the 'Sendable' protocol
40 | public let request: URLRequest
41 | public let response: HTTPURLResponse
:
134 | private func dispatchResult(_ result: ResponseResult, completion: @escaping Callback) {
135 | DispatchQueue.main.async {
136 | completion(result)
| `- warning: capture of 'result' with non-sendable type 'Fetcher.ResponseResult' (aka 'Result<Fetcher.Response, any Error>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:136:13: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
134 | private func dispatchResult(_ result: ResponseResult, completion: @escaping Callback) {
135 | DispatchQueue.main.async {
136 | completion(result)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
137 | }
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/AENetwork/Fetcher.swift:136:24: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
134 | private func dispatchResult(_ result: ResponseResult, completion: @escaping Callback) {
135 | DispatchQueue.main.async {
136 | completion(result)
| |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'result' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
137 | }
138 | }
Build complete! (22.41s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "AENetwork",
"name" : "AENetwork",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "AENetwork",
"targets" : [
"AENetwork"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "AENetworkTests",
"module_type" : "SwiftTarget",
"name" : "AENetworkTests",
"path" : "Tests/AENetworkTests",
"sources" : [
"APIClientTests.swift",
"DataTests.swift",
"DownloaderTests.swift",
"FetcherTests.swift",
"HTTPURLResponseTests.swift",
"NetworkTests.swift",
"ReachabilityTests.swift",
"URLRequestTests.swift",
"URLTests.swift"
],
"target_dependencies" : [
"AENetwork"
],
"type" : "test"
},
{
"c99name" : "AENetwork",
"module_type" : "SwiftTarget",
"name" : "AENetwork",
"path" : "Sources/AENetwork",
"product_memberships" : [
"AENetwork"
],
"sources" : [
"APIClient.swift",
"Downloader.swift",
"Fetcher.swift",
"Helpers/Data+Helpers.swift",
"Helpers/HTTPURLResponse+Helpers.swift",
"Helpers/URL+Helpers.swift",
"Helpers/URLRequest+Helpers.swift",
"Network.swift",
"Reachability.swift"
],
"type" : "library"
}
],
"tools_version" : "5.2"
}
Done.