Build Information
Failed to build StripeKit with Swift 5.10 for Linux.
Build Command
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.29.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/kyleishie/stripekit.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/kyleishie/stripekit
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 44a0e64 Implemented External Accounts Partially Implemented Accounts
Cloned https://github.com/kyleishie/stripekit.git
Revision (git rev-parse @):
44a0e648fadf14ed34a95f7ed8b8490c276cd7cb
SUCCESS checkout https://github.com/kyleishie/stripekit.git at master
========================================
Build
========================================
Selected platform: linux
Swift version: 5.10
Building package at path: $workDir
https://github.com/kyleishie/stripekit.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Building for debugging...
[0/9] Write sources
[3/9] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/30] Emitting module RESTClient
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:13:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:26:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPMethod.swift:20:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPStatus.swift:80:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+CodableBody.swift:11:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+Convenience.swift:10:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLSessionConfiguration.swift:11:8: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
public extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:13:172: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func list<T : Resource & Listable & Decodable>(_ type: T.Type, query: [String : String]? = nil, completionHandler: @escaping ((Result<[T], Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:23:196: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func retrieve<T : Resource & Retrievable & Decodable>(_ type: T.Type, id: String? = nil, query: [String : String]? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:33:144: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Codable>(_ instance: T, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:42:194: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Encodable, R : Resource & Decodable>(_ instance: T, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:54:163: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:63:213: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:75:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:84:216: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:96:150: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable & Decodable>(_ type: T.Type, id: String? = nil, completionHandler: @escaping ((Error?) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:112:185: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable, R : Decodable>(_ type: T.Type, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:140: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:15:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private(set) var session : URLSession
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:42: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:69: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'restJSONAPI'
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
~^~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
[6/32] Compiling RESTClient _CreationContext.swift
/host/spi-builder-workspace/Sources/RESTClient/_EditingContext.swift:16:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/_EditingContext.swift:17:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
[7/32] Compiling RESTClient _EditingContext.swift
/host/spi-builder-workspace/Sources/RESTClient/_EditingContext.swift:16:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/_EditingContext.swift:17:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
[8/32] Compiling RESTClient Result.swift
[9/32] Compiling RESTClient _Context.swift
[10/32] Compiling RESTClient URLSessionConfiguration.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLSessionConfiguration.swift:11:8: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
public extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:13:172: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func list<T : Resource & Listable & Decodable>(_ type: T.Type, query: [String : String]? = nil, completionHandler: @escaping ((Result<[T], Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:23:196: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func retrieve<T : Resource & Retrievable & Decodable>(_ type: T.Type, id: String? = nil, query: [String : String]? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:33:144: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Codable>(_ instance: T, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:42:194: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Encodable, R : Resource & Decodable>(_ instance: T, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:54:163: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:63:213: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:75:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:84:216: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:96:150: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable & Decodable>(_ type: T.Type, id: String? = nil, completionHandler: @escaping ((Error?) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:112:185: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable, R : Decodable>(_ type: T.Type, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:15:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:25:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:35:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:36:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:44:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:45:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:56:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:57:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:65:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:66:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:77:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:78:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:86:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:87:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:98:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:99:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:114:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:115:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:140: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
return session.dataTask(with: request) { [decoders] (data, response, error) in
~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:62: error: cannot infer type of closure parameter 'data' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:68: error: cannot infer type of closure parameter 'response' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:78: error: cannot infer type of closure parameter 'error' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:107:17: error: cannot assign value of type '_' to type 'Result<T, Error>?'
res = r
^
[11/32] Compiling RESTClient RESTClient+Async.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLSessionConfiguration.swift:11:8: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
public extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:13:172: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func list<T : Resource & Listable & Decodable>(_ type: T.Type, query: [String : String]? = nil, completionHandler: @escaping ((Result<[T], Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:23:196: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func retrieve<T : Resource & Retrievable & Decodable>(_ type: T.Type, id: String? = nil, query: [String : String]? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:33:144: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Codable>(_ instance: T, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:42:194: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Encodable, R : Resource & Decodable>(_ instance: T, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:54:163: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:63:213: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:75:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:84:216: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:96:150: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable & Decodable>(_ type: T.Type, id: String? = nil, completionHandler: @escaping ((Error?) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:112:185: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable, R : Decodable>(_ type: T.Type, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:15:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:25:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:35:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:36:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:44:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:45:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:56:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:57:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:65:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:66:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:77:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:78:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:86:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:87:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:98:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:99:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:114:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:115:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:140: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
return session.dataTask(with: request) { [decoders] (data, response, error) in
~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:62: error: cannot infer type of closure parameter 'data' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:68: error: cannot infer type of closure parameter 'response' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:78: error: cannot infer type of closure parameter 'error' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:107:17: error: cannot assign value of type '_' to type 'Result<T, Error>?'
res = r
^
[12/32] Compiling RESTClient RESTClient+DataTask.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLSessionConfiguration.swift:11:8: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
public extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:13:172: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func list<T : Resource & Listable & Decodable>(_ type: T.Type, query: [String : String]? = nil, completionHandler: @escaping ((Result<[T], Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:23:196: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func retrieve<T : Resource & Retrievable & Decodable>(_ type: T.Type, id: String? = nil, query: [String : String]? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:33:144: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Codable>(_ instance: T, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:42:194: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Encodable, R : Resource & Decodable>(_ instance: T, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:54:163: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:63:213: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:75:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:84:216: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:96:150: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable & Decodable>(_ type: T.Type, id: String? = nil, completionHandler: @escaping ((Error?) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:112:185: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable, R : Decodable>(_ type: T.Type, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:15:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:25:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:35:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:36:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:44:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:45:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:56:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:57:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:65:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:66:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:77:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:78:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:86:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:87:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:98:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:99:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:114:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:115:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:140: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
return session.dataTask(with: request) { [decoders] (data, response, error) in
~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:62: error: cannot infer type of closure parameter 'data' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:68: error: cannot infer type of closure parameter 'response' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:78: error: cannot infer type of closure parameter 'error' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:107:17: error: cannot assign value of type '_' to type 'Result<T, Error>?'
res = r
^
[13/32] Compiling RESTClient FormURLEncoder.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:13:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:26:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[14/32] Compiling RESTClient JSONEncoder.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:13:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:26:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[15/32] Compiling RESTClient Accept.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:13:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:26:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[16/32] Compiling RESTClient RESTClient+Sync.swift
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:17:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:27:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:37:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:38:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:46:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:47:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:58:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:59:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:67:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:68:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:79:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:80:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:88:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:89:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:100:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:101:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:110:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:111:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:15:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private(set) var session : URLSession
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:42: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:69: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'restJSONAPI'
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
~^~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:75: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:95: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:48:53: error: type of expression is ambiguous without a type annotation
guard let contentType = request.contentType ?? session.configuration.httpAdditionalHeaders?["Content-Type"] as? ContentType else {
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[17/32] Compiling RESTClient RESTClient.swift
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:17:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:27:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:37:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:38:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:46:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:47:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:58:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:59:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:67:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:68:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:79:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:80:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:88:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:89:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:100:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:101:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:110:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:111:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:15:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private(set) var session : URLSession
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:42: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:69: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'restJSONAPI'
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
~^~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:75: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:95: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:48:53: error: type of expression is ambiguous without a type annotation
guard let contentType = request.contentType ?? session.configuration.httpAdditionalHeaders?["Content-Type"] as? ContentType else {
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[18/32] Compiling RESTClient Resource.swift
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:17:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:27:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:37:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:38:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:46:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:47:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:58:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:59:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:67:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:68:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:79:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:80:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:88:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:89:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:100:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:101:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:110:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:111:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:15:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private(set) var session : URLSession
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:42: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:69: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'restJSONAPI'
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
~^~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:75: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:95: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:48:53: error: type of expression is ambiguous without a type annotation
guard let contentType = request.contentType ?? session.configuration.httpAdditionalHeaders?["Content-Type"] as? ContentType else {
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[19/32] Compiling RESTClient AuthorizationHeader.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[20/32] Compiling RESTClient Codable+DynamicCoder.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[21/32] Compiling RESTClient ContentType.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[22/32] Compiling RESTClient HTTPStatus.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPStatus.swift:80:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+CodableBody.swift:11:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+Convenience.swift:10:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[23/32] Compiling RESTClient URLRequest+CodableBody.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPStatus.swift:80:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+CodableBody.swift:11:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+Convenience.swift:10:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[24/32] Compiling RESTClient URLRequest+Convenience.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPStatus.swift:80:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+CodableBody.swift:11:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+Convenience.swift:10:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[25/32] Compiling RESTClient Dictionary+URLQueryItem.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPMethod.swift:20:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[26/32] Compiling RESTClient EnumCollection.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPMethod.swift:20:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[27/32] Compiling RESTClient HTTPMethod.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPMethod.swift:20:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
error: fatalError
[0/1] Planning build
Building for debugging...
[0/6] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/25] Emitting module RESTClient
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:13:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:26:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPMethod.swift:20:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPStatus.swift:80:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+CodableBody.swift:11:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+Convenience.swift:10:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLSessionConfiguration.swift:11:8: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
public extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:13:172: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func list<T : Resource & Listable & Decodable>(_ type: T.Type, query: [String : String]? = nil, completionHandler: @escaping ((Result<[T], Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:23:196: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func retrieve<T : Resource & Retrievable & Decodable>(_ type: T.Type, id: String? = nil, query: [String : String]? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:33:144: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Codable>(_ instance: T, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:42:194: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Encodable, R : Resource & Decodable>(_ instance: T, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:54:163: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:63:213: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:75:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:84:216: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:96:150: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable & Decodable>(_ type: T.Type, id: String? = nil, completionHandler: @escaping ((Error?) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:112:185: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable, R : Decodable>(_ type: T.Type, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:140: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:15:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private(set) var session : URLSession
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:42: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:69: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'restJSONAPI'
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
~^~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
[3/27] Compiling RESTClient _CreationContext.swift
/host/spi-builder-workspace/Sources/RESTClient/_EditingContext.swift:16:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/_EditingContext.swift:17:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
[4/27] Compiling RESTClient _EditingContext.swift
/host/spi-builder-workspace/Sources/RESTClient/_EditingContext.swift:16:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/_EditingContext.swift:17:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
[5/27] Compiling RESTClient URLSessionConfiguration.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLSessionConfiguration.swift:11:8: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
public extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:13:172: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func list<T : Resource & Listable & Decodable>(_ type: T.Type, query: [String : String]? = nil, completionHandler: @escaping ((Result<[T], Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:23:196: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func retrieve<T : Resource & Retrievable & Decodable>(_ type: T.Type, id: String? = nil, query: [String : String]? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:33:144: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Codable>(_ instance: T, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:42:194: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Encodable, R : Resource & Decodable>(_ instance: T, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:54:163: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:63:213: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:75:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:84:216: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:96:150: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable & Decodable>(_ type: T.Type, id: String? = nil, completionHandler: @escaping ((Error?) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:112:185: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable, R : Decodable>(_ type: T.Type, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:15:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:25:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:35:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:36:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:44:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:45:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:56:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:57:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:65:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:66:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:77:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:78:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:86:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:87:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:98:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:99:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:114:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:115:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
[6/27] Compiling RESTClient RESTClient+Async.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLSessionConfiguration.swift:11:8: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
public extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:13:172: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func list<T : Resource & Listable & Decodable>(_ type: T.Type, query: [String : String]? = nil, completionHandler: @escaping ((Result<[T], Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:23:196: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func retrieve<T : Resource & Retrievable & Decodable>(_ type: T.Type, id: String? = nil, query: [String : String]? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:33:144: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Codable>(_ instance: T, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:42:194: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func create<T : Resource & Creatable & Encodable, R : Resource & Decodable>(_ instance: T, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:54:163: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:63:213: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func update<T : Resource & Updatable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:75:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Codable>(_ instance: T, id: String? = nil, completionHandler: @escaping ((Result<T, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:84:216: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func replace<T : Resource & Replaceable & Encodable, R : Resource & Decodable>(_ instance: T, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) throws -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:96:150: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable & Decodable>(_ type: T.Type, id: String? = nil, completionHandler: @escaping ((Error?) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:112:185: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func delete<T : Resource & Deleteable, R : Decodable>(_ type: T.Type, id: String? = nil, responseType: R.Type, completionHandler: @escaping ((Result<R, Error>) -> Void)) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:15:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:25:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:35:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:36:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:44:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: baseURL.appendingPathComponent(T.path))
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:45:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:56:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:57:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:65:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:66:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:77:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:78:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:86:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:87:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:98:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:99:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:114:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Async.swift:115:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
[7/27] Compiling RESTClient RESTClient+DataTask.swift
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:140: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
return session.dataTask(with: request) { [decoders] (data, response, error) in
~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:62: error: cannot infer type of closure parameter 'data' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:68: error: cannot infer type of closure parameter 'response' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:78: error: cannot infer type of closure parameter 'error' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:107:17: error: cannot assign value of type '_' to type 'Result<T, Error>?'
res = r
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:17:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:27:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:37:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:38:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:46:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:47:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:58:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:59:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:67:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:68:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:79:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:80:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:88:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:89:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:100:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:101:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:110:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:111:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
[8/27] Compiling RESTClient RESTClient+Sync.swift
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:69: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:140: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:17:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:95: error: cannot find type 'URLRequest' in scope
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:166: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:40:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func dataTask<T : Decodable & ExpressibleByNilLiteral>(_ type: T.Type, with request: URLRequest, completionHandler: ((Result<T, Error>) -> Void)? = nil) -> URLSessionDataTask {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:80: error: cannot find type 'URLRequest' in scope
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:99:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
open func performSyncDataTask<T : Decodable>(_ type: T.Type, with request: URLRequest) throws -> T? {
^~~~
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
return session.dataTask(with: request) { [decoders] (data, response, error) in
~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:62: error: cannot infer type of closure parameter 'data' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:68: error: cannot infer type of closure parameter 'response' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:45:78: error: cannot infer type of closure parameter 'error' without a type annotation
return session.dataTask(with: request) { [decoders] (data, response, error) in
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+DataTask.swift:107:17: error: cannot assign value of type '_' to type 'Result<T, Error>?'
res = r
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:17:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:27:23: error: cannot find 'URLRequest' in scope
let request = URLRequest(baseURL, pathItems: T.path, id, query: query?.asQueryItems)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:37:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:38:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:46:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:47:27: error: cannot infer contextual base in reference to member 'post'
request.method = .post
~^~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:58:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:59:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:67:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:68:27: error: cannot infer contextual base in reference to member 'patch'
request.method = .patch
~^~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:79:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:80:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:88:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:89:27: error: cannot infer contextual base in reference to member 'put'
request.method = .put
~^~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:100:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:101:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:110:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(baseURL, pathItems: T.path, id)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient+Sync.swift:111:27: error: cannot infer contextual base in reference to member 'delete'
request.method = .delete
~^~~~~~
[9/27] Compiling RESTClient FormURLEncoder.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:13:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:26:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[10/27] Compiling RESTClient JSONEncoder.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:13:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:26:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[11/27] Compiling RESTClient Accept.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:13:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/Accept.swift:26:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[12/27] Compiling RESTClient Dictionary+URLQueryItem.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPMethod.swift:20:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[13/27] Compiling RESTClient EnumCollection.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPMethod.swift:20:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[14/27] Compiling RESTClient HTTPMethod.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPMethod.swift:20:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[15/27] Compiling RESTClient AuthorizationHeader.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[16/27] Compiling RESTClient Codable+DynamicCoder.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[17/27] Compiling RESTClient ContentType.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/AuthorizationHeader.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:14:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/ContentType.swift:27:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
[18/27] Compiling RESTClient RESTClient.swift
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:15:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private(set) var session : URLSession
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:42: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:69: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'restJSONAPI'
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
~^~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:75: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:95: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:48:53: error: type of expression is ambiguous without a type annotation
guard let contentType = request.contentType ?? session.configuration.httpAdditionalHeaders?["Content-Type"] as? ContentType else {
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[19/27] Compiling RESTClient Resource.swift
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:13:14: warning: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
open let baseURL : URL
~~~~ ^
public
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:15:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private(set) var session : URLSession
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:42: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:17:69: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'restJSONAPI'
public init(url: URL, sessionConfig: URLSessionConfiguration = .restJSONAPI) {
~^~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:46:74: error: cannot find type 'URLRequest' in scope
public func setJSONBody<T : Encodable>(_ body: T, for request: inout URLRequest) throws {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:110:36: error: cannot find type 'URLRequest' in scope
func tranform(_ request: inout URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:75: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:19:95: error: 'nil' requires a contextual type
self.session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil)
^
/host/spi-builder-workspace/Sources/RESTClient/RESTClient.swift:48:53: error: type of expression is ambiguous without a type annotation
guard let contentType = request.contentType ?? session.configuration.httpAdditionalHeaders?["Content-Type"] as? ContentType else {
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20/27] Compiling RESTClient HTTPStatus.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPStatus.swift:80:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+CodableBody.swift:11:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+Convenience.swift:10:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[21/27] Compiling RESTClient URLRequest+CodableBody.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPStatus.swift:80:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+CodableBody.swift:11:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+Convenience.swift:10:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[22/27] Compiling RESTClient URLRequest+Convenience.swift
/host/spi-builder-workspace/Sources/RESTClient/Extensions/HTTPStatus.swift:80:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+CodableBody.swift:11:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RESTClient/Extensions/URLRequest+Convenience.swift:10:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
error: fatalError
BUILD FAILURE 5.10 linux