Build Information
Successful build of EZNetworking, reference main (e4617a), with Swift 6.1 for macOS (SPM) on 21 Apr 2026 19:34:21 UTC.
Swift 6 data race errors: 27
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -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 InferSendableFromCapturesBuild Log
13 |
14 | // MARK: init
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift:4:7: note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
2 |
3 | /// Default implementation of DownloadTaskInterceptor
4 | class DefaultDownloadTaskInterceptor: DownloadTaskInterceptor {
| `- note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
5 | var onEvent: (DownloadTaskInterceptorEvent) -> Void
6 | private let validator: ResponseValidator
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:175:56: warning: non-sendable type 'DefaultDownloadTaskInterceptor' of property 'fallbackDownloadTaskInterceptor' cannot exit nonisolated context; this is an error in the Swift 6 language mode
173 | private nonisolated func setupDownloadEventHandler(session: NetworkSession) {
174 | if session.delegate.downloadTaskInterceptor == nil {
175 | session.delegate.downloadTaskInterceptor = fallbackDownloadTaskInterceptor
| `- warning: non-sendable type 'DefaultDownloadTaskInterceptor' of property 'fallbackDownloadTaskInterceptor' cannot exit nonisolated context; this is an error in the Swift 6 language mode
176 | }
177 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift:4:7: note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
2 |
3 | /// Default implementation of DownloadTaskInterceptor
4 | class DefaultDownloadTaskInterceptor: DownloadTaskInterceptor {
| `- note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
5 | var onEvent: (DownloadTaskInterceptorEvent) -> Void
6 | private let validator: ResponseValidator
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:180:60: warning: capture of 'event' with non-sendable type 'DownloadTaskInterceptorEvent' in a '@Sendable' closure; this is an error in the Swift 6 language mode
178 | session.delegate.downloadTaskInterceptor?.onEvent = { [weak self] event in
179 | Task { @Sendable [weak self] in
180 | await self?.handleDownloadInterceptorEvent(event)
| `- warning: capture of 'event' with non-sendable type 'DownloadTaskInterceptorEvent' in a '@Sendable' closure; this is an error in the Swift 6 language mode
181 | }
182 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/Protocols/DownloadTaskInterceptor.swift:3:13: note: consider making enum 'DownloadTaskInterceptorEvent' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public enum DownloadTaskInterceptorEvent {
| `- note: consider making enum 'DownloadTaskInterceptorEvent' conform to the 'Sendable' protocol
4 | case onProgress(Double)
5 | case onDownloadCompleted(URL)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:44:9: warning: cannot access property 'session' with a non-sendable type 'any NetworkSession' from nonisolated deinit; this is an error in the Swift 6 language mode
42 |
43 | deinit {
44 | session.delegate.downloadTaskInterceptor?.onEvent = { _ in }
| `- warning: cannot access property 'session' with a non-sendable type 'any NetworkSession' from nonisolated deinit; this is an error in the Swift 6 language mode
45 | continuation?.finish()
46 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Session.swift:3:17: note: protocol 'NetworkSession' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol NetworkSession {
| `- note: protocol 'NetworkSession' does not conform to the 'Sendable' protocol
4 | var configuration: URLSessionConfiguration { get }
5 | var delegate: SessionDelegate { get }
[87/98] Compiling EZNetworking ResponseValidator.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:12:13: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'DefaultDownloadTaskInterceptor'; this is an error in the Swift 6 language mode
10 |
11 | /// Strong reference since SessionDelegate.downloadTaskInterceptor is weak
12 | private nonisolated let fallbackDownloadTaskInterceptor: DefaultDownloadTaskInterceptor
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'DefaultDownloadTaskInterceptor'; this is an error in the Swift 6 language mode
13 |
14 | // MARK: init
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift:4:7: note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
2 |
3 | /// Default implementation of DownloadTaskInterceptor
4 | class DefaultDownloadTaskInterceptor: DownloadTaskInterceptor {
| `- note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
5 | var onEvent: (DownloadTaskInterceptorEvent) -> Void
6 | private let validator: ResponseValidator
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:175:56: warning: non-sendable type 'DefaultDownloadTaskInterceptor' of property 'fallbackDownloadTaskInterceptor' cannot exit nonisolated context; this is an error in the Swift 6 language mode
173 | private nonisolated func setupDownloadEventHandler(session: NetworkSession) {
174 | if session.delegate.downloadTaskInterceptor == nil {
175 | session.delegate.downloadTaskInterceptor = fallbackDownloadTaskInterceptor
| `- warning: non-sendable type 'DefaultDownloadTaskInterceptor' of property 'fallbackDownloadTaskInterceptor' cannot exit nonisolated context; this is an error in the Swift 6 language mode
176 | }
177 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift:4:7: note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
2 |
3 | /// Default implementation of DownloadTaskInterceptor
4 | class DefaultDownloadTaskInterceptor: DownloadTaskInterceptor {
| `- note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
5 | var onEvent: (DownloadTaskInterceptorEvent) -> Void
6 | private let validator: ResponseValidator
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:180:60: warning: capture of 'event' with non-sendable type 'DownloadTaskInterceptorEvent' in a '@Sendable' closure; this is an error in the Swift 6 language mode
178 | session.delegate.downloadTaskInterceptor?.onEvent = { [weak self] event in
179 | Task { @Sendable [weak self] in
180 | await self?.handleDownloadInterceptorEvent(event)
| `- warning: capture of 'event' with non-sendable type 'DownloadTaskInterceptorEvent' in a '@Sendable' closure; this is an error in the Swift 6 language mode
181 | }
182 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/Protocols/DownloadTaskInterceptor.swift:3:13: note: consider making enum 'DownloadTaskInterceptorEvent' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public enum DownloadTaskInterceptorEvent {
| `- note: consider making enum 'DownloadTaskInterceptorEvent' conform to the 'Sendable' protocol
4 | case onProgress(Double)
5 | case onDownloadCompleted(URL)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:44:9: warning: cannot access property 'session' with a non-sendable type 'any NetworkSession' from nonisolated deinit; this is an error in the Swift 6 language mode
42 |
43 | deinit {
44 | session.delegate.downloadTaskInterceptor?.onEvent = { _ in }
| `- warning: cannot access property 'session' with a non-sendable type 'any NetworkSession' from nonisolated deinit; this is an error in the Swift 6 language mode
45 | continuation?.finish()
46 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Session.swift:3:17: note: protocol 'NetworkSession' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol NetworkSession {
| `- note: protocol 'NetworkSession' does not conform to the 'Sendable' protocol
4 | var configuration: URLSessionConfiguration { get }
5 | var delegate: SessionDelegate { get }
[88/98] Compiling EZNetworking FileDownloader.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:12:13: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'DefaultDownloadTaskInterceptor'; this is an error in the Swift 6 language mode
10 |
11 | /// Strong reference since SessionDelegate.downloadTaskInterceptor is weak
12 | private nonisolated let fallbackDownloadTaskInterceptor: DefaultDownloadTaskInterceptor
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'DefaultDownloadTaskInterceptor'; this is an error in the Swift 6 language mode
13 |
14 | // MARK: init
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift:4:7: note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
2 |
3 | /// Default implementation of DownloadTaskInterceptor
4 | class DefaultDownloadTaskInterceptor: DownloadTaskInterceptor {
| `- note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
5 | var onEvent: (DownloadTaskInterceptorEvent) -> Void
6 | private let validator: ResponseValidator
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:175:56: warning: non-sendable type 'DefaultDownloadTaskInterceptor' of property 'fallbackDownloadTaskInterceptor' cannot exit nonisolated context; this is an error in the Swift 6 language mode
173 | private nonisolated func setupDownloadEventHandler(session: NetworkSession) {
174 | if session.delegate.downloadTaskInterceptor == nil {
175 | session.delegate.downloadTaskInterceptor = fallbackDownloadTaskInterceptor
| `- warning: non-sendable type 'DefaultDownloadTaskInterceptor' of property 'fallbackDownloadTaskInterceptor' cannot exit nonisolated context; this is an error in the Swift 6 language mode
176 | }
177 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift:4:7: note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
2 |
3 | /// Default implementation of DownloadTaskInterceptor
4 | class DefaultDownloadTaskInterceptor: DownloadTaskInterceptor {
| `- note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
5 | var onEvent: (DownloadTaskInterceptorEvent) -> Void
6 | private let validator: ResponseValidator
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:180:60: warning: capture of 'event' with non-sendable type 'DownloadTaskInterceptorEvent' in a '@Sendable' closure; this is an error in the Swift 6 language mode
178 | session.delegate.downloadTaskInterceptor?.onEvent = { [weak self] event in
179 | Task { @Sendable [weak self] in
180 | await self?.handleDownloadInterceptorEvent(event)
| `- warning: capture of 'event' with non-sendable type 'DownloadTaskInterceptorEvent' in a '@Sendable' closure; this is an error in the Swift 6 language mode
181 | }
182 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/Protocols/DownloadTaskInterceptor.swift:3:13: note: consider making enum 'DownloadTaskInterceptorEvent' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public enum DownloadTaskInterceptorEvent {
| `- note: consider making enum 'DownloadTaskInterceptorEvent' conform to the 'Sendable' protocol
4 | case onProgress(Double)
5 | case onDownloadCompleted(URL)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:44:9: warning: cannot access property 'session' with a non-sendable type 'any NetworkSession' from nonisolated deinit; this is an error in the Swift 6 language mode
42 |
43 | deinit {
44 | session.delegate.downloadTaskInterceptor?.onEvent = { _ in }
| `- warning: cannot access property 'session' with a non-sendable type 'any NetworkSession' from nonisolated deinit; this is an error in the Swift 6 language mode
45 | continuation?.finish()
46 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Session.swift:3:17: note: protocol 'NetworkSession' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol NetworkSession {
| `- note: protocol 'NetworkSession' does not conform to the 'Sendable' protocol
4 | var configuration: URLSessionConfiguration { get }
5 | var delegate: SessionDelegate { get }
[89/98] Compiling EZNetworking DownloadEvent.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:12:13: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'DefaultDownloadTaskInterceptor'; this is an error in the Swift 6 language mode
10 |
11 | /// Strong reference since SessionDelegate.downloadTaskInterceptor is weak
12 | private nonisolated let fallbackDownloadTaskInterceptor: DefaultDownloadTaskInterceptor
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'DefaultDownloadTaskInterceptor'; this is an error in the Swift 6 language mode
13 |
14 | // MARK: init
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift:4:7: note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
2 |
3 | /// Default implementation of DownloadTaskInterceptor
4 | class DefaultDownloadTaskInterceptor: DownloadTaskInterceptor {
| `- note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
5 | var onEvent: (DownloadTaskInterceptorEvent) -> Void
6 | private let validator: ResponseValidator
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:175:56: warning: non-sendable type 'DefaultDownloadTaskInterceptor' of property 'fallbackDownloadTaskInterceptor' cannot exit nonisolated context; this is an error in the Swift 6 language mode
173 | private nonisolated func setupDownloadEventHandler(session: NetworkSession) {
174 | if session.delegate.downloadTaskInterceptor == nil {
175 | session.delegate.downloadTaskInterceptor = fallbackDownloadTaskInterceptor
| `- warning: non-sendable type 'DefaultDownloadTaskInterceptor' of property 'fallbackDownloadTaskInterceptor' cannot exit nonisolated context; this is an error in the Swift 6 language mode
176 | }
177 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift:4:7: note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
2 |
3 | /// Default implementation of DownloadTaskInterceptor
4 | class DefaultDownloadTaskInterceptor: DownloadTaskInterceptor {
| `- note: class 'DefaultDownloadTaskInterceptor' does not conform to the 'Sendable' protocol
5 | var onEvent: (DownloadTaskInterceptorEvent) -> Void
6 | private let validator: ResponseValidator
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:180:60: warning: capture of 'event' with non-sendable type 'DownloadTaskInterceptorEvent' in a '@Sendable' closure; this is an error in the Swift 6 language mode
178 | session.delegate.downloadTaskInterceptor?.onEvent = { [weak self] event in
179 | Task { @Sendable [weak self] in
180 | await self?.handleDownloadInterceptorEvent(event)
| `- warning: capture of 'event' with non-sendable type 'DownloadTaskInterceptorEvent' in a '@Sendable' closure; this is an error in the Swift 6 language mode
181 | }
182 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Interceptors/Protocols/DownloadTaskInterceptor.swift:3:13: note: consider making enum 'DownloadTaskInterceptorEvent' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public enum DownloadTaskInterceptorEvent {
| `- note: consider making enum 'DownloadTaskInterceptorEvent' conform to the 'Sendable' protocol
4 | case onProgress(Double)
5 | case onDownloadCompleted(URL)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Downloader/FileDownloader.swift:44:9: warning: cannot access property 'session' with a non-sendable type 'any NetworkSession' from nonisolated deinit; this is an error in the Swift 6 language mode
42 |
43 | deinit {
44 | session.delegate.downloadTaskInterceptor?.onEvent = { _ in }
| `- warning: cannot access property 'session' with a non-sendable type 'any NetworkSession' from nonisolated deinit; this is an error in the Swift 6 language mode
45 | continuation?.finish()
46 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Session/Session.swift:3:17: note: protocol 'NetworkSession' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol NetworkSession {
| `- note: protocol 'NetworkSession' does not conform to the 'Sendable' protocol
4 | var configuration: URLSessionConfiguration { get }
5 | var delegate: SessionDelegate { get }
[90/98] Compiling EZNetworking DownloadState.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
[91/98] Compiling EZNetworking FileDownloadable.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
[92/98] Compiling EZNetworking RequestPerformable.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
[93/98] Compiling EZNetworking RequestPerformer.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
[94/98] Compiling EZNetworking ServerSentEventCallbackClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
[95/98] Compiling EZNetworking ServerSentEventPublisherClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
[96/98] Compiling EZNetworking ServerSentEventCallbackAdapter.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
[97/98] Compiling EZNetworking ServerSentEventPublisherAdapter.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
[98/98] Compiling EZNetworking ServerSentEventClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:28: warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
2 | import Foundation
3 |
4 | public struct RequestPerformer: RequestPerformable {
| `- note: consider making struct 'RequestPerformer' conform to the 'Sendable' protocol
5 | private let session: NetworkSession
6 | private let validator: ResponseValidator
:
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'self' with non-sendable type 'RequestPerformer' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:58: warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| `- warning: capture of 'request' with non-sendable type 'any Request' in a '@Sendable' closure; this is an error in the Swift 6 language mode
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Core/Request/Request.swift:3:17: note: protocol 'Request' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol Request {
| `- note: protocol 'Request' does not conform to the 'Sendable' protocol
4 | var httpMethod: HTTPMethod { get }
5 | var baseUrl: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:49:106: warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
47 | let taskBox = TaskBox()
48 | let cancellableRequest = CancellableRequest {
49 | taskBox.task = createTaskAndPerform(request: request, decodeTo: decodableObject, completion: completion)
| |- warning: capture of 'completion' with non-sendable type '(Result<T, NetworkingError>) -> Void' 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'
50 | } onCancel: {
51 | taskBox.task?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/Performers/RequestPerformer.swift:82: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
80 | completion: @escaping ((Result<T, NetworkingError>) -> Void)
81 | ) -> Task<Void, Never> {
82 | 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
83 | do {
84 | let result = try await perform(request: request, decodeTo: decodableObject)
| | `- note: closure captures non-Sendable 'request'
| `- note: closure captures non-Sendable 'self'
85 | guard !Task.isCancelled else { return }
86 | completion(.success(result))
| `- note: closure captures non-Sendable 'completion'
87 | } catch is CancellationError {
88 | // Task has been cancelled, do not return
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:27:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
25 | ) {
26 | self.init(
27 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
28 | )
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:37: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
35 |
36 | public func connect(completion: @escaping (Result<Void, Error>) -> Void) {
37 | 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
38 | do {
39 | try await actor.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
40 | completion(.success(()))
41 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:48: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
46 |
47 | public func disconnect(completion: @escaping (Result<Void, Error>) -> Void) {
48 | 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
49 | do {
50 | try await actor.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
51 | completion(.success(()))
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:59: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
57 |
58 | public func terminate() {
59 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
60 | }
61 |
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:65:26: 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
63 | eventHandler = handler
64 | eventTask?.cancel()
65 | eventTask = 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
66 | for await event in await actor.events {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | handler(event)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift:75:26: 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
73 | stateHandler = handler
74 | stateTask?.cancel()
75 | stateTask = 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
76 | for await state in await actor.stateEvents {
| `- note: closure captures 'self' which is accessible to code in the current task
77 | handler(state)
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:79:26: 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 | private func subscribeToEvents() {
78 | eventTask?.cancel()
79 | eventTask = Task { [weak self] in
| `- 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 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
81 | for await event in await actor.events {
82 | eventSubject.send(event)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:89:26: 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
87 | private func subscribeToStateEvents() {
88 | stateTask?.cancel()
89 | stateTask = Task { [weak self] in
| `- 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
90 | guard let self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
91 | for await state in await actor.stateEvents {
92 | stateSubject.send(state)
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'request' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'request' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'session' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'session' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:28:36: warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
26 | ) {
27 | self.init(
28 | serverSentEventClient: ServerSentEventManager(request: request, session: session, retryPolicy: retryPolicy, responseValidator: responseValidator)
| |- warning: sending 'responseValidator' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'responseValidator' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
29 | )
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:41:18: 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
39 | public func connect() -> AnyPublisher<Void, Error> {
40 | Future { [actor] promise in
41 | 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
42 | do {
43 | try await actor.connect()
44 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
45 | } catch {
46 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:54:18: 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
52 | public func disconnect() -> AnyPublisher<Void, Error> {
53 | Future { [actor] promise in
54 | 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
55 | do {
56 | try await actor.disconnect()
57 | promise(.success(()))
| `- note: closure captures 'promise' which is accessible to code in the current task
58 | } catch {
59 | promise(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift:66: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
64 |
65 | public func terminate() {
66 | Task { await actor.terminate() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
67 | }
68 |
Build complete! (6.61s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "EZNetworking",
"name" : "EZNetworking",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "15.0"
},
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "watchos",
"version" : "8.0"
},
{
"name" : "tvos",
"version" : "15.0"
},
{
"name" : "visionos",
"version" : "1.0"
}
],
"products" : [
{
"name" : "EZNetworking",
"targets" : [
"EZNetworking"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "EZNetworkingTests",
"module_type" : "SwiftTarget",
"name" : "EZNetworkingTests",
"path" : "Tests/EZNetworkingTests",
"sources" : [
"Core/Common/CancellableRequestTests.swift",
"Core/Common/Decoding/EZJSONDecoderTests.swift",
"Core/Common/Extensions/AsyncSequence-extTests.swift",
"Core/Common/Extensions/Data-extTests.swift",
"Core/Common/Extensions/String-extTests.swift",
"Core/Common/RetryPolicyTests.swift",
"Core/Common/TaskBoxTests.swift",
"Core/Error/HTTPResponse/HTTPResponseTests.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPClientErrorStatusTests.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPInformationalStatusTests.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPRedirectionStatusTests.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPServerErrorStatusTests.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPSuccessStatusTests.swift",
"Core/Error/NetworkFailureReason/DecodingFailureReasonTests.swift",
"Core/Error/NetworkFailureReason/DownloadFailureReasonTests.swift",
"Core/Error/NetworkFailureReason/RequestFailureReasonTests.swift",
"Core/Error/NetworkFailureReason/ResponseValidationFailureReasonTests.swift",
"Core/Error/NetworkFailureReason/SendableError/SendableErrorTests.swift",
"Core/Error/NetworkFailureReason/ServerSentEvenFailureReasonTests.swift",
"Core/Error/NetworkFailureReason/URLBuildFailureReasonTests.swift",
"Core/Error/NetworkFailureReason/WebSocketFailureReasonTests.swift",
"Core/Error/NetworkingErrorTests.swift",
"Core/HTTP/Body/HTTPBodyTests.swift",
"Core/HTTP/Body/MultipartFormData/MultipartFormDataTests.swift",
"Core/HTTP/Body/MultipartFormData/MultipartFormPartTests.swift",
"Core/HTTP/Headers/AuthorizationTypeTests.swift",
"Core/HTTP/Headers/HTTPHeaderApplierTests.swift",
"Core/HTTP/Headers/HTTPHeaderTests.swift",
"Core/HTTP/Headers/MimeTypeTests.swift",
"Core/HTTP/Methods/HTTPMethodTests.swift",
"Core/HTTP/Parameters/HTTPParameterApplierTests.swift",
"Core/HTTP/Parameters/HTTPParameterTests.swift",
"Core/Request/Creational/RequestBuilderTests.swift",
"Core/Request/Creational/RequestFactoryTests.swift",
"Core/Request/Creational/URLBuilderTests.swift",
"Core/Request/RequestTests.swift",
"Core/Request/SpecializedRequests/DownloadRequestTests.swift",
"Core/Request/SpecializedRequests/SSERequestTests.swift",
"Core/Request/SpecializedRequests/WebSocketRequestTests.swift",
"Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptorTests.swift",
"Core/Session/Interceptors/DefaultInterceptors/DefaultUploadTaskInterceptor.swift",
"Core/Session/Interceptors/DefaultInterceptors/DefaultWebSocketTaskInterceptorTests.swift",
"Core/Session/SessionDelegate+Extensions+Tests/SessionDelegate+URLSessionDataDelegate+Tests.swift",
"Core/Session/SessionDelegate+Extensions+Tests/SessionDelegate+URLSessionDelegate+Tests.swift",
"Core/Session/SessionDelegate+Extensions+Tests/SessionDelegate+URLSessionDownloadDelegate+Tests.swift",
"Core/Session/SessionDelegate+Extensions+Tests/SessionDelegate+URLSessionStreamDelegate+Tests.swift",
"Core/Session/SessionDelegate+Extensions+Tests/SessionDelegate+URLSessionTaskDelegate+Tests.swift",
"Core/Session/SessionDelegate+Extensions+Tests/SessionDelegate+URLSessionWebSocketDelegate+Tests.swift",
"Core/Session/SessionTests.swift",
"Core/Session/URLSessionProtocols/URLSessionDownloadTaskProtocolTests.swift",
"Core/Session/URLSessionProtocols/URLSessionWebSocketTaskProtocolTest.swift",
"Core/Validator/ResponseValidatorTests.swift",
"Services/Downloader/FileDownloaderCoreFunctionalityTests.swift",
"Services/Downloader/FileDownloaderInvalidStateTests.swift",
"Services/Downloader/FileDownloaderPauseResumeTests.swift",
"Services/Downloader/FileDownloaderTaskCancellationTests.swift",
"Services/Downloader/Helpers/DownloadEventTests.swift",
"Services/Downloader/Helpers/DownloadStateTests.swift",
"Services/Downloader/Mocks/MockDownloadTask.swift",
"Services/Downloader/Mocks/MockDownloadTaskInterceptor.swift",
"Services/Downloader/Mocks/MockFileDownloaderURLSession.swift",
"Services/Performers/Mocks/MockRequestPerformerURLSession.swift",
"Services/Performers/RequestPerformable_asyncAwait_Tests.swift",
"Services/Performers/RequestPerformable_callbacks_Tests.swift",
"Services/Performers/RequestPerformable_publisher_Tests.swift",
"Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapterTests.swift",
"Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapterTests.swift",
"Services/ServerSentEvent/Core/ServerSentEventManagerTests.swift",
"Services/ServerSentEvent/Core/ServerSentEventManagerWithRetryTests.swift",
"Services/ServerSentEvent/Helpers/SSEConnectionStateTests.swift",
"Services/ServerSentEvent/Helpers/SSEParserTests.swift",
"Services/ServerSentEvent/Helpers/ServerSentEventTests.swift",
"Services/ServerSentEvent/Mocks/MockSSEURLSession.swift",
"Services/Uploader/DataUploader/DataUploader_asyncAwait_Tests.swift",
"Services/Uploader/DataUploader/DataUploader_asyncStream_Tests.swift",
"Services/Uploader/DataUploader/DataUploader_callbacks_Tests.swift",
"Services/Uploader/DataUploader/DataUploader_publisher_Tests.swift",
"Services/Uploader/DataUploader/Mocks/MockDataUploaderURLSession.swift",
"Services/Uploader/FileUploader/FileUploader_asyncAwait_Tests.swift",
"Services/Uploader/FileUploader/FileUploader_asyncStream_Tests.swift",
"Services/Uploader/FileUploader/FileUploader_callbacks_Tests.swift",
"Services/Uploader/FileUploader/FileUploader_publisher_Tests.swift",
"Services/Uploader/FileUploader/Mocks/MockFileUploaderURLSession.swift",
"Services/Uploader/Mocks/MockUploadTaskInterceptor.swift",
"Services/WebSocket/Adaptors/WebSocketCallbackAdapterTests.swift",
"Services/WebSocket/Adaptors/WebSocketPublisherAdapterTests.swift",
"Services/WebSocket/Core/WebSocket_Connect_Tests.swift",
"Services/WebSocket/Core/WebSocket_Disconnect_Tests.swift",
"Services/WebSocket/Core/WebSocket_Messages_Tests.swift",
"Services/WebSocket/Core/WebSocket_Send_Tests.swift",
"Services/WebSocket/Core/WebSocket_StateEvents_Tests.swift",
"Services/WebSocket/Helpers/PingConfigTests.swift",
"Services/WebSocket/Helpers/WebSocketConnectionStateTests.swift",
"Services/WebSocket/Mocks/MockURLSessionWebSocketTask.swift",
"Services/WebSocket/Mocks/MockWebSockerURLSession.swift",
"Services/WebSocket/Mocks/MockWebSocketTaskInterceptor.swift",
"TestSupport/Expectation.swift",
"TestSupport/ExpectationTests.swift",
"TestSupport/Mocks/Mock-Codeable.swift",
"TestSupport/Mocks/Mock-JSON.swift",
"TestSupport/Mocks/MockSession.swift",
"TestSupport/Mocks/MockURLResponseValidator.swift"
],
"target_dependencies" : [
"EZNetworking"
],
"type" : "test"
},
{
"c99name" : "EZNetworking",
"module_type" : "SwiftTarget",
"name" : "EZNetworking",
"path" : "Sources/EZNetworking",
"product_memberships" : [
"EZNetworking"
],
"sources" : [
"Core/Common/CancellableRequest.swift",
"Core/Common/Decoding/EZJSONDecoder.swift",
"Core/Common/EmptyResponse.swift",
"Core/Common/Extensions/AsyncSequence-ext.swift",
"Core/Common/Extensions/Data-ext.swift",
"Core/Common/Extensions/String-ext.swift",
"Core/Common/RetryPolicy.swift",
"Core/Common/TaskBox.swift",
"Core/Error/HTTPResponse/HTTPResponse.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPClientErrorStatus.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPInformationalStatus.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPRedirectionStatus.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPServerErrorStatus.swift",
"Core/Error/HTTPResponse/StatusCodeTypes/HTTPSuccessStatus.swift",
"Core/Error/NetworkFailureReason/DecodingFailureReason.swift",
"Core/Error/NetworkFailureReason/DownloadFailureReason.swift",
"Core/Error/NetworkFailureReason/RequestFailureReason.swift",
"Core/Error/NetworkFailureReason/ResponseValidationFailureReason.swift",
"Core/Error/NetworkFailureReason/SendableError/SendableError.swift",
"Core/Error/NetworkFailureReason/ServerSentEvenFailureReason.swift",
"Core/Error/NetworkFailureReason/URLBuildFailureReason.swift",
"Core/Error/NetworkFailureReason/WebSocketFailureReason.swift",
"Core/Error/NetworkingError.swift",
"Core/HTTP/Body/HTTPBody.swift",
"Core/HTTP/Body/MultipartFormData/MultipartFormData.swift",
"Core/HTTP/Body/MultipartFormData/MultipartFormPart.swift",
"Core/HTTP/Headers/AuthorizationType.swift",
"Core/HTTP/Headers/HTTPHeader.swift",
"Core/HTTP/Headers/HTTPHeaderApplier.swift",
"Core/HTTP/Headers/MimeType.swift",
"Core/HTTP/Methods/HTTPMethod.swift",
"Core/HTTP/Parameters/HTTPParameter.swift",
"Core/HTTP/Parameters/HTTPParameterApplier.swift",
"Core/Request/Creational/RequestBuilder.swift",
"Core/Request/Creational/RequestFactory.swift",
"Core/Request/Creational/URLBuilder.swift",
"Core/Request/Request.swift",
"Core/Request/SpecializedRequests/DownloadRequest.swift",
"Core/Request/SpecializedRequests/EZRequest.swift",
"Core/Request/SpecializedRequests/SSERequest.swift",
"Core/Request/SpecializedRequests/WebSocketRequest.swift",
"Core/Session/Interceptors/DefaultInterceptors/DefaultDownloadTaskInterceptor.swift",
"Core/Session/Interceptors/DefaultInterceptors/DefaultUploadTaskInterceptor.swift",
"Core/Session/Interceptors/DefaultInterceptors/DefaultWebSocketTaskInterceptor.swift",
"Core/Session/Interceptors/Protocols/AuthenticationInterceptor.swift",
"Core/Session/Interceptors/Protocols/CacheInterceptor.swift",
"Core/Session/Interceptors/Protocols/DataTaskInterceptor.swift",
"Core/Session/Interceptors/Protocols/DownloadTaskInterceptor.swift",
"Core/Session/Interceptors/Protocols/MetricsInterceptor.swift",
"Core/Session/Interceptors/Protocols/RedirectInterceptor.swift",
"Core/Session/Interceptors/Protocols/StreamTaskInterceptor.swift",
"Core/Session/Interceptors/Protocols/TaskLifecycleInterceptor.swift",
"Core/Session/Interceptors/Protocols/UploadTaskInterceptor.swift",
"Core/Session/Interceptors/Protocols/WebSocketTaskInterceptor.swift",
"Core/Session/Session.swift",
"Core/Session/SessionDelegate+Extensions/SessionDelegate+URLSessionDataDelegate.swift",
"Core/Session/SessionDelegate+Extensions/SessionDelegate+URLSessionDelegate.swift",
"Core/Session/SessionDelegate+Extensions/SessionDelegate+URLSessionDownloadDelegate.swift",
"Core/Session/SessionDelegate+Extensions/SessionDelegate+URLSessionStreamDelegate.swift",
"Core/Session/SessionDelegate+Extensions/SessionDelegate+URLSessionTaskDelegate.swift",
"Core/Session/SessionDelegate+Extensions/SessionDelegate+URLSessionWebSocketDelegate.swift",
"Core/Session/SessionDelegate.swift",
"Core/Session/URLSessionProtocols/URLSessionDownloadTaskProtocol.swift",
"Core/Session/URLSessionProtocols/URLSessionProtocol.swift",
"Core/Session/URLSessionProtocols/URLSessionWebSocketTaskProtocol.swift",
"Core/Validator/ResponseValidator.swift",
"Services/Downloader/FileDownloader.swift",
"Services/Downloader/Helpers/DownloadEvent.swift",
"Services/Downloader/Helpers/DownloadState.swift",
"Services/Downloader/Protocols/FileDownloadable.swift",
"Services/Performers/Protocols/RequestPerformable.swift",
"Services/Performers/RequestPerformer.swift",
"Services/ServerSentEvent/Adaptors/Protocols/ServerSentEventCallbackClient.swift",
"Services/ServerSentEvent/Adaptors/Protocols/ServerSentEventPublisherClient.swift",
"Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift",
"Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift",
"Services/ServerSentEvent/Core/Protocols/ServerSentEventClient.swift",
"Services/ServerSentEvent/Core/ServerSentEventManager.swift",
"Services/ServerSentEvent/Helpers/SSEConnectionState.swift",
"Services/ServerSentEvent/Helpers/SSEParser.swift",
"Services/ServerSentEvent/Helpers/ServerSentEvent.swift",
"Services/Uploader/DataUploader/DataUploader.swift",
"Services/Uploader/DataUploader/Protocols/DataUploadable.swift",
"Services/Uploader/FileUploader/FileUploader.swift",
"Services/Uploader/FileUploader/Protocols/FileUploadable.swift",
"Services/Uploader/Shared/UploadStreamEvent.swift",
"Services/Uploader/Shared/UploadTypealias.swift",
"Services/WebSocket/Adaptors/Protocols/WebSocketCallbackClient.swift",
"Services/WebSocket/Adaptors/Protocols/WebSocketPublisherClient.swift",
"Services/WebSocket/Adaptors/WebSocketCallbackAdapter.swift",
"Services/WebSocket/Adaptors/WebSocketPublisherAdapter.swift",
"Services/WebSocket/Core/Protocols/WebSocketClient.swift",
"Services/WebSocket/Core/WebSocket.swift",
"Services/WebSocket/Helpers/PingConfig.swift",
"Services/WebSocket/Helpers/WebSocketConnectionState.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Done.