Build Information
Failed to build RealHTTP with Swift 6.0 for Linux.
Build Command
bash -c docker run --rm -v "checkouts-4609320-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Build Log
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
| `- warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
24 | internal static let DefaultTimeout = TimeInterval(10)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:25:12: note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
23 | /// This is the raw response received from server. It includes all the
24 | /// data collected from the request including metrics and errors.
25 | open class HTTPResponse: CustomStringConvertible {
| `- note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
26 |
27 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:23:48: error: cannot find type 'URLRequest' in scope
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
| `- error: cannot find type 'URLRequest' in scope
24 | internal static let DefaultTimeout = TimeInterval(10)
25 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:34:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// Session task currently in execution.
34 | public internal(set) weak var sessionTask: URLSessionTask?
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Client in which the task is running.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPMethod.swift:48:23: warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
38 | /// - `options`: The OPTIONS method is used to describe the communication options for the target resource.
39 | /// - `patch`: The PATCH method is used to apply partial modifications to a resource.
40 | public struct HTTPMethod: RawRepresentable, Equatable, Hashable, CaseIterable, CustomStringConvertible {
| `- note: consider making struct 'HTTPMethod' conform to the 'Sendable' protocol
41 |
42 | public static var allCases: [HTTPMethod] = [.connect, .delete, .get, .head, .options, .patch, .post, .put, .trace]
:
46 | public static let connect = HTTPMethod(rawValue: "CONNECT")
47 | public static let delete = HTTPMethod(rawValue: "DELETE")
48 | public static let get = HTTPMethod(rawValue: "GET")
| |- warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'get' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | public static let head = HTTPMethod(rawValue: "HEAD")
50 | public static let options = HTTPMethod(rawValue: "OPTIONS")
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:123:29: error: cannot find type 'URLRequest' in scope
121 | /// NOTE:
122 | /// When not specified the HTTPClient's value where the request is executed is used.
123 | public var cachePolicy: URLRequest.CachePolicy?
| `- error: cannot find type 'URLRequest' in scope
124 |
125 | /// The HTTP Protocol version to use for request.
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPVersion.swift:33:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the HTTP protocol version used for request.
22 | public struct HTTPVersion: Equatable, Hashable, Codable, RawRepresentable,
| `- note: consider making struct 'HTTPVersion' conform to the 'Sendable' protocol
23 | ExpressibleByFloatLiteral, CustomStringConvertible {
24 |
:
31 | public static let v2_0: Self = 2.0
32 | public static let v3_0: Self = 3.0
33 | public static let `default`: Self = v2_0
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
34 |
35 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/HTTPBody.swift:29:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | /// Defines the body of a request, including the content's body and additional headers.
24 | public struct HTTPBody {
| `- note: consider making struct 'HTTPBody' conform to the 'Sendable' protocol
25 |
26 | // MARK: - Public Static Properties
27 |
28 | /// No data to send.
29 | public static let empty = HTTPBody(content: Data())
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:293:49: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
291 | /// 2. Each new get call to cookies produce new instances of `HTTPCookie` even with the same values
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
295 | HTTPHeaders.Element(name: item.key, value: item.value)
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:417:79: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
415 | /// - Parameter client: client where the query should be executed.
416 | /// - Returns: `URLSessionTask`
417 | internal func urlSessionTask(inClient client: HTTPClient) async throws -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
418 | // Generate the `URLRequest` instance.
419 | var urlRequest = try await urlRequest(inClient: client)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:451:76: error: cannot find type 'URLRequest' in scope
449 | /// - Parameter client: client instance.
450 | /// - Returns: `URLRequest`
451 | internal func urlRequest(inClient client: HTTPClient?) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
452 | guard let client = client,
453 | let fullURL = urlComponents.fullURLInClient(client) else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:28: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:43: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:30: warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:59: error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:272:30: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
271 | } else {
272 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:275:26: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
275 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
276 | }
277 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:294:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
| `- error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
295 | HTTPHeaders.Element(name: item.key, value: item.value)
296 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPScheme.swift:24:16: warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the protocol scheme for an URL.
22 | public struct HTTPScheme: Equatable, Hashable, Codable, RawRepresentable, CustomStringConvertible {
| `- note: consider making struct 'HTTPScheme' conform to the 'Sendable' protocol
23 | static let http: Self = "http"
24 | static let https: Self = "https"
| |- warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'https' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 | static let ftp: Self = "ftp"
26 | static let sftp: Self = "sftp"
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:425:19: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
423 |
424 | // Create the `URLSessionTask` instance.
425 | var task: URLSessionTask!
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:428:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
428 | task = client.session.uploadTask(withStreamedRequest: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
429 | } else {
430 | switch transferMode {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:432:39: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
430 | switch transferMode {
431 | case .default:
432 | task = client.session.dataTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
433 | case .largeData:
434 | if let partialData = partialData {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:435:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
433 | case .largeData:
434 | if let partialData = partialData {
435 | task = client.session.downloadTask(withResumeData: partialData)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:437:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
435 | task = client.session.downloadTask(withResumeData: partialData)
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
438 | }
439 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:443:14: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
441 |
442 | /// Keep in mind it's just a suggestion for HTTP/2 based services.
443 | task.priority = httpPriority.urlTaskPriority
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
444 | return task
445 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:466:30: error: cannot find 'URLRequest' in scope
464 |
465 | // Prepare the request
466 | var urlRequest = try URLRequest(url: fullURL,
| `- error: cannot find 'URLRequest' in scope
467 | method: method,
468 | cachePolicy: requestCachePolicy,
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:34:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// `URLResponse` object received from server.
34 | open var urlResponse: URLResponse?
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:37:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | urlResponse as? HTTPURLResponse
39 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:38: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:60: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:21: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
39 | }
40 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:25: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | }
40 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:87:23: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
85 | /// Headers received into the response.
86 | open var headers: HTTPHeaders {
87 | httpResponse?.headers ?? HTTPHeaders()
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
88 | }
89 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
[76/80] Compiling RealHTTP HTTPBody.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
21 | /// HTTPClient is the place where each request will be executed.
22 | /// It contains the complete configuration, keep cookies and sessions.
23 | public class HTTPClient {
| `- note: class 'HTTPClient' does not conform to the 'Sendable' protocol
24 |
25 | // MARK: - Public Properties
26 |
27 | /// Shared HTTPClient instance.
28 | public static let shared = HTTPClient(baseURL: nil)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 |
30 | /// Delegate of the client.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:59: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
119 |
120 | self.baseURL = baseURL
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:63:58: error: cannot find type 'URLRequest' in scope
61 | /// - newRequest: the request to follow in redirect.
62 | func client(_ client: HTTPClient, willPerformRedirect request: ExecutedRequest,
63 | response: HTTPResponse, with newRequest: URLRequest)
| `- error: cannot find type 'URLRequest' in scope
64 |
65 | /// Client receive an auth challenge which will be managed by the `security` property of the
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:41:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | /// URLSessionConfigurastion used to perform request in this client.
41 | public var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | loader.session
43 | }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:47:29: error: cannot find type 'URLRequest' in scope
45 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
46 | /// Requests may override this behaviour.
47 | public var cachePolicy: URLRequest.CachePolicy {
| `- error: cannot find type 'URLRequest' in scope
48 | get { loader.cachePolicy }
49 | set { loader.cachePolicy = newValue }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:66:31: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
| `- error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
67 | session.configuration.httpCookieStorage
68 | }
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookieStorage = AnyObject
| `- note: 'HTTPCookieStorage' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
119 |
120 | self.baseURL = baseURL
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:132:46: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter url: URL.
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
134 | }
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader.swift:39:31: error: cannot find type 'URLRequest' in scope
37 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
38 | /// Requests may override this behaviour.
39 | internal var cachePolicy: URLRequest.CachePolicy = .useProtocolCachePolicy
| `- error: cannot find type 'URLRequest' in scope
40 |
41 | // MARK: - Private Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:67:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
67 | session.configuration.httpCookieStorage
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
68 | }
69 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:133:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
134 | }
135 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:23:62: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | /// Identify a list of events you can monitor during the lifecycle of the client instance.
22 | public protocol HTTPClientDelegate: AnyObject {
23 | typealias ExecutedRequest = (request: HTTPRequest, task: URLSessionTask)
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 |
25 | /// A new request is enqueued into the client's pool.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:73:32: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | /// - authChallenge: challenge received.
72 | func client(_ client: HTTPClient, didReceiveAuthChallangeFor request: ExecutedRequest,
73 | authChallenge: URLAuthenticationChallenge)
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | /// Client executed the request and collected relative metrics stats.
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:22:22: warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
20 |
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
| `- warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
24 | internal static let DefaultTimeout = TimeInterval(10)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:25:12: note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
23 | /// This is the raw response received from server. It includes all the
24 | /// data collected from the request including metrics and errors.
25 | open class HTTPResponse: CustomStringConvertible {
| `- note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
26 |
27 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:23:48: error: cannot find type 'URLRequest' in scope
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
| `- error: cannot find type 'URLRequest' in scope
24 | internal static let DefaultTimeout = TimeInterval(10)
25 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:34:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// Session task currently in execution.
34 | public internal(set) weak var sessionTask: URLSessionTask?
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Client in which the task is running.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPMethod.swift:48:23: warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
38 | /// - `options`: The OPTIONS method is used to describe the communication options for the target resource.
39 | /// - `patch`: The PATCH method is used to apply partial modifications to a resource.
40 | public struct HTTPMethod: RawRepresentable, Equatable, Hashable, CaseIterable, CustomStringConvertible {
| `- note: consider making struct 'HTTPMethod' conform to the 'Sendable' protocol
41 |
42 | public static var allCases: [HTTPMethod] = [.connect, .delete, .get, .head, .options, .patch, .post, .put, .trace]
:
46 | public static let connect = HTTPMethod(rawValue: "CONNECT")
47 | public static let delete = HTTPMethod(rawValue: "DELETE")
48 | public static let get = HTTPMethod(rawValue: "GET")
| |- warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'get' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | public static let head = HTTPMethod(rawValue: "HEAD")
50 | public static let options = HTTPMethod(rawValue: "OPTIONS")
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:123:29: error: cannot find type 'URLRequest' in scope
121 | /// NOTE:
122 | /// When not specified the HTTPClient's value where the request is executed is used.
123 | public var cachePolicy: URLRequest.CachePolicy?
| `- error: cannot find type 'URLRequest' in scope
124 |
125 | /// The HTTP Protocol version to use for request.
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPVersion.swift:33:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the HTTP protocol version used for request.
22 | public struct HTTPVersion: Equatable, Hashable, Codable, RawRepresentable,
| `- note: consider making struct 'HTTPVersion' conform to the 'Sendable' protocol
23 | ExpressibleByFloatLiteral, CustomStringConvertible {
24 |
:
31 | public static let v2_0: Self = 2.0
32 | public static let v3_0: Self = 3.0
33 | public static let `default`: Self = v2_0
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
34 |
35 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/HTTPBody.swift:29:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | /// Defines the body of a request, including the content's body and additional headers.
24 | public struct HTTPBody {
| `- note: consider making struct 'HTTPBody' conform to the 'Sendable' protocol
25 |
26 | // MARK: - Public Static Properties
27 |
28 | /// No data to send.
29 | public static let empty = HTTPBody(content: Data())
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:293:49: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
291 | /// 2. Each new get call to cookies produce new instances of `HTTPCookie` even with the same values
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
295 | HTTPHeaders.Element(name: item.key, value: item.value)
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:417:79: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
415 | /// - Parameter client: client where the query should be executed.
416 | /// - Returns: `URLSessionTask`
417 | internal func urlSessionTask(inClient client: HTTPClient) async throws -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
418 | // Generate the `URLRequest` instance.
419 | var urlRequest = try await urlRequest(inClient: client)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:451:76: error: cannot find type 'URLRequest' in scope
449 | /// - Parameter client: client instance.
450 | /// - Returns: `URLRequest`
451 | internal func urlRequest(inClient client: HTTPClient?) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
452 | guard let client = client,
453 | let fullURL = urlComponents.fullURLInClient(client) else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:28: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:43: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:30: warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:59: error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:272:30: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
271 | } else {
272 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:275:26: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
275 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
276 | }
277 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:294:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
| `- error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
295 | HTTPHeaders.Element(name: item.key, value: item.value)
296 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPScheme.swift:24:16: warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the protocol scheme for an URL.
22 | public struct HTTPScheme: Equatable, Hashable, Codable, RawRepresentable, CustomStringConvertible {
| `- note: consider making struct 'HTTPScheme' conform to the 'Sendable' protocol
23 | static let http: Self = "http"
24 | static let https: Self = "https"
| |- warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'https' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 | static let ftp: Self = "ftp"
26 | static let sftp: Self = "sftp"
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:425:19: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
423 |
424 | // Create the `URLSessionTask` instance.
425 | var task: URLSessionTask!
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:428:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
428 | task = client.session.uploadTask(withStreamedRequest: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
429 | } else {
430 | switch transferMode {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:432:39: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
430 | switch transferMode {
431 | case .default:
432 | task = client.session.dataTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
433 | case .largeData:
434 | if let partialData = partialData {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:435:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
433 | case .largeData:
434 | if let partialData = partialData {
435 | task = client.session.downloadTask(withResumeData: partialData)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:437:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
435 | task = client.session.downloadTask(withResumeData: partialData)
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
438 | }
439 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:443:14: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
441 |
442 | /// Keep in mind it's just a suggestion for HTTP/2 based services.
443 | task.priority = httpPriority.urlTaskPriority
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
444 | return task
445 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:466:30: error: cannot find 'URLRequest' in scope
464 |
465 | // Prepare the request
466 | var urlRequest = try URLRequest(url: fullURL,
| `- error: cannot find 'URLRequest' in scope
467 | method: method,
468 | cachePolicy: requestCachePolicy,
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:34:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// `URLResponse` object received from server.
34 | open var urlResponse: URLResponse?
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:37:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | urlResponse as? HTTPURLResponse
39 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:38: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:60: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:21: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
39 | }
40 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:25: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | }
40 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:87:23: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
85 | /// Headers received into the response.
86 | open var headers: HTTPHeaders {
87 | httpResponse?.headers ?? HTTPHeaders()
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
88 | }
89 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
[77/80] Compiling RealHTTP HTTPSerializableBody.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
21 | /// HTTPClient is the place where each request will be executed.
22 | /// It contains the complete configuration, keep cookies and sessions.
23 | public class HTTPClient {
| `- note: class 'HTTPClient' does not conform to the 'Sendable' protocol
24 |
25 | // MARK: - Public Properties
26 |
27 | /// Shared HTTPClient instance.
28 | public static let shared = HTTPClient(baseURL: nil)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 |
30 | /// Delegate of the client.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:59: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
119 |
120 | self.baseURL = baseURL
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:63:58: error: cannot find type 'URLRequest' in scope
61 | /// - newRequest: the request to follow in redirect.
62 | func client(_ client: HTTPClient, willPerformRedirect request: ExecutedRequest,
63 | response: HTTPResponse, with newRequest: URLRequest)
| `- error: cannot find type 'URLRequest' in scope
64 |
65 | /// Client receive an auth challenge which will be managed by the `security` property of the
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:41:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | /// URLSessionConfigurastion used to perform request in this client.
41 | public var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | loader.session
43 | }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:47:29: error: cannot find type 'URLRequest' in scope
45 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
46 | /// Requests may override this behaviour.
47 | public var cachePolicy: URLRequest.CachePolicy {
| `- error: cannot find type 'URLRequest' in scope
48 | get { loader.cachePolicy }
49 | set { loader.cachePolicy = newValue }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:66:31: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
| `- error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
67 | session.configuration.httpCookieStorage
68 | }
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookieStorage = AnyObject
| `- note: 'HTTPCookieStorage' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
119 |
120 | self.baseURL = baseURL
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:132:46: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter url: URL.
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
134 | }
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader.swift:39:31: error: cannot find type 'URLRequest' in scope
37 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
38 | /// Requests may override this behaviour.
39 | internal var cachePolicy: URLRequest.CachePolicy = .useProtocolCachePolicy
| `- error: cannot find type 'URLRequest' in scope
40 |
41 | // MARK: - Private Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:67:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
67 | session.configuration.httpCookieStorage
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
68 | }
69 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:133:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
134 | }
135 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:23:62: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | /// Identify a list of events you can monitor during the lifecycle of the client instance.
22 | public protocol HTTPClientDelegate: AnyObject {
23 | typealias ExecutedRequest = (request: HTTPRequest, task: URLSessionTask)
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 |
25 | /// A new request is enqueued into the client's pool.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:73:32: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | /// - authChallenge: challenge received.
72 | func client(_ client: HTTPClient, didReceiveAuthChallangeFor request: ExecutedRequest,
73 | authChallenge: URLAuthenticationChallenge)
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | /// Client executed the request and collected relative metrics stats.
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:22:22: warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
20 |
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
| `- warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
24 | internal static let DefaultTimeout = TimeInterval(10)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:25:12: note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
23 | /// This is the raw response received from server. It includes all the
24 | /// data collected from the request including metrics and errors.
25 | open class HTTPResponse: CustomStringConvertible {
| `- note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
26 |
27 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:23:48: error: cannot find type 'URLRequest' in scope
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
| `- error: cannot find type 'URLRequest' in scope
24 | internal static let DefaultTimeout = TimeInterval(10)
25 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:34:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// Session task currently in execution.
34 | public internal(set) weak var sessionTask: URLSessionTask?
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Client in which the task is running.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPMethod.swift:48:23: warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
38 | /// - `options`: The OPTIONS method is used to describe the communication options for the target resource.
39 | /// - `patch`: The PATCH method is used to apply partial modifications to a resource.
40 | public struct HTTPMethod: RawRepresentable, Equatable, Hashable, CaseIterable, CustomStringConvertible {
| `- note: consider making struct 'HTTPMethod' conform to the 'Sendable' protocol
41 |
42 | public static var allCases: [HTTPMethod] = [.connect, .delete, .get, .head, .options, .patch, .post, .put, .trace]
:
46 | public static let connect = HTTPMethod(rawValue: "CONNECT")
47 | public static let delete = HTTPMethod(rawValue: "DELETE")
48 | public static let get = HTTPMethod(rawValue: "GET")
| |- warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'get' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | public static let head = HTTPMethod(rawValue: "HEAD")
50 | public static let options = HTTPMethod(rawValue: "OPTIONS")
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:123:29: error: cannot find type 'URLRequest' in scope
121 | /// NOTE:
122 | /// When not specified the HTTPClient's value where the request is executed is used.
123 | public var cachePolicy: URLRequest.CachePolicy?
| `- error: cannot find type 'URLRequest' in scope
124 |
125 | /// The HTTP Protocol version to use for request.
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPVersion.swift:33:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the HTTP protocol version used for request.
22 | public struct HTTPVersion: Equatable, Hashable, Codable, RawRepresentable,
| `- note: consider making struct 'HTTPVersion' conform to the 'Sendable' protocol
23 | ExpressibleByFloatLiteral, CustomStringConvertible {
24 |
:
31 | public static let v2_0: Self = 2.0
32 | public static let v3_0: Self = 3.0
33 | public static let `default`: Self = v2_0
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
34 |
35 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/HTTPBody.swift:29:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | /// Defines the body of a request, including the content's body and additional headers.
24 | public struct HTTPBody {
| `- note: consider making struct 'HTTPBody' conform to the 'Sendable' protocol
25 |
26 | // MARK: - Public Static Properties
27 |
28 | /// No data to send.
29 | public static let empty = HTTPBody(content: Data())
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:293:49: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
291 | /// 2. Each new get call to cookies produce new instances of `HTTPCookie` even with the same values
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
295 | HTTPHeaders.Element(name: item.key, value: item.value)
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:417:79: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
415 | /// - Parameter client: client where the query should be executed.
416 | /// - Returns: `URLSessionTask`
417 | internal func urlSessionTask(inClient client: HTTPClient) async throws -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
418 | // Generate the `URLRequest` instance.
419 | var urlRequest = try await urlRequest(inClient: client)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:451:76: error: cannot find type 'URLRequest' in scope
449 | /// - Parameter client: client instance.
450 | /// - Returns: `URLRequest`
451 | internal func urlRequest(inClient client: HTTPClient?) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
452 | guard let client = client,
453 | let fullURL = urlComponents.fullURLInClient(client) else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:28: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:43: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:30: warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:59: error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:272:30: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
271 | } else {
272 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:275:26: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
275 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
276 | }
277 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:294:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
| `- error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
295 | HTTPHeaders.Element(name: item.key, value: item.value)
296 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPScheme.swift:24:16: warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the protocol scheme for an URL.
22 | public struct HTTPScheme: Equatable, Hashable, Codable, RawRepresentable, CustomStringConvertible {
| `- note: consider making struct 'HTTPScheme' conform to the 'Sendable' protocol
23 | static let http: Self = "http"
24 | static let https: Self = "https"
| |- warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'https' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 | static let ftp: Self = "ftp"
26 | static let sftp: Self = "sftp"
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:425:19: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
423 |
424 | // Create the `URLSessionTask` instance.
425 | var task: URLSessionTask!
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:428:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
428 | task = client.session.uploadTask(withStreamedRequest: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
429 | } else {
430 | switch transferMode {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:432:39: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
430 | switch transferMode {
431 | case .default:
432 | task = client.session.dataTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
433 | case .largeData:
434 | if let partialData = partialData {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:435:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
433 | case .largeData:
434 | if let partialData = partialData {
435 | task = client.session.downloadTask(withResumeData: partialData)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:437:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
435 | task = client.session.downloadTask(withResumeData: partialData)
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
438 | }
439 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:443:14: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
441 |
442 | /// Keep in mind it's just a suggestion for HTTP/2 based services.
443 | task.priority = httpPriority.urlTaskPriority
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
444 | return task
445 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:466:30: error: cannot find 'URLRequest' in scope
464 |
465 | // Prepare the request
466 | var urlRequest = try URLRequest(url: fullURL,
| `- error: cannot find 'URLRequest' in scope
467 | method: method,
468 | cachePolicy: requestCachePolicy,
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:34:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// `URLResponse` object received from server.
34 | open var urlResponse: URLResponse?
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:37:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | urlResponse as? HTTPURLResponse
39 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:38: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:60: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:21: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
39 | }
40 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:25: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | }
40 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:87:23: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
85 | /// Headers received into the response.
86 | open var headers: HTTPHeaders {
87 | httpResponse?.headers ?? HTTPHeaders()
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
88 | }
89 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
[78/80] Compiling RealHTTP HTTPBody+JSON.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
21 | /// HTTPClient is the place where each request will be executed.
22 | /// It contains the complete configuration, keep cookies and sessions.
23 | public class HTTPClient {
| `- note: class 'HTTPClient' does not conform to the 'Sendable' protocol
24 |
25 | // MARK: - Public Properties
26 |
27 | /// Shared HTTPClient instance.
28 | public static let shared = HTTPClient(baseURL: nil)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 |
30 | /// Delegate of the client.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:59: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
119 |
120 | self.baseURL = baseURL
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:63:58: error: cannot find type 'URLRequest' in scope
61 | /// - newRequest: the request to follow in redirect.
62 | func client(_ client: HTTPClient, willPerformRedirect request: ExecutedRequest,
63 | response: HTTPResponse, with newRequest: URLRequest)
| `- error: cannot find type 'URLRequest' in scope
64 |
65 | /// Client receive an auth challenge which will be managed by the `security` property of the
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:41:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | /// URLSessionConfigurastion used to perform request in this client.
41 | public var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | loader.session
43 | }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:47:29: error: cannot find type 'URLRequest' in scope
45 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
46 | /// Requests may override this behaviour.
47 | public var cachePolicy: URLRequest.CachePolicy {
| `- error: cannot find type 'URLRequest' in scope
48 | get { loader.cachePolicy }
49 | set { loader.cachePolicy = newValue }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:66:31: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
| `- error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
67 | session.configuration.httpCookieStorage
68 | }
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookieStorage = AnyObject
| `- note: 'HTTPCookieStorage' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
119 |
120 | self.baseURL = baseURL
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:132:46: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter url: URL.
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
134 | }
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader.swift:39:31: error: cannot find type 'URLRequest' in scope
37 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
38 | /// Requests may override this behaviour.
39 | internal var cachePolicy: URLRequest.CachePolicy = .useProtocolCachePolicy
| `- error: cannot find type 'URLRequest' in scope
40 |
41 | // MARK: - Private Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:67:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
67 | session.configuration.httpCookieStorage
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
68 | }
69 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:133:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
134 | }
135 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:23:62: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | /// Identify a list of events you can monitor during the lifecycle of the client instance.
22 | public protocol HTTPClientDelegate: AnyObject {
23 | typealias ExecutedRequest = (request: HTTPRequest, task: URLSessionTask)
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 |
25 | /// A new request is enqueued into the client's pool.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:73:32: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | /// - authChallenge: challenge received.
72 | func client(_ client: HTTPClient, didReceiveAuthChallangeFor request: ExecutedRequest,
73 | authChallenge: URLAuthenticationChallenge)
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | /// Client executed the request and collected relative metrics stats.
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:22:22: warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
20 |
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
| `- warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
24 | internal static let DefaultTimeout = TimeInterval(10)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:25:12: note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
23 | /// This is the raw response received from server. It includes all the
24 | /// data collected from the request including metrics and errors.
25 | open class HTTPResponse: CustomStringConvertible {
| `- note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
26 |
27 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:23:48: error: cannot find type 'URLRequest' in scope
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
| `- error: cannot find type 'URLRequest' in scope
24 | internal static let DefaultTimeout = TimeInterval(10)
25 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:34:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// Session task currently in execution.
34 | public internal(set) weak var sessionTask: URLSessionTask?
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Client in which the task is running.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPMethod.swift:48:23: warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
38 | /// - `options`: The OPTIONS method is used to describe the communication options for the target resource.
39 | /// - `patch`: The PATCH method is used to apply partial modifications to a resource.
40 | public struct HTTPMethod: RawRepresentable, Equatable, Hashable, CaseIterable, CustomStringConvertible {
| `- note: consider making struct 'HTTPMethod' conform to the 'Sendable' protocol
41 |
42 | public static var allCases: [HTTPMethod] = [.connect, .delete, .get, .head, .options, .patch, .post, .put, .trace]
:
46 | public static let connect = HTTPMethod(rawValue: "CONNECT")
47 | public static let delete = HTTPMethod(rawValue: "DELETE")
48 | public static let get = HTTPMethod(rawValue: "GET")
| |- warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'get' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | public static let head = HTTPMethod(rawValue: "HEAD")
50 | public static let options = HTTPMethod(rawValue: "OPTIONS")
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:123:29: error: cannot find type 'URLRequest' in scope
121 | /// NOTE:
122 | /// When not specified the HTTPClient's value where the request is executed is used.
123 | public var cachePolicy: URLRequest.CachePolicy?
| `- error: cannot find type 'URLRequest' in scope
124 |
125 | /// The HTTP Protocol version to use for request.
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPVersion.swift:33:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the HTTP protocol version used for request.
22 | public struct HTTPVersion: Equatable, Hashable, Codable, RawRepresentable,
| `- note: consider making struct 'HTTPVersion' conform to the 'Sendable' protocol
23 | ExpressibleByFloatLiteral, CustomStringConvertible {
24 |
:
31 | public static let v2_0: Self = 2.0
32 | public static let v3_0: Self = 3.0
33 | public static let `default`: Self = v2_0
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
34 |
35 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/HTTPBody.swift:29:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | /// Defines the body of a request, including the content's body and additional headers.
24 | public struct HTTPBody {
| `- note: consider making struct 'HTTPBody' conform to the 'Sendable' protocol
25 |
26 | // MARK: - Public Static Properties
27 |
28 | /// No data to send.
29 | public static let empty = HTTPBody(content: Data())
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:293:49: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
291 | /// 2. Each new get call to cookies produce new instances of `HTTPCookie` even with the same values
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
295 | HTTPHeaders.Element(name: item.key, value: item.value)
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:417:79: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
415 | /// - Parameter client: client where the query should be executed.
416 | /// - Returns: `URLSessionTask`
417 | internal func urlSessionTask(inClient client: HTTPClient) async throws -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
418 | // Generate the `URLRequest` instance.
419 | var urlRequest = try await urlRequest(inClient: client)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:451:76: error: cannot find type 'URLRequest' in scope
449 | /// - Parameter client: client instance.
450 | /// - Returns: `URLRequest`
451 | internal func urlRequest(inClient client: HTTPClient?) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
452 | guard let client = client,
453 | let fullURL = urlComponents.fullURLInClient(client) else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:28: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:43: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:30: warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:59: error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:272:30: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
271 | } else {
272 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:275:26: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
275 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
276 | }
277 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:294:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
| `- error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
295 | HTTPHeaders.Element(name: item.key, value: item.value)
296 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPScheme.swift:24:16: warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the protocol scheme for an URL.
22 | public struct HTTPScheme: Equatable, Hashable, Codable, RawRepresentable, CustomStringConvertible {
| `- note: consider making struct 'HTTPScheme' conform to the 'Sendable' protocol
23 | static let http: Self = "http"
24 | static let https: Self = "https"
| |- warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'https' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 | static let ftp: Self = "ftp"
26 | static let sftp: Self = "sftp"
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:425:19: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
423 |
424 | // Create the `URLSessionTask` instance.
425 | var task: URLSessionTask!
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:428:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
428 | task = client.session.uploadTask(withStreamedRequest: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
429 | } else {
430 | switch transferMode {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:432:39: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
430 | switch transferMode {
431 | case .default:
432 | task = client.session.dataTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
433 | case .largeData:
434 | if let partialData = partialData {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:435:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
433 | case .largeData:
434 | if let partialData = partialData {
435 | task = client.session.downloadTask(withResumeData: partialData)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:437:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
435 | task = client.session.downloadTask(withResumeData: partialData)
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
438 | }
439 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:443:14: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
441 |
442 | /// Keep in mind it's just a suggestion for HTTP/2 based services.
443 | task.priority = httpPriority.urlTaskPriority
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
444 | return task
445 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:466:30: error: cannot find 'URLRequest' in scope
464 |
465 | // Prepare the request
466 | var urlRequest = try URLRequest(url: fullURL,
| `- error: cannot find 'URLRequest' in scope
467 | method: method,
468 | cachePolicy: requestCachePolicy,
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:34:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// `URLResponse` object received from server.
34 | open var urlResponse: URLResponse?
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:37:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | urlResponse as? HTTPURLResponse
39 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:38: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:60: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:21: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
39 | }
40 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:25: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | }
40 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:87:23: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
85 | /// Headers received into the response.
86 | open var headers: HTTPHeaders {
87 | httpResponse?.headers ?? HTTPHeaders()
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
88 | }
89 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
[79/80] Compiling RealHTTP JSONEncodable.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
21 | /// HTTPClient is the place where each request will be executed.
22 | /// It contains the complete configuration, keep cookies and sessions.
23 | public class HTTPClient {
| `- note: class 'HTTPClient' does not conform to the 'Sendable' protocol
24 |
25 | // MARK: - Public Properties
26 |
27 | /// Shared HTTPClient instance.
28 | public static let shared = HTTPClient(baseURL: nil)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 |
30 | /// Delegate of the client.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:59: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
119 |
120 | self.baseURL = baseURL
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:63:58: error: cannot find type 'URLRequest' in scope
61 | /// - newRequest: the request to follow in redirect.
62 | func client(_ client: HTTPClient, willPerformRedirect request: ExecutedRequest,
63 | response: HTTPResponse, with newRequest: URLRequest)
| `- error: cannot find type 'URLRequest' in scope
64 |
65 | /// Client receive an auth challenge which will be managed by the `security` property of the
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:41:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | /// URLSessionConfigurastion used to perform request in this client.
41 | public var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | loader.session
43 | }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:47:29: error: cannot find type 'URLRequest' in scope
45 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
46 | /// Requests may override this behaviour.
47 | public var cachePolicy: URLRequest.CachePolicy {
| `- error: cannot find type 'URLRequest' in scope
48 | get { loader.cachePolicy }
49 | set { loader.cachePolicy = newValue }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:66:31: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
| `- error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
67 | session.configuration.httpCookieStorage
68 | }
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookieStorage = AnyObject
| `- note: 'HTTPCookieStorage' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
119 |
120 | self.baseURL = baseURL
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:132:46: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter url: URL.
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
134 | }
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader.swift:39:31: error: cannot find type 'URLRequest' in scope
37 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
38 | /// Requests may override this behaviour.
39 | internal var cachePolicy: URLRequest.CachePolicy = .useProtocolCachePolicy
| `- error: cannot find type 'URLRequest' in scope
40 |
41 | // MARK: - Private Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:67:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
67 | session.configuration.httpCookieStorage
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
68 | }
69 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:133:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
134 | }
135 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:23:62: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | /// Identify a list of events you can monitor during the lifecycle of the client instance.
22 | public protocol HTTPClientDelegate: AnyObject {
23 | typealias ExecutedRequest = (request: HTTPRequest, task: URLSessionTask)
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 |
25 | /// A new request is enqueued into the client's pool.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:73:32: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | /// - authChallenge: challenge received.
72 | func client(_ client: HTTPClient, didReceiveAuthChallangeFor request: ExecutedRequest,
73 | authChallenge: URLAuthenticationChallenge)
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | /// Client executed the request and collected relative metrics stats.
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:22:22: warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
20 |
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
| `- warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
24 | internal static let DefaultTimeout = TimeInterval(10)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:25:12: note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
23 | /// This is the raw response received from server. It includes all the
24 | /// data collected from the request including metrics and errors.
25 | open class HTTPResponse: CustomStringConvertible {
| `- note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
26 |
27 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:23:48: error: cannot find type 'URLRequest' in scope
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
| `- error: cannot find type 'URLRequest' in scope
24 | internal static let DefaultTimeout = TimeInterval(10)
25 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:34:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// Session task currently in execution.
34 | public internal(set) weak var sessionTask: URLSessionTask?
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Client in which the task is running.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPMethod.swift:48:23: warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
38 | /// - `options`: The OPTIONS method is used to describe the communication options for the target resource.
39 | /// - `patch`: The PATCH method is used to apply partial modifications to a resource.
40 | public struct HTTPMethod: RawRepresentable, Equatable, Hashable, CaseIterable, CustomStringConvertible {
| `- note: consider making struct 'HTTPMethod' conform to the 'Sendable' protocol
41 |
42 | public static var allCases: [HTTPMethod] = [.connect, .delete, .get, .head, .options, .patch, .post, .put, .trace]
:
46 | public static let connect = HTTPMethod(rawValue: "CONNECT")
47 | public static let delete = HTTPMethod(rawValue: "DELETE")
48 | public static let get = HTTPMethod(rawValue: "GET")
| |- warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'get' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | public static let head = HTTPMethod(rawValue: "HEAD")
50 | public static let options = HTTPMethod(rawValue: "OPTIONS")
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:123:29: error: cannot find type 'URLRequest' in scope
121 | /// NOTE:
122 | /// When not specified the HTTPClient's value where the request is executed is used.
123 | public var cachePolicy: URLRequest.CachePolicy?
| `- error: cannot find type 'URLRequest' in scope
124 |
125 | /// The HTTP Protocol version to use for request.
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPVersion.swift:33:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the HTTP protocol version used for request.
22 | public struct HTTPVersion: Equatable, Hashable, Codable, RawRepresentable,
| `- note: consider making struct 'HTTPVersion' conform to the 'Sendable' protocol
23 | ExpressibleByFloatLiteral, CustomStringConvertible {
24 |
:
31 | public static let v2_0: Self = 2.0
32 | public static let v3_0: Self = 3.0
33 | public static let `default`: Self = v2_0
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
34 |
35 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/HTTPBody.swift:29:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | /// Defines the body of a request, including the content's body and additional headers.
24 | public struct HTTPBody {
| `- note: consider making struct 'HTTPBody' conform to the 'Sendable' protocol
25 |
26 | // MARK: - Public Static Properties
27 |
28 | /// No data to send.
29 | public static let empty = HTTPBody(content: Data())
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:293:49: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
291 | /// 2. Each new get call to cookies produce new instances of `HTTPCookie` even with the same values
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
295 | HTTPHeaders.Element(name: item.key, value: item.value)
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:417:79: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
415 | /// - Parameter client: client where the query should be executed.
416 | /// - Returns: `URLSessionTask`
417 | internal func urlSessionTask(inClient client: HTTPClient) async throws -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
418 | // Generate the `URLRequest` instance.
419 | var urlRequest = try await urlRequest(inClient: client)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:451:76: error: cannot find type 'URLRequest' in scope
449 | /// - Parameter client: client instance.
450 | /// - Returns: `URLRequest`
451 | internal func urlRequest(inClient client: HTTPClient?) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
452 | guard let client = client,
453 | let fullURL = urlComponents.fullURLInClient(client) else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:28: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:43: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:30: warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:59: error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:272:30: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
271 | } else {
272 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:275:26: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
275 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
276 | }
277 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:294:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
| `- error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
295 | HTTPHeaders.Element(name: item.key, value: item.value)
296 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPScheme.swift:24:16: warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the protocol scheme for an URL.
22 | public struct HTTPScheme: Equatable, Hashable, Codable, RawRepresentable, CustomStringConvertible {
| `- note: consider making struct 'HTTPScheme' conform to the 'Sendable' protocol
23 | static let http: Self = "http"
24 | static let https: Self = "https"
| |- warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'https' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 | static let ftp: Self = "ftp"
26 | static let sftp: Self = "sftp"
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:425:19: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
423 |
424 | // Create the `URLSessionTask` instance.
425 | var task: URLSessionTask!
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:428:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
428 | task = client.session.uploadTask(withStreamedRequest: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
429 | } else {
430 | switch transferMode {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:432:39: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
430 | switch transferMode {
431 | case .default:
432 | task = client.session.dataTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
433 | case .largeData:
434 | if let partialData = partialData {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:435:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
433 | case .largeData:
434 | if let partialData = partialData {
435 | task = client.session.downloadTask(withResumeData: partialData)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:437:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
435 | task = client.session.downloadTask(withResumeData: partialData)
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
438 | }
439 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:443:14: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
441 |
442 | /// Keep in mind it's just a suggestion for HTTP/2 based services.
443 | task.priority = httpPriority.urlTaskPriority
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
444 | return task
445 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:466:30: error: cannot find 'URLRequest' in scope
464 |
465 | // Prepare the request
466 | var urlRequest = try URLRequest(url: fullURL,
| `- error: cannot find 'URLRequest' in scope
467 | method: method,
468 | cachePolicy: requestCachePolicy,
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:34:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// `URLResponse` object received from server.
34 | open var urlResponse: URLResponse?
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:37:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | urlResponse as? HTTPURLResponse
39 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:38: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:60: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:21: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
39 | }
40 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:25: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | }
40 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:87:23: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
85 | /// Headers received into the response.
86 | open var headers: HTTPHeaders {
87 | httpResponse?.headers ?? HTTPHeaders()
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
88 | }
89 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
[80/80] Compiling RealHTTP JSONSerializable.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
21 | /// HTTPClient is the place where each request will be executed.
22 | /// It contains the complete configuration, keep cookies and sessions.
23 | public class HTTPClient {
| `- note: class 'HTTPClient' does not conform to the 'Sendable' protocol
24 |
25 | // MARK: - Public Properties
26 |
27 | /// Shared HTTPClient instance.
28 | public static let shared = HTTPClient(baseURL: nil)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HTTPClient' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 |
30 | /// Delegate of the client.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:59: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
119 |
120 | self.baseURL = baseURL
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:63:58: error: cannot find type 'URLRequest' in scope
61 | /// - newRequest: the request to follow in redirect.
62 | func client(_ client: HTTPClient, willPerformRedirect request: ExecutedRequest,
63 | response: HTTPResponse, with newRequest: URLRequest)
| `- error: cannot find type 'URLRequest' in scope
64 |
65 | /// Client receive an auth challenge which will be managed by the `security` property of the
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:41:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |
40 | /// URLSessionConfigurastion used to perform request in this client.
41 | public var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | loader.session
43 | }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:47:29: error: cannot find type 'URLRequest' in scope
45 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
46 | /// Requests may override this behaviour.
47 | public var cachePolicy: URLRequest.CachePolicy {
| `- error: cannot find type 'URLRequest' in scope
48 | get { loader.cachePolicy }
49 | set { loader.cachePolicy = newValue }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:66:31: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
| `- error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
67 | session.configuration.httpCookieStorage
68 | }
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookieStorage = AnyObject
| `- note: 'HTTPCookieStorage' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:118:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | public init(baseURL: URL?,
117 | maxConcurrentOperations: Int? = nil,
118 | configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
119 |
120 | self.baseURL = baseURL
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:132:46: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter url: URL.
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
134 | }
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader.swift:39:31: error: cannot find type 'URLRequest' in scope
37 | /// The cache policy for the request. Defaults to `.useProtocolCachePolicy`.
38 | /// Requests may override this behaviour.
39 | internal var cachePolicy: URLRequest.CachePolicy = .useProtocolCachePolicy
| `- error: cannot find type 'URLRequest' in scope
40 |
41 | // MARK: - Private Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:67:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
65 | /// Cookies storage.
66 | public var cookieStorage: HTTPCookieStorage? {
67 | session.configuration.httpCookieStorage
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
68 | }
69 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift:133:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
131 | /// - Returns: `[HTTCookie]`
132 | public func cookies(forURL url: URL) -> [HTTPCookie] {
133 | session.configuration.httpCookieStorage?.cookies(for: url) ?? []
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
134 | }
135 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:23:62: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | /// Identify a list of events you can monitor during the lifecycle of the client instance.
22 | public protocol HTTPClientDelegate: AnyObject {
23 | typealias ExecutedRequest = (request: HTTPRequest, task: URLSessionTask)
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 |
25 | /// A new request is enqueued into the client's pool.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPClient/HTTPClientDelegate.swift:73:32: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
71 | /// - authChallenge: challenge received.
72 | func client(_ client: HTTPClient, didReceiveAuthChallangeFor request: ExecutedRequest,
73 | authChallenge: URLAuthenticationChallenge)
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | /// Client executed the request and collected relative metrics stats.
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:22:22: warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
20 |
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
| `- warning: type 'HTTPResponse' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
24 | internal static let DefaultTimeout = TimeInterval(10)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:25:12: note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
23 | /// This is the raw response received from server. It includes all the
24 | /// data collected from the request including metrics and errors.
25 | open class HTTPResponse: CustomStringConvertible {
| `- note: class 'HTTPResponse' does not conform to the 'Sendable' protocol
26 |
27 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:23:48: error: cannot find type 'URLRequest' in scope
21 | public class HTTPRequest: CustomStringConvertible {
22 | public typealias RequestTask = Task<HTTPResponse, Error>
23 | public typealias RequestModifier = ((inout URLRequest) throws -> Void)
| `- error: cannot find type 'URLRequest' in scope
24 | internal static let DefaultTimeout = TimeInterval(10)
25 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:34:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// Session task currently in execution.
34 | public internal(set) weak var sessionTask: URLSessionTask?
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Client in which the task is running.
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPMethod.swift:48:23: warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
38 | /// - `options`: The OPTIONS method is used to describe the communication options for the target resource.
39 | /// - `patch`: The PATCH method is used to apply partial modifications to a resource.
40 | public struct HTTPMethod: RawRepresentable, Equatable, Hashable, CaseIterable, CustomStringConvertible {
| `- note: consider making struct 'HTTPMethod' conform to the 'Sendable' protocol
41 |
42 | public static var allCases: [HTTPMethod] = [.connect, .delete, .get, .head, .options, .patch, .post, .put, .trace]
:
46 | public static let connect = HTTPMethod(rawValue: "CONNECT")
47 | public static let delete = HTTPMethod(rawValue: "DELETE")
48 | public static let get = HTTPMethod(rawValue: "GET")
| |- warning: static property 'get' is not concurrency-safe because non-'Sendable' type 'HTTPMethod' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'get' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | public static let head = HTTPMethod(rawValue: "HEAD")
50 | public static let options = HTTPMethod(rawValue: "OPTIONS")
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:123:29: error: cannot find type 'URLRequest' in scope
121 | /// NOTE:
122 | /// When not specified the HTTPClient's value where the request is executed is used.
123 | public var cachePolicy: URLRequest.CachePolicy?
| `- error: cannot find type 'URLRequest' in scope
124 |
125 | /// The HTTP Protocol version to use for request.
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPVersion.swift:33:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the HTTP protocol version used for request.
22 | public struct HTTPVersion: Equatable, Hashable, Codable, RawRepresentable,
| `- note: consider making struct 'HTTPVersion' conform to the 'Sendable' protocol
23 | ExpressibleByFloatLiteral, CustomStringConvertible {
24 |
:
31 | public static let v2_0: Self = 2.0
32 | public static let v3_0: Self = 3.0
33 | public static let `default`: Self = v2_0
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'HTTPVersion' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
34 |
35 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/HTTPBody.swift:29:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | /// Defines the body of a request, including the content's body and additional headers.
24 | public struct HTTPBody {
| `- note: consider making struct 'HTTPBody' conform to the 'Sendable' protocol
25 |
26 | // MARK: - Public Static Properties
27 |
28 | /// No data to send.
29 | public static let empty = HTTPBody(content: Data())
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'HTTPBody' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'empty' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | // MARK: - Public Properties
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:293:49: error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
291 | /// 2. Each new get call to cookies produce new instances of `HTTPCookie` even with the same values
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
| `- error: 'HTTPCookie' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
295 | HTTPHeaders.Element(name: item.key, value: item.value)
Foundation.HTTPCookie:2:18: note: 'HTTPCookie' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPCookie = AnyObject
| `- note: 'HTTPCookie' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:417:79: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
415 | /// - Parameter client: client where the query should be executed.
416 | /// - Returns: `URLSessionTask`
417 | internal func urlSessionTask(inClient client: HTTPClient) async throws -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
418 | // Generate the `URLRequest` instance.
419 | var urlRequest = try await urlRequest(inClient: client)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:451:76: error: cannot find type 'URLRequest' in scope
449 | /// - Parameter client: client instance.
450 | /// - Returns: `URLRequest`
451 | internal func urlRequest(inClient client: HTTPClient?) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
452 | guard let client = client,
453 | let fullURL = urlComponents.fullURLInClient(client) else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:28: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:502:43: error: cannot find type 'URLRequest' in scope
500 | case follow
501 | case followWithOriginalSettings
502 | case followCustom((URLRequest) -> URLRequest?)
| `- error: cannot find type 'URLRequest' in scope
503 | case refuse
504 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:30: warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- warning: conditional downcast from 'URLSessionTask?' (aka 'Optional<AnyObject>') to 'URLSessionDownloadTask' (aka 'AnyObject') does nothing
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:270:59: error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
268 | if transferMode == .largeData {
269 | if let dataProducer = byProducingResumeData {
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
| `- error: value of type 'URLSessionDownloadTask' (aka 'AnyObject') has no member 'cancel'
271 | } else {
272 | sessionTask?.cancel()
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:272:30: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
270 | (sessionTask as? URLSessionDownloadTask)?.cancel(byProducingResumeData: dataProducer)
271 | } else {
272 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:275:26: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
273 | }
274 | } else {
275 | sessionTask?.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
276 | }
277 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:294:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
292 | /// (this because value is parsed on the fly from `headers` properties).
293 | public func setCookiesInHeaders(_ cookies: [HTTPCookie]) {
294 | let headerFields = HTTPCookie.requestHeaderFields(with: cookies).map { item in
| `- error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
295 | HTTPHeaders.Element(name: item.key, value: item.value)
296 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/HTTPScheme.swift:24:16: warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Defines the protocol scheme for an URL.
22 | public struct HTTPScheme: Equatable, Hashable, Codable, RawRepresentable, CustomStringConvertible {
| `- note: consider making struct 'HTTPScheme' conform to the 'Sendable' protocol
23 | static let http: Self = "http"
24 | static let https: Self = "https"
| |- warning: static property 'https' is not concurrency-safe because non-'Sendable' type 'HTTPScheme' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'https' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 | static let ftp: Self = "ftp"
26 | static let sftp: Self = "sftp"
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:425:19: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
423 |
424 | // Create the `URLSessionTask` instance.
425 | var task: URLSessionTask!
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:428:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
426 | if urlRequest.hasStream {
427 | // If specified a stream mode we want to create the appropriate task
428 | task = client.session.uploadTask(withStreamedRequest: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
429 | } else {
430 | switch transferMode {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:432:39: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
430 | switch transferMode {
431 | case .default:
432 | task = client.session.dataTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
433 | case .largeData:
434 | if let partialData = partialData {
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:435:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
433 | case .largeData:
434 | if let partialData = partialData {
435 | task = client.session.downloadTask(withResumeData: partialData)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:437:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
435 | task = client.session.downloadTask(withResumeData: partialData)
436 | } else {
437 | task = client.session.downloadTask(with: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'downloadTask'
438 | }
439 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:443:14: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
441 |
442 | /// Keep in mind it's just a suggestion for HTTP/2 based services.
443 | task.priority = httpPriority.urlTaskPriority
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'priority'
444 | return task
445 | }
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPRequest/HTTPRequest.swift:466:30: error: cannot find 'URLRequest' in scope
464 |
465 | // Prepare the request
466 | var urlRequest = try URLRequest(url: fullURL,
| `- error: cannot find 'URLRequest' in scope
467 | method: method,
468 | cachePolicy: requestCachePolicy,
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:34:27: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 | /// `URLResponse` object received from server.
34 | open var urlResponse: URLResponse?
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:37:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | urlResponse as? HTTPURLResponse
39 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:38: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:47:60: error: cannot find type 'URLRequest' in scope
45 | /// except when the server has responded to the initial request with a
46 | /// redirect to a different URL.
47 | open var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
48 |
49 | /// Raw data received from server.
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:21: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
39 | }
40 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:38:25: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Casted `HTTPURLResponse` object received from server.
37 | public var httpResponse: HTTPURLResponse? {
38 | urlResponse as? HTTPURLResponse
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | }
40 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RealHTTP/Client/HTTPResponse/HTTPResponse.swift:87:23: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
85 | /// Headers received into the response.
86 | open var headers: HTTPHeaders {
87 | httpResponse?.headers ?? HTTPHeaders()
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'headers'
88 | }
89 |
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
56 | /// except when the server has responded to the initial request with a
57 | /// redirect to a different URL.
58 | var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
| `- error: cannot find type 'URLRequest' in scope
59 |
60 | // MARK: - Initialization
BUILD FAILURE 6.0 linux