Build Information
Failed to build DBNetworkStack, reference 4.0.0 (516e1a), with Swift 6.1 for Android on 11 Jul 2025 12:17:35 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1Build Log
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:83:35: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | /// Creates an instace of `NetworkServiceMock`
82 | public init(
83 | responses: [Result<(Data, HTTPURLResponse), NetworkError>] = [],
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | encoder: JSONEncoder = JSONEncoder()
85 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:92:45: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | /// Creates an instace of `NetworkServiceMock`
91 | public init<each T: Encodable>(
92 | _ responses: repeat Result<(each T, HTTPURLResponse), NetworkError>,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | encoder: JSONEncoder = JSONEncoder()
94 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:114:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | /// Creates an instace of `NetworkServiceMock`
113 | public init(
114 | mappings responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)],
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | encoder: JSONEncoder = JSONEncoder()
116 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:123:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 | /// Creates an instace of `NetworkServiceMock`
122 | public init<each T: Encodable>(
123 | mappings responses: repeat (String, Result<(each T, HTTPURLResponse), NetworkError>),
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
124 | encoder: JSONEncoder = JSONEncoder()
125 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:172:135: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
170 | */
171 | @MainActor
172 | public func requestResultWithResponse<Success: Sendable>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 | lastRequests.append(resource.request)
174 | if !responses.isEmpty {
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/Source/NetworkServices/NetworkServiceMock.swift:198:59: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
196 | }
197 |
198 | public func schedule<T: Encodable>(result: Result<(T, HTTPURLResponse), NetworkError>) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
199 | let scheduled: Result<(Data, HTTPURLResponse), NetworkError>
200 | switch result {
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/Source/NetworkServices/NetworkServiceMock.swift:216:42: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
214 | }
215 |
216 | public func schedule(success: (Void, HTTPURLResponse)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
217 | schedule(result: .success(("", success.1)))
218 | }
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/Source/NetworkServices/NetworkServiceMock.swift:224:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
222 | }
223 |
224 | public func schedule<T: Encodable>(success: (T, HTTPURLResponse)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
225 | schedule(result: .success(success))
226 | }
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/Source/NetworkServices/NetworkServiceMock.swift:172:17: warning: non-sendable type 'Result<(Success, HTTPURLResponse), NetworkError>' (aka 'Result<(Success, AnyObject), NetworkError>') cannot be returned from main actor-isolated implementation to caller of protocol requirement 'requestResultWithResponse(for:)'; this is an error in the Swift 6 language mode
170 | */
171 | @MainActor
172 | public func requestResultWithResponse<Success: Sendable>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- warning: non-sendable type 'Result<(Success, HTTPURLResponse), NetworkError>' (aka 'Result<(Success, AnyObject), NetworkError>') cannot be returned from main actor-isolated implementation to caller of protocol requirement 'requestResultWithResponse(for:)'; this is an error in the Swift 6 language mode
173 | lastRequests.append(resource.request)
174 | if !responses.isEmpty {
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:237:77: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | func encode<T: Encodable>(
236 | encoder: JSONEncoder
237 | ) -> Result<(Data, HTTPURLResponse), NetworkError> where Success == (T, HTTPURLResponse), Failure == NetworkError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | return self.map({ ((try? encoder.encode($0.0)) ?? Data(), $0.1) })
239 | }
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/Source/NetworkServices/NetworkServiceMock.swift:237:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | func encode<T: Encodable>(
236 | encoder: JSONEncoder
237 | ) -> Result<(Data, HTTPURLResponse), NetworkError> where Success == (T, HTTPURLResponse), Failure == NetworkError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | return self.map({ ((try? encoder.encode($0.0)) ?? Data(), $0.1) })
239 | }
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/Source/NetworkServices/NetworkServiceMock.swift:247:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | func encode(
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
249 | url: URL(staticString: "bahn.de"),
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/Source/NetworkServices/RetryNetworkService.swift:84:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
82 | - returns: a running network task
83 | */
84 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 | let result = await networkService.requestResultWithResponse(for: resource)
86 | switch result {
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/Source/NetworkServices/RetryNetworkService.swift:98:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | numberOfRetriesLeft: Int,
97 | resource: Resource<Success, NetworkError>
98 | ) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
99 | if self.shouldRetry(error), numberOfRetriesLeft > 0 {
100 | let duration = UInt64(idleTimeInterval * 1_000_000_000)
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/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/URLRequest+Init.swift:26:11: error: cannot find type 'URLRequest' in scope
24 | import Foundation
25 |
26 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
27 |
28 | /// Convience initializer for easy request creation.
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:26:18: error: cannot find type 'URLRequest' in scope
24 | import Foundation
25 |
26 | public extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
27 |
28 | /// Creates a new `URLRequest` with HTTPHeaderFields added into the new request.
/host/spi-builder-workspace/Source/URLSession+NetworkAccess.swift:27:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
25 |
26 | /// Adds conformens to `NetworkAccess`. `URLSession` can be used as a network access.
27 | extension URLSession: NetworkAccess {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
28 | public func load(request: URLRequest) async throws -> (Data, URLResponse) {
29 | return try await data(for: request)
[3/22] Compiling DBNetworkStack URLRequest+Modifications.swift
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:26:18: error: cannot find type 'URLRequest' in scope
24 | import Foundation
25 |
26 | public extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
27 |
28 | /// Creates a new `URLRequest` with HTTPHeaderFields added into the new request.
/host/spi-builder-workspace/Source/URLSession+NetworkAccess.swift:27:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
25 |
26 | /// Adds conformens to `NetworkAccess`. `URLSession` can be used as a network access.
27 | extension URLSession: NetworkAccess {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
28 | public func load(request: URLRequest) async throws -> (Data, URLResponse) {
29 | return try await data(for: request)
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:33:55: error: cannot find type 'URLRequest' in scope
31 | /// - Parameter HTTPHeaderFields: the header fileds to add to the request
32 | /// - Returns: a new `URLRequest`
33 | func added(HTTPHeaderFields: [String: String]) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
34 | var request = self
35 | let headerFiels = (request.allHTTPHeaderFields ?? [:]).merging(HTTPHeaderFields, uniquingKeysWith: { $1 })
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:46:82: error: cannot find type 'URLRequest' in scope
44 | /// - Parameter overrideExisting: if `true existing items with the same name will be overridden
45 | /// - Returns: a new `URLRequest`
46 | func appending(queryItems: [URLQueryItem], overrideExisting: Bool = true) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
47 | var request = self
48 | guard let url = request.url else {
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:60:89: error: cannot find type 'URLRequest' in scope
58 | /// - Parameter overrideExisting: if `true existing items with the same name will be overridden
59 | /// - Returns: a new `URLRequest`
60 | func appending(queryParameters: [String: String], overrideExisting: Bool = true) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
61 | return appending(queryItems: queryParameters.asURLQueryItems() )
62 | }
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:68:69: error: cannot find type 'URLRequest' in scope
66 | /// - Parameter queryItems: the query items to add to the request
67 | /// - Returns: a new `URLRequest`
68 | func replacingAllQueryItems(with queryItems: [URLQueryItem]) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
69 | var request = self
70 | guard let url = request.url else {
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:81:71: error: cannot find type 'URLRequest' in scope
79 | /// - Parameter parameters: the parameters to add to the request
80 | /// - Returns: a new `URLRequest`
81 | func replacingAllQueryItems(with parameters: [String: String]) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
82 | return replacingAllQueryItems(with: parameters.asURLQueryItems() )
83 | }
/host/spi-builder-workspace/Source/URLSession+NetworkAccess.swift:28:31: error: cannot find type 'URLRequest' in scope
26 | /// Adds conformens to `NetworkAccess`. `URLSession` can be used as a network access.
27 | extension URLSession: NetworkAccess {
28 | public func load(request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
29 | return try await data(for: request)
30 | }
[4/22] Compiling DBNetworkStack URLSession+NetworkAccess.swift
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:26:18: error: cannot find type 'URLRequest' in scope
24 | import Foundation
25 |
26 | public extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
27 |
28 | /// Creates a new `URLRequest` with HTTPHeaderFields added into the new request.
/host/spi-builder-workspace/Source/URLSession+NetworkAccess.swift:27:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
25 |
26 | /// Adds conformens to `NetworkAccess`. `URLSession` can be used as a network access.
27 | extension URLSession: NetworkAccess {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
28 | public func load(request: URLRequest) async throws -> (Data, URLResponse) {
29 | return try await data(for: request)
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:33:55: error: cannot find type 'URLRequest' in scope
31 | /// - Parameter HTTPHeaderFields: the header fileds to add to the request
32 | /// - Returns: a new `URLRequest`
33 | func added(HTTPHeaderFields: [String: String]) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
34 | var request = self
35 | let headerFiels = (request.allHTTPHeaderFields ?? [:]).merging(HTTPHeaderFields, uniquingKeysWith: { $1 })
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:46:82: error: cannot find type 'URLRequest' in scope
44 | /// - Parameter overrideExisting: if `true existing items with the same name will be overridden
45 | /// - Returns: a new `URLRequest`
46 | func appending(queryItems: [URLQueryItem], overrideExisting: Bool = true) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
47 | var request = self
48 | guard let url = request.url else {
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:60:89: error: cannot find type 'URLRequest' in scope
58 | /// - Parameter overrideExisting: if `true existing items with the same name will be overridden
59 | /// - Returns: a new `URLRequest`
60 | func appending(queryParameters: [String: String], overrideExisting: Bool = true) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
61 | return appending(queryItems: queryParameters.asURLQueryItems() )
62 | }
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:68:69: error: cannot find type 'URLRequest' in scope
66 | /// - Parameter queryItems: the query items to add to the request
67 | /// - Returns: a new `URLRequest`
68 | func replacingAllQueryItems(with queryItems: [URLQueryItem]) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
69 | var request = self
70 | guard let url = request.url else {
/host/spi-builder-workspace/Source/URLRequest+Modifications.swift:81:71: error: cannot find type 'URLRequest' in scope
79 | /// - Parameter parameters: the parameters to add to the request
80 | /// - Returns: a new `URLRequest`
81 | func replacingAllQueryItems(with parameters: [String: String]) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
82 | return replacingAllQueryItems(with: parameters.asURLQueryItems() )
83 | }
/host/spi-builder-workspace/Source/URLSession+NetworkAccess.swift:28:31: error: cannot find type 'URLRequest' in scope
26 | /// Adds conformens to `NetworkAccess`. `URLSession` can be used as a network access.
27 | extension URLSession: NetworkAccess {
28 | public func load(request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
29 | return try await data(for: request)
30 | }
[5/22] Compiling DBNetworkStack NetworkErrorConvertible.swift
/host/spi-builder-workspace/Source/NetworkService+ResourceWithError.swift:56:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 | public func requestResultWithResponse<Success, E: Error>(
55 | for resource: Resource<Success, E>
56 | ) async -> Result<(Success, HTTPURLResponse), E> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 | let resourceWithoutError = Resource<Success, NetworkError>(request: resource.request, parse: resource.parse)
58 | return await self.requestResultWithResponse(for: resourceWithoutError)
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/Source/NetworkService+ResourceWithError.swift:133:114: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
131 |
132 | @discardableResult
133 | func requestWithResponse<Success, E: Error>(for resource: Resource<Success, E>) async throws(E) -> (Success, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 | return try await requestResultWithResponse(for: resource).get()
135 | }
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/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/NetworkService.swift:53:118: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | */
52 | @discardableResult
53 | func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError>
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 | }
55 |
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/Source/NetworkService.swift:105:126: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 |
104 | @discardableResult
105 | func requestWithResponse<Success>(for resource: Resource<Success, NetworkError>) async throws(NetworkError) -> (Success, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | return try await requestResultWithResponse(for: resource).get()
107 | }
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
[6/22] Compiling DBNetworkStack NetworkService+ResourceWithError.swift
/host/spi-builder-workspace/Source/NetworkService+ResourceWithError.swift:56:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 | public func requestResultWithResponse<Success, E: Error>(
55 | for resource: Resource<Success, E>
56 | ) async -> Result<(Success, HTTPURLResponse), E> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 | let resourceWithoutError = Resource<Success, NetworkError>(request: resource.request, parse: resource.parse)
58 | return await self.requestResultWithResponse(for: resourceWithoutError)
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/Source/NetworkService+ResourceWithError.swift:133:114: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
131 |
132 | @discardableResult
133 | func requestWithResponse<Success, E: Error>(for resource: Resource<Success, E>) async throws(E) -> (Success, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 | return try await requestResultWithResponse(for: resource).get()
135 | }
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/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/NetworkService.swift:53:118: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | */
52 | @discardableResult
53 | func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError>
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 | }
55 |
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/Source/NetworkService.swift:105:126: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 |
104 | @discardableResult
105 | func requestWithResponse<Success>(for resource: Resource<Success, NetworkError>) async throws(NetworkError) -> (Success, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | return try await requestResultWithResponse(for: resource).get()
107 | }
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
[7/22] Compiling DBNetworkStack NetworkService.swift
/host/spi-builder-workspace/Source/NetworkService+ResourceWithError.swift:56:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 | public func requestResultWithResponse<Success, E: Error>(
55 | for resource: Resource<Success, E>
56 | ) async -> Result<(Success, HTTPURLResponse), E> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 | let resourceWithoutError = Resource<Success, NetworkError>(request: resource.request, parse: resource.parse)
58 | return await self.requestResultWithResponse(for: resourceWithoutError)
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/Source/NetworkService+ResourceWithError.swift:133:114: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
131 |
132 | @discardableResult
133 | func requestWithResponse<Success, E: Error>(for resource: Resource<Success, E>) async throws(E) -> (Success, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 | return try await requestResultWithResponse(for: resource).get()
135 | }
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/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/NetworkService.swift:53:118: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | */
52 | @discardableResult
53 | func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError>
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 | }
55 |
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/Source/NetworkService.swift:105:126: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 |
104 | @discardableResult
105 | func requestWithResponse<Success>(for resource: Resource<Success, NetworkError>) async throws(NetworkError) -> (Success, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | return try await requestResultWithResponse(for: resource).get()
107 | }
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
[8/22] Compiling DBNetworkStack URL+StaticStringInit.swift
/host/spi-builder-workspace/Source/URLRequest+Init.swift:26:11: error: cannot find type 'URLRequest' in scope
24 | import Foundation
25 |
26 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
27 |
28 | /// Convience initializer for easy request creation.
[9/22] Compiling DBNetworkStack URLRequest+Init.swift
/host/spi-builder-workspace/Source/URLRequest+Init.swift:26:11: error: cannot find type 'URLRequest' in scope
24 | import Foundation
25 |
26 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
27 |
28 | /// Convience initializer for easy request creation.
[10/22] Compiling DBNetworkStack Resource.swift
/host/spi-builder-workspace/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
[11/22] Compiling DBNetworkStack ResourceWithError+NetworkErrorConvertible.swift
/host/spi-builder-workspace/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
[12/22] Compiling DBNetworkStack Resource+Map.swift
/host/spi-builder-workspace/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
[13/22] Compiling DBNetworkStack Resource+Void.swift
/host/spi-builder-workspace/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
[14/22] Compiling DBNetworkStack HTTPMethod.swift
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:24: error: cannot find type 'URLRequest' in scope
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
36 |
37 | }
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:59: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |
37 | }
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/Source/NetworkError.swift:33:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | case cancelled
32 | /// Missing authorization for the request (HTTP Error 401)
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
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/Source/NetworkError.swift:35:32: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
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/Source/NetworkError.swift:37:32: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | case clientError(response: HTTPURLResponse?, data: Data?)
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
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/Source/NetworkError.swift:39:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | case serverError(response: HTTPURLResponse?, data: Data?)
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | /// Complete request failed.
41 | case requestError(error: Error)
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/Source/NetworkError.swift:43:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | case requestError(error: Error)
42 |
43 | public init?(response: HTTPURLResponse, data: Data) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | switch response.statusCode {
45 | case 200..<300: return nil
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/Source/NetworkError.swift:33:10: warning: associated value 'unauthorized(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
31 | case cancelled
32 | /// Missing authorization for the request (HTTP Error 401)
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
| `- warning: associated value 'unauthorized(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:35:10: warning: associated value 'clientError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
| `- warning: associated value 'clientError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:37:10: warning: associated value 'serverError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
35 | case clientError(response: HTTPURLResponse?, data: Data?)
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
| `- warning: associated value 'serverError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:39:10: warning: associated value 'serializationError(error:response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
37 | case serverError(response: HTTPURLResponse?, data: Data?)
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
| `- warning: associated value 'serializationError(error:response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
40 | /// Complete request failed.
41 | case requestError(error: Error)
/host/spi-builder-workspace/Source/NetworkError.swift:44:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
42 |
43 | public init?(response: HTTPURLResponse, data: Data) {
44 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
45 | case 200..<300: return nil
46 | case 401:
[15/22] Compiling DBNetworkStack NetworkAccess.swift
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:24: error: cannot find type 'URLRequest' in scope
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
36 |
37 | }
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:59: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |
37 | }
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/Source/NetworkError.swift:33:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | case cancelled
32 | /// Missing authorization for the request (HTTP Error 401)
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
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/Source/NetworkError.swift:35:32: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
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/Source/NetworkError.swift:37:32: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | case clientError(response: HTTPURLResponse?, data: Data?)
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
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/Source/NetworkError.swift:39:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | case serverError(response: HTTPURLResponse?, data: Data?)
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | /// Complete request failed.
41 | case requestError(error: Error)
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/Source/NetworkError.swift:43:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | case requestError(error: Error)
42 |
43 | public init?(response: HTTPURLResponse, data: Data) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | switch response.statusCode {
45 | case 200..<300: return nil
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/Source/NetworkError.swift:33:10: warning: associated value 'unauthorized(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
31 | case cancelled
32 | /// Missing authorization for the request (HTTP Error 401)
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
| `- warning: associated value 'unauthorized(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:35:10: warning: associated value 'clientError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
| `- warning: associated value 'clientError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:37:10: warning: associated value 'serverError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
35 | case clientError(response: HTTPURLResponse?, data: Data?)
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
| `- warning: associated value 'serverError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:39:10: warning: associated value 'serializationError(error:response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
37 | case serverError(response: HTTPURLResponse?, data: Data?)
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
| `- warning: associated value 'serializationError(error:response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
40 | /// Complete request failed.
41 | case requestError(error: Error)
/host/spi-builder-workspace/Source/NetworkError.swift:44:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
42 |
43 | public init?(response: HTTPURLResponse, data: Data) {
44 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
45 | case 200..<300: return nil
46 | case 401:
[16/22] Compiling DBNetworkStack NetworkError.swift
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:24: error: cannot find type 'URLRequest' in scope
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
36 |
37 | }
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:59: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |
37 | }
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/Source/NetworkError.swift:33:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | case cancelled
32 | /// Missing authorization for the request (HTTP Error 401)
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
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/Source/NetworkError.swift:35:32: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
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/Source/NetworkError.swift:37:32: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | case clientError(response: HTTPURLResponse?, data: Data?)
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
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/Source/NetworkError.swift:39:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | case serverError(response: HTTPURLResponse?, data: Data?)
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | /// Complete request failed.
41 | case requestError(error: Error)
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/Source/NetworkError.swift:43:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | case requestError(error: Error)
42 |
43 | public init?(response: HTTPURLResponse, data: Data) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | switch response.statusCode {
45 | case 200..<300: return nil
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/Source/NetworkError.swift:33:10: warning: associated value 'unauthorized(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
31 | case cancelled
32 | /// Missing authorization for the request (HTTP Error 401)
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
| `- warning: associated value 'unauthorized(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:35:10: warning: associated value 'clientError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
33 | case unauthorized(response: HTTPURLResponse, data: Data?)
34 | /// Invalid payload was send to the server (HTTP Error 400...451)
35 | case clientError(response: HTTPURLResponse?, data: Data?)
| `- warning: associated value 'clientError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:37:10: warning: associated value 'serverError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
35 | case clientError(response: HTTPURLResponse?, data: Data?)
36 | /// Error on the server (HTTP Error 500...511)
37 | case serverError(response: HTTPURLResponse?, data: Data?)
| `- warning: associated value 'serverError(response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
/host/spi-builder-workspace/Source/NetworkError.swift:39:10: warning: associated value 'serializationError(error:response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
37 | case serverError(response: HTTPURLResponse?, data: Data?)
38 | /// Parsing the body into expected type failed.
39 | case serializationError(error: Error, response: HTTPURLResponse, data: Data?)
| `- warning: associated value 'serializationError(error:response:data:)' of 'Sendable'-conforming enum 'NetworkError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
40 | /// Complete request failed.
41 | case requestError(error: Error)
/host/spi-builder-workspace/Source/NetworkError.swift:44:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
42 |
43 | public init?(response: HTTPURLResponse, data: Data) {
44 | switch response.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
45 | case 200..<300: return nil
46 | case 401:
[17/22] Compiling DBNetworkStack RetryNetworkService.swift
/host/spi-builder-workspace/Source/NetworkServices/RetryNetworkService.swift:84:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
82 | - returns: a running network task
83 | */
84 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 | let result = await networkService.requestResultWithResponse(for: resource)
86 | switch result {
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/Source/NetworkServices/RetryNetworkService.swift:98:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | numberOfRetriesLeft: Int,
97 | resource: Resource<Success, NetworkError>
98 | ) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
99 | if self.shouldRetry(error), numberOfRetriesLeft > 0 {
100 | let duration = UInt64(idleTimeInterval * 1_000_000_000)
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/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
[18/22] Compiling DBNetworkStack Resource+Decodable.swift
/host/spi-builder-workspace/Source/NetworkServices/RetryNetworkService.swift:84:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
82 | - returns: a running network task
83 | */
84 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 | let result = await networkService.requestResultWithResponse(for: resource)
86 | switch result {
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/Source/NetworkServices/RetryNetworkService.swift:98:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | numberOfRetriesLeft: Int,
97 | resource: Resource<Success, NetworkError>
98 | ) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
99 | if self.shouldRetry(error), numberOfRetriesLeft > 0 {
100 | let duration = UInt64(idleTimeInterval * 1_000_000_000)
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/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
[19/22] Compiling DBNetworkStack Resource+Inspect.swift
/host/spi-builder-workspace/Source/NetworkServices/RetryNetworkService.swift:84:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
82 | - returns: a running network task
83 | */
84 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 | let result = await networkService.requestResultWithResponse(for: resource)
86 | switch result {
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/Source/NetworkServices/RetryNetworkService.swift:98:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | numberOfRetriesLeft: Int,
97 | resource: Resource<Success, NetworkError>
98 | ) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
99 | if self.shouldRetry(error), numberOfRetriesLeft > 0 {
100 | let duration = UInt64(idleTimeInterval * 1_000_000_000)
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/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
[20/22] Compiling DBNetworkStack BasicNetworkService.swift
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:24: error: cannot find type 'URLRequest' in scope
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
36 |
37 | }
/host/spi-builder-workspace/Source/NetworkServices/BasicNetworkService.swift:76:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | */
75 | @discardableResult
76 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | do {
78 | let (data, response) = try await networkAccess.load(request: resource.request)
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/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:44:51: error: cannot find type 'URLRequest' in scope
42 | public final class ModifyRequestNetworkService: NetworkService {
43 |
44 | private let requestModifications: [@Sendable (URLRequest) -> URLRequest]
| `- error: cannot find type 'URLRequest' in scope
45 | private let networkService: NetworkService
46 |
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:44:66: error: cannot find type 'URLRequest' in scope
42 | public final class ModifyRequestNetworkService: NetworkService {
43 |
44 | private let requestModifications: [@Sendable (URLRequest) -> URLRequest]
| `- error: cannot find type 'URLRequest' in scope
45 | private let networkService: NetworkService
46 |
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:52:83: error: cannot find type 'URLRequest' in scope
50 | /// - networkService: a networkservice.
51 | /// - requestModifications: array of modifications to modify requests.
52 | public init(networkService: NetworkService, requestModifications: [@Sendable (URLRequest) -> URLRequest]) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.networkService = networkService
54 | self.requestModifications = requestModifications
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:52:98: error: cannot find type 'URLRequest' in scope
50 | /// - networkService: a networkservice.
51 | /// - requestModifications: array of modifications to modify requests.
52 | public init(networkService: NetworkService, requestModifications: [@Sendable (URLRequest) -> URLRequest]) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.networkService = networkService
54 | self.requestModifications = requestModifications
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:83:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | */
82 | @discardableResult
83 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | let request = requestModifications.reduce(resource.request, { request, modify in
85 | return modify(request)
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/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:71:29: error: cannot find type 'URLRequest' in scope
69 |
70 | /// Last executed request
71 | public var lastRequest: URLRequest? {
| `- error: cannot find type 'URLRequest' in scope
72 | return lastRequests.last
73 | }
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:76:44: error: cannot find type 'URLRequest' in scope
74 |
75 | /// All executed requests.
76 | public private(set) var lastRequests: [URLRequest] = []
| `- error: cannot find type 'URLRequest' in scope
77 |
78 | private var responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)]
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:78:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | public private(set) var lastRequests: [URLRequest] = []
77 |
78 | private var responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)]
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 | private let encoder: JSONEncoder
80 |
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/Source/NetworkServices/NetworkServiceMock.swift:83:35: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | /// Creates an instace of `NetworkServiceMock`
82 | public init(
83 | responses: [Result<(Data, HTTPURLResponse), NetworkError>] = [],
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | encoder: JSONEncoder = JSONEncoder()
85 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:92:45: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | /// Creates an instace of `NetworkServiceMock`
91 | public init<each T: Encodable>(
92 | _ responses: repeat Result<(each T, HTTPURLResponse), NetworkError>,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | encoder: JSONEncoder = JSONEncoder()
94 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:114:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | /// Creates an instace of `NetworkServiceMock`
113 | public init(
114 | mappings responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)],
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | encoder: JSONEncoder = JSONEncoder()
116 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:123:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 | /// Creates an instace of `NetworkServiceMock`
122 | public init<each T: Encodable>(
123 | mappings responses: repeat (String, Result<(each T, HTTPURLResponse), NetworkError>),
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
124 | encoder: JSONEncoder = JSONEncoder()
125 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:172:135: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
170 | */
171 | @MainActor
172 | public func requestResultWithResponse<Success: Sendable>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 | lastRequests.append(resource.request)
174 | if !responses.isEmpty {
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/Source/NetworkServices/NetworkServiceMock.swift:198:59: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
196 | }
197 |
198 | public func schedule<T: Encodable>(result: Result<(T, HTTPURLResponse), NetworkError>) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
199 | let scheduled: Result<(Data, HTTPURLResponse), NetworkError>
200 | switch result {
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/Source/NetworkServices/NetworkServiceMock.swift:216:42: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
214 | }
215 |
216 | public func schedule(success: (Void, HTTPURLResponse)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
217 | schedule(result: .success(("", success.1)))
218 | }
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/Source/NetworkServices/NetworkServiceMock.swift:224:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
222 | }
223 |
224 | public func schedule<T: Encodable>(success: (T, HTTPURLResponse)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
225 | schedule(result: .success(success))
226 | }
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/Source/NetworkServices/NetworkServiceMock.swift:172:17: warning: non-sendable type 'Result<(Success, HTTPURLResponse), NetworkError>' (aka 'Result<(Success, AnyObject), NetworkError>') cannot be returned from main actor-isolated implementation to caller of protocol requirement 'requestResultWithResponse(for:)'; this is an error in the Swift 6 language mode
170 | */
171 | @MainActor
172 | public func requestResultWithResponse<Success: Sendable>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- warning: non-sendable type 'Result<(Success, HTTPURLResponse), NetworkError>' (aka 'Result<(Success, AnyObject), NetworkError>') cannot be returned from main actor-isolated implementation to caller of protocol requirement 'requestResultWithResponse(for:)'; this is an error in the Swift 6 language mode
173 | lastRequests.append(resource.request)
174 | if !responses.isEmpty {
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:237:77: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | func encode<T: Encodable>(
236 | encoder: JSONEncoder
237 | ) -> Result<(Data, HTTPURLResponse), NetworkError> where Success == (T, HTTPURLResponse), Failure == NetworkError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | return self.map({ ((try? encoder.encode($0.0)) ?? Data(), $0.1) })
239 | }
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/Source/NetworkServices/NetworkServiceMock.swift:237:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | func encode<T: Encodable>(
236 | encoder: JSONEncoder
237 | ) -> Result<(Data, HTTPURLResponse), NetworkError> where Success == (T, HTTPURLResponse), Failure == NetworkError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | return self.map({ ((try? encoder.encode($0.0)) ?? Data(), $0.1) })
239 | }
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/Source/NetworkServices/NetworkServiceMock.swift:247:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | func encode(
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
249 | url: URL(staticString: "bahn.de"),
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/Source/NetworkServices/NetworkServiceMock.swift:96:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
94 | ) {
95 | self.encoder = encoder
96 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 | repeat encodedResponses.append((each responses).encode(encoder: encoder))
98 | self.responses = encodedResponses.map({ ("*", $0) })
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/Source/NetworkServices/NetworkServiceMock.swift:107:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | ) {
106 | self.encoder = encoder
107 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 | repeat encodedResponses.append((each responses).encode(encoder: encoder))
109 | self.responses = encodedResponses.map({ ("*", $0) })
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/Source/NetworkServices/NetworkServiceMock.swift:127:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | ) {
126 | self.encoder = encoder
127 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
128 | var paths: [String] = []
129 | repeat encodedResponses.append((each responses).1.encode(encoder: encoder))
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/Source/NetworkServices/NetworkServiceMock.swift:140:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | ) {
139 | self.encoder = encoder
140 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var paths: [String] = []
142 | repeat encodedResponses.append((each responses).1.encode(encoder: encoder))
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/Source/NetworkServices/NetworkServiceMock.swift:199:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
197 |
198 | public func schedule<T: Encodable>(result: Result<(T, HTTPURLResponse), NetworkError>) {
199 | let scheduled: Result<(Data, HTTPURLResponse), NetworkError>
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
200 | switch result {
201 | case .failure(let error):
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/Source/NetworkServices/NetworkServiceMock.swift:213:40: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
211 |
212 | public func schedule(success: Void) {
213 | schedule(result: .success(("", HTTPURLResponse())))
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
214 | }
215 |
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:221:45: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
219 |
220 | public func schedule<T: Encodable>(success: T) {
221 | schedule(result: .success((success, HTTPURLResponse())))
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
222 | }
223 |
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:248:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
249 | url: URL(staticString: "bahn.de"),
250 | statusCode: 200,
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/Source/NetworkServices/NetworkServiceMock.swift:248:49: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
249 | url: URL(staticString: "bahn.de"),
250 | statusCode: 200,
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:252:27: error: 'nil' requires a contextual type
250 | statusCode: 200,
251 | httpVersion: "HTTP/1.1",
252 | headerFields: nil
| `- error: 'nil' requires a contextual type
253 | )
254 | return self.map({ ((try? encoder.encode($0)) ?? Data(), defaultResponse) })
[21/22] Compiling DBNetworkStack ModifyRequestNetworkService.swift
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:24: error: cannot find type 'URLRequest' in scope
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
36 |
37 | }
/host/spi-builder-workspace/Source/NetworkServices/BasicNetworkService.swift:76:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | */
75 | @discardableResult
76 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | do {
78 | let (data, response) = try await networkAccess.load(request: resource.request)
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/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:44:51: error: cannot find type 'URLRequest' in scope
42 | public final class ModifyRequestNetworkService: NetworkService {
43 |
44 | private let requestModifications: [@Sendable (URLRequest) -> URLRequest]
| `- error: cannot find type 'URLRequest' in scope
45 | private let networkService: NetworkService
46 |
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:44:66: error: cannot find type 'URLRequest' in scope
42 | public final class ModifyRequestNetworkService: NetworkService {
43 |
44 | private let requestModifications: [@Sendable (URLRequest) -> URLRequest]
| `- error: cannot find type 'URLRequest' in scope
45 | private let networkService: NetworkService
46 |
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:52:83: error: cannot find type 'URLRequest' in scope
50 | /// - networkService: a networkservice.
51 | /// - requestModifications: array of modifications to modify requests.
52 | public init(networkService: NetworkService, requestModifications: [@Sendable (URLRequest) -> URLRequest]) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.networkService = networkService
54 | self.requestModifications = requestModifications
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:52:98: error: cannot find type 'URLRequest' in scope
50 | /// - networkService: a networkservice.
51 | /// - requestModifications: array of modifications to modify requests.
52 | public init(networkService: NetworkService, requestModifications: [@Sendable (URLRequest) -> URLRequest]) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.networkService = networkService
54 | self.requestModifications = requestModifications
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:83:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | */
82 | @discardableResult
83 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | let request = requestModifications.reduce(resource.request, { request, modify in
85 | return modify(request)
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/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:71:29: error: cannot find type 'URLRequest' in scope
69 |
70 | /// Last executed request
71 | public var lastRequest: URLRequest? {
| `- error: cannot find type 'URLRequest' in scope
72 | return lastRequests.last
73 | }
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:76:44: error: cannot find type 'URLRequest' in scope
74 |
75 | /// All executed requests.
76 | public private(set) var lastRequests: [URLRequest] = []
| `- error: cannot find type 'URLRequest' in scope
77 |
78 | private var responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)]
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:78:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | public private(set) var lastRequests: [URLRequest] = []
77 |
78 | private var responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)]
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 | private let encoder: JSONEncoder
80 |
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/Source/NetworkServices/NetworkServiceMock.swift:83:35: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | /// Creates an instace of `NetworkServiceMock`
82 | public init(
83 | responses: [Result<(Data, HTTPURLResponse), NetworkError>] = [],
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | encoder: JSONEncoder = JSONEncoder()
85 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:92:45: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | /// Creates an instace of `NetworkServiceMock`
91 | public init<each T: Encodable>(
92 | _ responses: repeat Result<(each T, HTTPURLResponse), NetworkError>,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | encoder: JSONEncoder = JSONEncoder()
94 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:114:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | /// Creates an instace of `NetworkServiceMock`
113 | public init(
114 | mappings responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)],
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | encoder: JSONEncoder = JSONEncoder()
116 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:123:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 | /// Creates an instace of `NetworkServiceMock`
122 | public init<each T: Encodable>(
123 | mappings responses: repeat (String, Result<(each T, HTTPURLResponse), NetworkError>),
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
124 | encoder: JSONEncoder = JSONEncoder()
125 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:172:135: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
170 | */
171 | @MainActor
172 | public func requestResultWithResponse<Success: Sendable>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 | lastRequests.append(resource.request)
174 | if !responses.isEmpty {
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/Source/NetworkServices/NetworkServiceMock.swift:198:59: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
196 | }
197 |
198 | public func schedule<T: Encodable>(result: Result<(T, HTTPURLResponse), NetworkError>) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
199 | let scheduled: Result<(Data, HTTPURLResponse), NetworkError>
200 | switch result {
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/Source/NetworkServices/NetworkServiceMock.swift:216:42: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
214 | }
215 |
216 | public func schedule(success: (Void, HTTPURLResponse)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
217 | schedule(result: .success(("", success.1)))
218 | }
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/Source/NetworkServices/NetworkServiceMock.swift:224:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
222 | }
223 |
224 | public func schedule<T: Encodable>(success: (T, HTTPURLResponse)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
225 | schedule(result: .success(success))
226 | }
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/Source/NetworkServices/NetworkServiceMock.swift:172:17: warning: non-sendable type 'Result<(Success, HTTPURLResponse), NetworkError>' (aka 'Result<(Success, AnyObject), NetworkError>') cannot be returned from main actor-isolated implementation to caller of protocol requirement 'requestResultWithResponse(for:)'; this is an error in the Swift 6 language mode
170 | */
171 | @MainActor
172 | public func requestResultWithResponse<Success: Sendable>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- warning: non-sendable type 'Result<(Success, HTTPURLResponse), NetworkError>' (aka 'Result<(Success, AnyObject), NetworkError>') cannot be returned from main actor-isolated implementation to caller of protocol requirement 'requestResultWithResponse(for:)'; this is an error in the Swift 6 language mode
173 | lastRequests.append(resource.request)
174 | if !responses.isEmpty {
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:237:77: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | func encode<T: Encodable>(
236 | encoder: JSONEncoder
237 | ) -> Result<(Data, HTTPURLResponse), NetworkError> where Success == (T, HTTPURLResponse), Failure == NetworkError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | return self.map({ ((try? encoder.encode($0.0)) ?? Data(), $0.1) })
239 | }
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/Source/NetworkServices/NetworkServiceMock.swift:237:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | func encode<T: Encodable>(
236 | encoder: JSONEncoder
237 | ) -> Result<(Data, HTTPURLResponse), NetworkError> where Success == (T, HTTPURLResponse), Failure == NetworkError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | return self.map({ ((try? encoder.encode($0.0)) ?? Data(), $0.1) })
239 | }
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/Source/NetworkServices/NetworkServiceMock.swift:247:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | func encode(
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
249 | url: URL(staticString: "bahn.de"),
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/Source/NetworkServices/NetworkServiceMock.swift:96:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
94 | ) {
95 | self.encoder = encoder
96 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 | repeat encodedResponses.append((each responses).encode(encoder: encoder))
98 | self.responses = encodedResponses.map({ ("*", $0) })
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/Source/NetworkServices/NetworkServiceMock.swift:107:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | ) {
106 | self.encoder = encoder
107 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 | repeat encodedResponses.append((each responses).encode(encoder: encoder))
109 | self.responses = encodedResponses.map({ ("*", $0) })
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/Source/NetworkServices/NetworkServiceMock.swift:127:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | ) {
126 | self.encoder = encoder
127 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
128 | var paths: [String] = []
129 | repeat encodedResponses.append((each responses).1.encode(encoder: encoder))
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/Source/NetworkServices/NetworkServiceMock.swift:140:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | ) {
139 | self.encoder = encoder
140 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var paths: [String] = []
142 | repeat encodedResponses.append((each responses).1.encode(encoder: encoder))
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/Source/NetworkServices/NetworkServiceMock.swift:199:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
197 |
198 | public func schedule<T: Encodable>(result: Result<(T, HTTPURLResponse), NetworkError>) {
199 | let scheduled: Result<(Data, HTTPURLResponse), NetworkError>
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
200 | switch result {
201 | case .failure(let error):
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/Source/NetworkServices/NetworkServiceMock.swift:213:40: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
211 |
212 | public func schedule(success: Void) {
213 | schedule(result: .success(("", HTTPURLResponse())))
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
214 | }
215 |
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:221:45: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
219 |
220 | public func schedule<T: Encodable>(success: T) {
221 | schedule(result: .success((success, HTTPURLResponse())))
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
222 | }
223 |
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:248:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
249 | url: URL(staticString: "bahn.de"),
250 | statusCode: 200,
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/Source/NetworkServices/NetworkServiceMock.swift:248:49: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
249 | url: URL(staticString: "bahn.de"),
250 | statusCode: 200,
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:252:27: error: 'nil' requires a contextual type
250 | statusCode: 200,
251 | httpVersion: "HTTP/1.1",
252 | headerFields: nil
| `- error: 'nil' requires a contextual type
253 | )
254 | return self.map({ ((try? encoder.encode($0)) ?? Data(), defaultResponse) })
[22/22] Compiling DBNetworkStack NetworkServiceMock.swift
/host/spi-builder-workspace/Source/NetworkAccess.swift:35:24: error: cannot find type 'URLRequest' in scope
33 | /// - callback: Callback which gets called when the request finishes.
34 | /// - Returns: the running network task
35 | func load(request: URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
36 |
37 | }
/host/spi-builder-workspace/Source/NetworkServices/BasicNetworkService.swift:76:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | */
75 | @discardableResult
76 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | do {
78 | let (data, response) = try await networkAccess.load(request: resource.request)
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/Source/Resource.swift:40:25: error: cannot find type 'URLRequest' in scope
38 | public struct Resource<Model, E: Error>: Sendable {
39 | /// The request to fetch the resource remote payload
40 | public let request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
41 |
42 | /// Parses data into given model.
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:44:51: error: cannot find type 'URLRequest' in scope
42 | public final class ModifyRequestNetworkService: NetworkService {
43 |
44 | private let requestModifications: [@Sendable (URLRequest) -> URLRequest]
| `- error: cannot find type 'URLRequest' in scope
45 | private let networkService: NetworkService
46 |
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:44:66: error: cannot find type 'URLRequest' in scope
42 | public final class ModifyRequestNetworkService: NetworkService {
43 |
44 | private let requestModifications: [@Sendable (URLRequest) -> URLRequest]
| `- error: cannot find type 'URLRequest' in scope
45 | private let networkService: NetworkService
46 |
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:52:83: error: cannot find type 'URLRequest' in scope
50 | /// - networkService: a networkservice.
51 | /// - requestModifications: array of modifications to modify requests.
52 | public init(networkService: NetworkService, requestModifications: [@Sendable (URLRequest) -> URLRequest]) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.networkService = networkService
54 | self.requestModifications = requestModifications
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:52:98: error: cannot find type 'URLRequest' in scope
50 | /// - networkService: a networkservice.
51 | /// - requestModifications: array of modifications to modify requests.
52 | public init(networkService: NetworkService, requestModifications: [@Sendable (URLRequest) -> URLRequest]) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.networkService = networkService
54 | self.requestModifications = requestModifications
/host/spi-builder-workspace/Source/NetworkServices/ModifyRequestNetworkService.swift:83:125: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | */
82 | @discardableResult
83 | public func requestResultWithResponse<Success>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | let request = requestModifications.reduce(resource.request, { request, modify in
85 | return modify(request)
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/Source/Resource.swift:52:26: error: cannot find type 'URLRequest' in scope
50 | /// - parse: Parses data fetched with the request into given Model
51 |
52 | public init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
53 | self.request = request
54 | self.parse = parse
/host/spi-builder-workspace/Source/Resource+Decodable.swift:35:26: error: cannot find type 'URLRequest' in scope
33 | /// - decoder: a decoder which can decode the payload into the model type
34 | /// - mapError: a closure which maps to Error
35 | public init(request: URLRequest, decoder: JSONDecoder, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
36 | self.init(request: request, parse: {
37 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Decodable.swift:53:26: error: cannot find type 'URLRequest' in scope
51 | /// - decoder: a decoder which can decode the payload into the model type
52 | /// - mapError: a closure which maps to Error
53 | public init(request: URLRequest, decoder: JSONDecoder) {
| `- error: cannot find type 'URLRequest' in scope
54 | self.init(request: request, parse: {
55 | try decoder.decode(Model.self, from: $0)
/host/spi-builder-workspace/Source/Resource+Void.swift:17:19: error: cannot find type 'URLRequest' in scope
15 | /// - request: The request to get the remote data payload
16 | /// - mapError: a closure which maps to Error
17 | init(request: URLRequest, mapError: @escaping @Sendable (_ networkError: NetworkError) -> E) {
| `- error: cannot find type 'URLRequest' in scope
18 | self.init(request: request, parse: { _ in }, mapError: mapError)
19 | }
/host/spi-builder-workspace/Source/Resource+Void.swift:28:19: error: cannot find type 'URLRequest' in scope
26 | /// - Parameters:
27 | /// - request: The request to get the remote data payload
28 | init(request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
29 | self.init(request: request, parse: { _ in }, mapError: { E(networkError: $0) })
30 | }
/host/spi-builder-workspace/Source/ResourceWithError+NetworkErrorConvertible.swift:12:19: error: cannot find type 'URLRequest' in scope
10 | public extension Resource where E: NetworkErrorConvertible {
11 |
12 | init(request: URLRequest, parse: @escaping @Sendable (Data) throws -> Model) {
| `- error: cannot find type 'URLRequest' in scope
13 | self.request = request
14 | self.parse = parse
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:71:29: error: cannot find type 'URLRequest' in scope
69 |
70 | /// Last executed request
71 | public var lastRequest: URLRequest? {
| `- error: cannot find type 'URLRequest' in scope
72 | return lastRequests.last
73 | }
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:76:44: error: cannot find type 'URLRequest' in scope
74 |
75 | /// All executed requests.
76 | public private(set) var lastRequests: [URLRequest] = []
| `- error: cannot find type 'URLRequest' in scope
77 |
78 | private var responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)]
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:78:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | public private(set) var lastRequests: [URLRequest] = []
77 |
78 | private var responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)]
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 | private let encoder: JSONEncoder
80 |
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/Source/NetworkServices/NetworkServiceMock.swift:83:35: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | /// Creates an instace of `NetworkServiceMock`
82 | public init(
83 | responses: [Result<(Data, HTTPURLResponse), NetworkError>] = [],
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | encoder: JSONEncoder = JSONEncoder()
85 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:92:45: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | /// Creates an instace of `NetworkServiceMock`
91 | public init<each T: Encodable>(
92 | _ responses: repeat Result<(each T, HTTPURLResponse), NetworkError>,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | encoder: JSONEncoder = JSONEncoder()
94 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:114:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | /// Creates an instace of `NetworkServiceMock`
113 | public init(
114 | mappings responses: [(String, Result<(Data, HTTPURLResponse), NetworkError>)],
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | encoder: JSONEncoder = JSONEncoder()
116 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:123:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 | /// Creates an instace of `NetworkServiceMock`
122 | public init<each T: Encodable>(
123 | mappings responses: repeat (String, Result<(each T, HTTPURLResponse), NetworkError>),
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
124 | encoder: JSONEncoder = JSONEncoder()
125 | ) {
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/Source/NetworkServices/NetworkServiceMock.swift:172:135: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
170 | */
171 | @MainActor
172 | public func requestResultWithResponse<Success: Sendable>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 | lastRequests.append(resource.request)
174 | if !responses.isEmpty {
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/Source/NetworkServices/NetworkServiceMock.swift:198:59: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
196 | }
197 |
198 | public func schedule<T: Encodable>(result: Result<(T, HTTPURLResponse), NetworkError>) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
199 | let scheduled: Result<(Data, HTTPURLResponse), NetworkError>
200 | switch result {
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/Source/NetworkServices/NetworkServiceMock.swift:216:42: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
214 | }
215 |
216 | public func schedule(success: (Void, HTTPURLResponse)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
217 | schedule(result: .success(("", success.1)))
218 | }
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/Source/NetworkServices/NetworkServiceMock.swift:224:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
222 | }
223 |
224 | public func schedule<T: Encodable>(success: (T, HTTPURLResponse)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
225 | schedule(result: .success(success))
226 | }
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/Source/NetworkServices/NetworkServiceMock.swift:172:17: warning: non-sendable type 'Result<(Success, HTTPURLResponse), NetworkError>' (aka 'Result<(Success, AnyObject), NetworkError>') cannot be returned from main actor-isolated implementation to caller of protocol requirement 'requestResultWithResponse(for:)'; this is an error in the Swift 6 language mode
170 | */
171 | @MainActor
172 | public func requestResultWithResponse<Success: Sendable>(for resource: Resource<Success, NetworkError>) async -> Result<(Success, HTTPURLResponse), NetworkError> {
| `- warning: non-sendable type 'Result<(Success, HTTPURLResponse), NetworkError>' (aka 'Result<(Success, AnyObject), NetworkError>') cannot be returned from main actor-isolated implementation to caller of protocol requirement 'requestResultWithResponse(for:)'; this is an error in the Swift 6 language mode
173 | lastRequests.append(resource.request)
174 | if !responses.isEmpty {
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:237:77: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | func encode<T: Encodable>(
236 | encoder: JSONEncoder
237 | ) -> Result<(Data, HTTPURLResponse), NetworkError> where Success == (T, HTTPURLResponse), Failure == NetworkError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | return self.map({ ((try? encoder.encode($0.0)) ?? Data(), $0.1) })
239 | }
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/Source/NetworkServices/NetworkServiceMock.swift:237:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | func encode<T: Encodable>(
236 | encoder: JSONEncoder
237 | ) -> Result<(Data, HTTPURLResponse), NetworkError> where Success == (T, HTTPURLResponse), Failure == NetworkError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | return self.map({ ((try? encoder.encode($0.0)) ?? Data(), $0.1) })
239 | }
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/Source/NetworkServices/NetworkServiceMock.swift:247:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | func encode(
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
249 | url: URL(staticString: "bahn.de"),
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/Source/NetworkServices/NetworkServiceMock.swift:96:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
94 | ) {
95 | self.encoder = encoder
96 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 | repeat encodedResponses.append((each responses).encode(encoder: encoder))
98 | self.responses = encodedResponses.map({ ("*", $0) })
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/Source/NetworkServices/NetworkServiceMock.swift:107:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | ) {
106 | self.encoder = encoder
107 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 | repeat encodedResponses.append((each responses).encode(encoder: encoder))
109 | self.responses = encodedResponses.map({ ("*", $0) })
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/Source/NetworkServices/NetworkServiceMock.swift:127:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
125 | ) {
126 | self.encoder = encoder
127 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
128 | var paths: [String] = []
129 | repeat encodedResponses.append((each responses).1.encode(encoder: encoder))
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/Source/NetworkServices/NetworkServiceMock.swift:140:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | ) {
139 | self.encoder = encoder
140 | var encodedResponses: [Result<(Data, HTTPURLResponse), NetworkError>] = []
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
141 | var paths: [String] = []
142 | repeat encodedResponses.append((each responses).1.encode(encoder: encoder))
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/Source/NetworkServices/NetworkServiceMock.swift:199:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
197 |
198 | public func schedule<T: Encodable>(result: Result<(T, HTTPURLResponse), NetworkError>) {
199 | let scheduled: Result<(Data, HTTPURLResponse), NetworkError>
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
200 | switch result {
201 | case .failure(let error):
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/Source/NetworkServices/NetworkServiceMock.swift:213:40: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
211 |
212 | public func schedule(success: Void) {
213 | schedule(result: .success(("", HTTPURLResponse())))
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
214 | }
215 |
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:221:45: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
219 |
220 | public func schedule<T: Encodable>(success: T) {
221 | schedule(result: .success((success, HTTPURLResponse())))
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
222 | }
223 |
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:248:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
249 | url: URL(staticString: "bahn.de"),
250 | statusCode: 200,
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/Source/NetworkServices/NetworkServiceMock.swift:248:49: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
246 | encoder: JSONEncoder
247 | ) -> Result<(Data, HTTPURLResponse), NetworkError> {
248 | let defaultResponse: HTTPURLResponse! = HTTPURLResponse(
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
249 | url: URL(staticString: "bahn.de"),
250 | statusCode: 200,
/host/spi-builder-workspace/Source/NetworkServices/NetworkServiceMock.swift:252:27: error: 'nil' requires a contextual type
250 | statusCode: 200,
251 | httpVersion: "HTTP/1.1",
252 | headerFields: nil
| `- error: 'nil' requires a contextual type
253 | )
254 | return self.map({ ((try? encoder.encode($0)) ?? Data(), defaultResponse) })
BUILD FAILURE 6.1 android