The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Failed to build SwiftCloudant, reference master (3cd2bb), with Swift 6.0 for Linux on 31 Oct 2024 18:50:56 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1

Build Log

    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:67: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:48: error: cannot find type 'URLSessionDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                `- error: cannot find type 'URLSessionDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:68: error: cannot find type 'URLSessionTaskDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:92: error: cannot find type 'URLSessionDataDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                            `- error: cannot find type 'URLSessionDataDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:116: error: cannot find type 'URLSessionStreamDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                                                    `- error: cannot find type 'URLSessionStreamDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:167:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |     // can't call super.init until all properties have been initialised. To get around this we lazily create the
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
    |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
168 |         let config = URLSessionConfiguration.default
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:168:46: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
168 |         let config = URLSessionConfiguration.default
    |                                              `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
170 |         config.httpCookieAcceptPolicy = .onlyFromMainDocumentDomain
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:27: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                           `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:39: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                                       `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:197:20: error: cannot find type 'URLSessionDelegate' in scope
195 |      - parameter configuration: The configuration for this session.
196 |      */
197 |     init(delegate: URLSessionDelegate?, configuration: InterceptableSessionConfiguration) {
    |                    `- error: cannot find type 'URLSessionDelegate' in scope
198 |         self.configuration = configuration
199 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:217:37: error: cannot find type 'URLRequest' in scope
215 |      - returns: A `URLSessionTask` representing the task for the `NSURLRequest`
216 |      */
217 |     internal func dataTask(request: URLRequest, delegate: InterceptableSessionDelegate) -> URLSessionTask {
    |                                     `- error: cannot find type 'URLRequest' in scope
218 |
219 |         // Only request another cookie **if** cookie auth is enabled **and** it is the first request
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:70: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:158: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                                                                              `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:104: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                        `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Operation.swift:22:14: warning: class 'Operation' must restate inherited '@unchecked Sendable' conformance
 20 |  An NSOperation subclass for executing `CouchOperations`
 21 |  */
 22 | public class Operation: Foundation.Operation, HTTPRequestOperation
    |              `- warning: class 'Operation' must restate inherited '@unchecked Sendable' conformance
 23 | {
 24 |
[4/28] Compiling SwiftCloudant PutDocumentOperation.swift
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Operation.swift:22:14: warning: class 'Operation' must restate inherited '@unchecked Sendable' conformance
 20 |  An NSOperation subclass for executing `CouchOperations`
 21 |  */
 22 | public class Operation: Foundation.Operation, HTTPRequestOperation
    |              `- warning: class 'Operation' must restate inherited '@unchecked Sendable' conformance
 23 | {
 24 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:197:20: error: cannot find type 'URLSessionDelegate' in scope
195 |      - parameter configuration: The configuration for this session.
196 |      */
197 |     init(delegate: URLSessionDelegate?, configuration: InterceptableSessionConfiguration) {
    |                    `- error: cannot find type 'URLSessionDelegate' in scope
198 |         self.configuration = configuration
199 |
[5/28] Compiling SwiftCloudant ReadAttachmentOperation.swift
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Operation.swift:22:14: warning: class 'Operation' must restate inherited '@unchecked Sendable' conformance
 20 |  An NSOperation subclass for executing `CouchOperations`
 21 |  */
 22 | public class Operation: Foundation.Operation, HTTPRequestOperation
    |              `- warning: class 'Operation' must restate inherited '@unchecked Sendable' conformance
 23 | {
 24 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:197:20: error: cannot find type 'URLSessionDelegate' in scope
195 |      - parameter configuration: The configuration for this session.
196 |      */
197 |     init(delegate: URLSessionDelegate?, configuration: InterceptableSessionConfiguration) {
    |                    `- error: cannot find type 'URLSessionDelegate' in scope
198 |         self.configuration = configuration
199 |
[6/28] Compiling SwiftCloudant Operation.swift
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Operation.swift:22:14: warning: class 'Operation' must restate inherited '@unchecked Sendable' conformance
 20 |  An NSOperation subclass for executing `CouchOperations`
 21 |  */
 22 | public class Operation: Foundation.Operation, HTTPRequestOperation
    |              `- warning: class 'Operation' must restate inherited '@unchecked Sendable' conformance
 23 | {
 24 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:197:20: error: cannot find type 'URLSessionDelegate' in scope
195 |      - parameter configuration: The configuration for this session.
196 |      */
197 |     init(delegate: URLSessionDelegate?, configuration: InterceptableSessionConfiguration) {
    |                    `- error: cannot find type 'URLSessionDelegate' in scope
198 |         self.configuration = configuration
199 |
[7/28] Compiling SwiftCloudant GetChangesOperation.swift
[8/28] Compiling SwiftCloudant BulkDocs.swift
[9/28] Compiling SwiftCloudant DeleteAttachmentOperation.swift
[10/28] Compiling SwiftCloudant CouchClient.swift
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:197:20: error: cannot find type 'URLSessionDelegate' in scope
195 |      - parameter configuration: The configuration for this session.
196 |      */
197 |     init(delegate: URLSessionDelegate?, configuration: InterceptableSessionConfiguration) {
    |                    `- error: cannot find type 'URLSessionDelegate' in scope
198 |         self.configuration = configuration
199 |
/host/spi-builder-workspace/Source/SwiftCloudant/CouchClient.swift:101:44: error: argument passed to call that takes no arguments
 99 |                                                                      password: password)
100 |
101 |         self.session = InterceptableSession(delegate: nil, configuration: sessionConfiguration)
    |                                            `- error: argument passed to call that takes no arguments
102 |
103 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/CouchClient.swift:101:55: error: 'nil' requires a contextual type
 99 |                                                                      password: password)
100 |
101 |         self.session = InterceptableSession(delegate: nil, configuration: sessionConfiguration)
    |                                                       `- error: 'nil' requires a contextual type
102 |
103 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:102:34: error: cannot find type 'URLRequest' in scope
100 |      Builds the NSURLRequest from the operation in the property `operation`
101 |      */
102 |     func makeRequest() throws -> URLRequest {
    |                                  `- error: cannot find type 'URLRequest' in scope
103 |
104 |         guard let components = NSURLComponents(url: operation.rootURL, resolvingAgainstBaseURL: false)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:123:23: error: cannot find 'URLRequest' in scope
121 |         }
122 |
123 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
124 |         request.cachePolicy = .useProtocolCachePolicy
125 |         request.timeoutInterval = 10.0
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:124:32: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
122 |
123 |         var request = URLRequest(url: url)
124 |         request.cachePolicy = .useProtocolCachePolicy
    |                                `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
125 |         request.timeoutInterval = 10.0
126 |         request.httpMethod = operation.httpMethod
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:48:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 46 |
 47 |     var buffer: Data
 48 |     var response: HTTPURLResponse?
    |                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 49 |     /**
 50 |      Creates an OperationRequestExecutor.
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:67:29: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 65 |     }
 66 |
 67 |     func received(response: HTTPURLResponse) {
    |                             `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 68 |         // Store the response to deliver with the data when the task completes.
 69 |         self.response = response
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:85:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 83 |         if let response = response {
 84 |                 var headers:[String: String] = [:]
 85 |                 for (key, value) in response.allHeaderFields {
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 86 |                     headers["\(key)"] = "\(value)"
 87 |                 }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:88:58: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 86 |                     headers["\(key)"] = "\(value)"
 87 |                 }
 88 |                 httpInfo = HTTPInfo(statusCode: response.statusCode, headers: headers)
    |                                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 89 |         } else {
 90 |             httpInfo = nil
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:217:37: error: cannot find type 'URLRequest' in scope
215 |      - returns: A `URLSessionTask` representing the task for the `NSURLRequest`
216 |      */
217 |     internal func dataTask(request: URLRequest, delegate: InterceptableSessionDelegate) -> URLSessionTask {
    |                                     `- error: cannot find type 'URLRequest' in scope
218 |
219 |         // Only request another cookie **if** cookie auth is enabled **and** it is the first request
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:29:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |      - parameter response: The response received from the server
 28 |     */
 29 |     func received(response:HTTPURLResponse)
    |                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 30 |
 31 |     /**
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:53:18: error: cannot find type 'URLRequest' in scope
 51 |      as session cookie authentication of custom tracking headers.
 52 |      */
 53 |     var request: URLRequest
    |                  `- error: cannot find type 'URLRequest' in scope
 54 |     /**
 55 |      The response that was received from the server. This will be `nil` if the request errored
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:58:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 56 |      or has not yet been made.
 57 |      */
 58 |     let response: HTTPURLResponse?
    |                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 59 |     /**
 60 |      A flag that signals to the HTTP layer that it should retry the request.
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:111:30: error: cannot find type 'URLRequest' in scope
109 |  */
110 | internal class URLSessionTask {
111 |     fileprivate let request: URLRequest
    |                              `- error: cannot find type 'URLRequest' in scope
112 |     fileprivate var inProgressTask: URLSessionDataTask
113 |     fileprivate let session: URLSession
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:112:37: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | internal class URLSessionTask {
111 |     fileprivate let request: URLRequest
112 |     fileprivate var inProgressTask: URLSessionDataTask
    |                                     `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 |     fileprivate let session: URLSession
114 |     fileprivate var remainingRetries: UInt = 10
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:113:30: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 |     fileprivate let request: URLRequest
112 |     fileprivate var inProgressTask: URLSessionDataTask
113 |     fileprivate let session: URLSession
    |                              `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     fileprivate var remainingRetries: UInt = 10
115 |     fileprivate var remainingBackOffRetries: UInt = 3
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:120:31: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
118 |     //This  is for caching before delivering the response to the delegate in the event a 401/403 is
119 |     // encountered.
120 |     fileprivate var response: HTTPURLResponse? = nil
    |                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 |     // Caching of the data before being delivered to the delegate in the event of a 401/403 response.
122 |     fileprivate var data: Data? = nil
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:124:49: error: 'State' is not a member type of type 'Foundation.URLSessionTask' (aka 'AnyObject')
122 |     fileprivate var data: Data? = nil
123 |
124 |     public var state: Foundation.URLSessionTask.State {
    |                                                 `- error: 'State' is not a member type of type 'Foundation.URLSessionTask' (aka 'AnyObject')
125 |         get {
126 |             return inProgressTask.state
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:40: error: cannot find type 'URLRequest' in scope
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                        `- error: cannot find type 'URLRequest' in scope
138 |         self.request = request
139 |         self.session = session
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:67: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:48: error: cannot find type 'URLSessionDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                `- error: cannot find type 'URLSessionDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:68: error: cannot find type 'URLSessionTaskDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:92: error: cannot find type 'URLSessionDataDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                            `- error: cannot find type 'URLSessionDataDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:116: error: cannot find type 'URLSessionStreamDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                                                    `- error: cannot find type 'URLSessionStreamDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:167:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |     // can't call super.init until all properties have been initialised. To get around this we lazily create the
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
    |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
168 |         let config = URLSessionConfiguration.default
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:168:46: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
168 |         let config = URLSessionConfiguration.default
    |                                              `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
170 |         config.httpCookieAcceptPolicy = .onlyFromMainDocumentDomain
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:27: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                           `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:39: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                                       `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:70: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:158: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                                                                              `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:104: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                        `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:148:24: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
146 |      */
147 |     public func resume() {
148 |         inProgressTask.resume()
    |                        `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
149 |     }
150 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:155:24: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
153 |      */
154 |     public func cancel() {
155 |         inProgressTask.cancel()
    |                        `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
156 |     }
157 | }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:188:18: error: argument passed to call that takes no arguments
186 |
187 |     convenience override init() {
188 |         self.init(delegate: nil, configuration: InterceptableSessionConfiguration(shouldBackOff: false))
    |                  `- error: argument passed to call that takes no arguments
189 |
190 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:188:29: error: 'nil' requires a contextual type
186 |
187 |     convenience override init() {
188 |         self.init(delegate: nil, configuration: InterceptableSessionConfiguration(shouldBackOff: false))
    |                             `- error: 'nil' requires a contextual type
189 |
190 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:228:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
226 |
227 |         // create the underlying task.
228 |         let nsTask = self.session.dataTask(with: request)
    |                                   `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         let task = URLSessionTask(session: session, request: request, inProgressTask: nsTask, delegate: delegate)
230 |         task.remainingRetries = configuration.maxRetries
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:240:35: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
240 |         guard let mTask = taskDict[task]
    |                                   `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
241 |         else {
242 |                 return
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:254:34: error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
252 |         // to our delegate queue because it is a concurrent queue, so blocking for a cookie request
253 |         // will not result in a blocked client.
254 |         self.delegateQueue.async {
    |                                  `- error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
255 |
256 |             // we have a caached response and data, we need to inspect the data to see if we need to renew
Dispatch.DispatchQueue:62:17: note: 'async(execute:)' declared here
60 |     public func sync(execute workItem: DispatchWorkItem)
61 |     @available(macOS 10.10, iOS 8.0, *)
62 |     public func async(execute workItem: DispatchWorkItem)
   |                 `- note: 'async(execute:)' declared here
63 |     @available(macOS 10.10, iOS 8.0, *)
64 |     public func async(group: DispatchGroup, execute workItem: DispatchWorkItem)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:293:34: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
293 |         guard let task = taskDict[dataTask]
    |                                  `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
294 |         else {
295 |             // perhaps we should also cancel the task if we fail to look it up.
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:34: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                  `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
315 |             else {
316 |                 completionHandler(.allow)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:70: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                                                      `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
315 |             else {
316 |                 completionHandler(.allow)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:74: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                                                          `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
315 |             else {
316 |                 completionHandler(.allow)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:316:36: error: cannot infer contextual base in reference to member 'allow'
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
315 |             else {
316 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
317 |                 return
318 |         }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:322:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
320 |         if task.remainingRetries > 0 {
321 |
322 |             if response.statusCode == 429 && self.configuration.shouldBackOff && task.remainingBackOffRetries > 0 {
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
323 |                 task.remainingBackOffRetries -= 1
324 |                 task.remainingRetries -= 1
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:337:31: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
335 |                 // backing off cancel the current request and then make the next one,
336 |                 // retry the request.
337 |                 self.taskDict.removeValue(forKey: task.inProgressTask)
    |                               `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
338 |                 task.inProgressTask = self.session.dataTask(with: task.request)
339 |                 self.taskDict[task.inProgressTask] = task
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:338:52: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
336 |                 // retry the request.
337 |                 self.taskDict.removeValue(forKey: task.inProgressTask)
338 |                 task.inProgressTask = self.session.dataTask(with: task.request)
    |                                                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
339 |                 self.taskDict[task.inProgressTask] = task
340 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:341:36: error: cannot infer contextual base in reference to member 'cancel'
339 |                 self.taskDict[task.inProgressTask] = task
340 |
341 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
342 |
343 |                 self.delegateQueue.asyncAfter(wallDeadline: deadline) {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:347:33: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
345 |                 }
346 |
347 |             } else if  response.statusCode == 401 || response.statusCode == 403 {
    |                                 `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
348 |                 // response delivery needs to be delayed.
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:347:63: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
345 |                 }
346 |
347 |             } else if  response.statusCode == 401 || response.statusCode == 403 {
    |                                                               `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
348 |                 // response delivery needs to be delayed.
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:351:36: error: cannot infer contextual base in reference to member 'allow'
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
350 |                 task.response = response
351 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
352 |             } else {
353 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:356:36: error: cannot infer contextual base in reference to member 'allow'
354 |                 // request was successful, URL Session will save cookies we can send the response straight through
355 |                 task.delegate.received(response: response)
356 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
357 |             }
358 |         } else {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:361:32: error: cannot infer contextual base in reference to member 'allow'
359 |             //URL Session will save cookies we can send the response straight through
360 |             task.delegate.received(response: response)
361 |             completionHandler(.allow)
    |                                `- error: cannot infer contextual base in reference to member 'allow'
362 |         }
363 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:378:23: error: cannot find 'URLRequest' in scope
376 |
377 |
378 |         var request = URLRequest(url: components.url!)
    |                       `- error: cannot find 'URLRequest' in scope
379 |         request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
380 |         request.httpMethod = "POST"
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:386:33: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
384 |         let semaphore = DispatchSemaphore(value: 0)
385 |
386 |         let task = self.session.dataTask(with: request, completionHandler: { (data1, response, error) in
    |                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
387 |
388 |             //defer the semaphore.
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:398:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
396 |             }
397 |
398 |             if response.statusCode / 100 == 2{
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
399 |
400 |                 do {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:443:26: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
441 |     deinit {
442 |         if !isFirstRequest {
443 |             self.session.finishTasksAndInvalidate()
    |                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
444 |         }
445 |     }
[11/28] Compiling SwiftCloudant RequestBuilder.swift
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:197:20: error: cannot find type 'URLSessionDelegate' in scope
195 |      - parameter configuration: The configuration for this session.
196 |      */
197 |     init(delegate: URLSessionDelegate?, configuration: InterceptableSessionConfiguration) {
    |                    `- error: cannot find type 'URLSessionDelegate' in scope
198 |         self.configuration = configuration
199 |
/host/spi-builder-workspace/Source/SwiftCloudant/CouchClient.swift:101:44: error: argument passed to call that takes no arguments
 99 |                                                                      password: password)
100 |
101 |         self.session = InterceptableSession(delegate: nil, configuration: sessionConfiguration)
    |                                            `- error: argument passed to call that takes no arguments
102 |
103 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/CouchClient.swift:101:55: error: 'nil' requires a contextual type
 99 |                                                                      password: password)
100 |
101 |         self.session = InterceptableSession(delegate: nil, configuration: sessionConfiguration)
    |                                                       `- error: 'nil' requires a contextual type
102 |
103 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:102:34: error: cannot find type 'URLRequest' in scope
100 |      Builds the NSURLRequest from the operation in the property `operation`
101 |      */
102 |     func makeRequest() throws -> URLRequest {
    |                                  `- error: cannot find type 'URLRequest' in scope
103 |
104 |         guard let components = NSURLComponents(url: operation.rootURL, resolvingAgainstBaseURL: false)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:123:23: error: cannot find 'URLRequest' in scope
121 |         }
122 |
123 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
124 |         request.cachePolicy = .useProtocolCachePolicy
125 |         request.timeoutInterval = 10.0
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:124:32: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
122 |
123 |         var request = URLRequest(url: url)
124 |         request.cachePolicy = .useProtocolCachePolicy
    |                                `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
125 |         request.timeoutInterval = 10.0
126 |         request.httpMethod = operation.httpMethod
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:48:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 46 |
 47 |     var buffer: Data
 48 |     var response: HTTPURLResponse?
    |                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 49 |     /**
 50 |      Creates an OperationRequestExecutor.
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:67:29: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 65 |     }
 66 |
 67 |     func received(response: HTTPURLResponse) {
    |                             `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 68 |         // Store the response to deliver with the data when the task completes.
 69 |         self.response = response
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:85:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 83 |         if let response = response {
 84 |                 var headers:[String: String] = [:]
 85 |                 for (key, value) in response.allHeaderFields {
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 86 |                     headers["\(key)"] = "\(value)"
 87 |                 }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:88:58: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 86 |                     headers["\(key)"] = "\(value)"
 87 |                 }
 88 |                 httpInfo = HTTPInfo(statusCode: response.statusCode, headers: headers)
    |                                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 89 |         } else {
 90 |             httpInfo = nil
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:217:37: error: cannot find type 'URLRequest' in scope
215 |      - returns: A `URLSessionTask` representing the task for the `NSURLRequest`
216 |      */
217 |     internal func dataTask(request: URLRequest, delegate: InterceptableSessionDelegate) -> URLSessionTask {
    |                                     `- error: cannot find type 'URLRequest' in scope
218 |
219 |         // Only request another cookie **if** cookie auth is enabled **and** it is the first request
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:29:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |      - parameter response: The response received from the server
 28 |     */
 29 |     func received(response:HTTPURLResponse)
    |                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 30 |
 31 |     /**
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:53:18: error: cannot find type 'URLRequest' in scope
 51 |      as session cookie authentication of custom tracking headers.
 52 |      */
 53 |     var request: URLRequest
    |                  `- error: cannot find type 'URLRequest' in scope
 54 |     /**
 55 |      The response that was received from the server. This will be `nil` if the request errored
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:58:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 56 |      or has not yet been made.
 57 |      */
 58 |     let response: HTTPURLResponse?
    |                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 59 |     /**
 60 |      A flag that signals to the HTTP layer that it should retry the request.
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:111:30: error: cannot find type 'URLRequest' in scope
109 |  */
110 | internal class URLSessionTask {
111 |     fileprivate let request: URLRequest
    |                              `- error: cannot find type 'URLRequest' in scope
112 |     fileprivate var inProgressTask: URLSessionDataTask
113 |     fileprivate let session: URLSession
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:112:37: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | internal class URLSessionTask {
111 |     fileprivate let request: URLRequest
112 |     fileprivate var inProgressTask: URLSessionDataTask
    |                                     `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 |     fileprivate let session: URLSession
114 |     fileprivate var remainingRetries: UInt = 10
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:113:30: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 |     fileprivate let request: URLRequest
112 |     fileprivate var inProgressTask: URLSessionDataTask
113 |     fileprivate let session: URLSession
    |                              `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     fileprivate var remainingRetries: UInt = 10
115 |     fileprivate var remainingBackOffRetries: UInt = 3
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:120:31: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
118 |     //This  is for caching before delivering the response to the delegate in the event a 401/403 is
119 |     // encountered.
120 |     fileprivate var response: HTTPURLResponse? = nil
    |                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 |     // Caching of the data before being delivered to the delegate in the event of a 401/403 response.
122 |     fileprivate var data: Data? = nil
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:124:49: error: 'State' is not a member type of type 'Foundation.URLSessionTask' (aka 'AnyObject')
122 |     fileprivate var data: Data? = nil
123 |
124 |     public var state: Foundation.URLSessionTask.State {
    |                                                 `- error: 'State' is not a member type of type 'Foundation.URLSessionTask' (aka 'AnyObject')
125 |         get {
126 |             return inProgressTask.state
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:40: error: cannot find type 'URLRequest' in scope
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                        `- error: cannot find type 'URLRequest' in scope
138 |         self.request = request
139 |         self.session = session
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:67: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:48: error: cannot find type 'URLSessionDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                `- error: cannot find type 'URLSessionDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:68: error: cannot find type 'URLSessionTaskDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:92: error: cannot find type 'URLSessionDataDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                            `- error: cannot find type 'URLSessionDataDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:116: error: cannot find type 'URLSessionStreamDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                                                    `- error: cannot find type 'URLSessionStreamDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:167:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |     // can't call super.init until all properties have been initialised. To get around this we lazily create the
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
    |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
168 |         let config = URLSessionConfiguration.default
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:168:46: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
168 |         let config = URLSessionConfiguration.default
    |                                              `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
170 |         config.httpCookieAcceptPolicy = .onlyFromMainDocumentDomain
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:27: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                           `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:39: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                                       `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:70: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:158: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                                                                              `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:104: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                        `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:148:24: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
146 |      */
147 |     public func resume() {
148 |         inProgressTask.resume()
    |                        `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
149 |     }
150 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:155:24: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
153 |      */
154 |     public func cancel() {
155 |         inProgressTask.cancel()
    |                        `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
156 |     }
157 | }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:188:18: error: argument passed to call that takes no arguments
186 |
187 |     convenience override init() {
188 |         self.init(delegate: nil, configuration: InterceptableSessionConfiguration(shouldBackOff: false))
    |                  `- error: argument passed to call that takes no arguments
189 |
190 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:188:29: error: 'nil' requires a contextual type
186 |
187 |     convenience override init() {
188 |         self.init(delegate: nil, configuration: InterceptableSessionConfiguration(shouldBackOff: false))
    |                             `- error: 'nil' requires a contextual type
189 |
190 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:228:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
226 |
227 |         // create the underlying task.
228 |         let nsTask = self.session.dataTask(with: request)
    |                                   `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         let task = URLSessionTask(session: session, request: request, inProgressTask: nsTask, delegate: delegate)
230 |         task.remainingRetries = configuration.maxRetries
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:240:35: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
240 |         guard let mTask = taskDict[task]
    |                                   `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
241 |         else {
242 |                 return
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:254:34: error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
252 |         // to our delegate queue because it is a concurrent queue, so blocking for a cookie request
253 |         // will not result in a blocked client.
254 |         self.delegateQueue.async {
    |                                  `- error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
255 |
256 |             // we have a caached response and data, we need to inspect the data to see if we need to renew
Dispatch.DispatchQueue:62:17: note: 'async(execute:)' declared here
60 |     public func sync(execute workItem: DispatchWorkItem)
61 |     @available(macOS 10.10, iOS 8.0, *)
62 |     public func async(execute workItem: DispatchWorkItem)
   |                 `- note: 'async(execute:)' declared here
63 |     @available(macOS 10.10, iOS 8.0, *)
64 |     public func async(group: DispatchGroup, execute workItem: DispatchWorkItem)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:293:34: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
293 |         guard let task = taskDict[dataTask]
    |                                  `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
294 |         else {
295 |             // perhaps we should also cancel the task if we fail to look it up.
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:34: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                  `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
315 |             else {
316 |                 completionHandler(.allow)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:70: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                                                      `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
315 |             else {
316 |                 completionHandler(.allow)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:74: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                                                          `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
315 |             else {
316 |                 completionHandler(.allow)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:316:36: error: cannot infer contextual base in reference to member 'allow'
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
315 |             else {
316 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
317 |                 return
318 |         }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:322:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
320 |         if task.remainingRetries > 0 {
321 |
322 |             if response.statusCode == 429 && self.configuration.shouldBackOff && task.remainingBackOffRetries > 0 {
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
323 |                 task.remainingBackOffRetries -= 1
324 |                 task.remainingRetries -= 1
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:337:31: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
335 |                 // backing off cancel the current request and then make the next one,
336 |                 // retry the request.
337 |                 self.taskDict.removeValue(forKey: task.inProgressTask)
    |                               `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
338 |                 task.inProgressTask = self.session.dataTask(with: task.request)
339 |                 self.taskDict[task.inProgressTask] = task
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:338:52: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
336 |                 // retry the request.
337 |                 self.taskDict.removeValue(forKey: task.inProgressTask)
338 |                 task.inProgressTask = self.session.dataTask(with: task.request)
    |                                                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
339 |                 self.taskDict[task.inProgressTask] = task
340 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:341:36: error: cannot infer contextual base in reference to member 'cancel'
339 |                 self.taskDict[task.inProgressTask] = task
340 |
341 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
342 |
343 |                 self.delegateQueue.asyncAfter(wallDeadline: deadline) {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:347:33: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
345 |                 }
346 |
347 |             } else if  response.statusCode == 401 || response.statusCode == 403 {
    |                                 `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
348 |                 // response delivery needs to be delayed.
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:347:63: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
345 |                 }
346 |
347 |             } else if  response.statusCode == 401 || response.statusCode == 403 {
    |                                                               `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
348 |                 // response delivery needs to be delayed.
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:351:36: error: cannot infer contextual base in reference to member 'allow'
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
350 |                 task.response = response
351 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
352 |             } else {
353 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:356:36: error: cannot infer contextual base in reference to member 'allow'
354 |                 // request was successful, URL Session will save cookies we can send the response straight through
355 |                 task.delegate.received(response: response)
356 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
357 |             }
358 |         } else {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:361:32: error: cannot infer contextual base in reference to member 'allow'
359 |             //URL Session will save cookies we can send the response straight through
360 |             task.delegate.received(response: response)
361 |             completionHandler(.allow)
    |                                `- error: cannot infer contextual base in reference to member 'allow'
362 |         }
363 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:378:23: error: cannot find 'URLRequest' in scope
376 |
377 |
378 |         var request = URLRequest(url: components.url!)
    |                       `- error: cannot find 'URLRequest' in scope
379 |         request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
380 |         request.httpMethod = "POST"
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:386:33: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
384 |         let semaphore = DispatchSemaphore(value: 0)
385 |
386 |         let task = self.session.dataTask(with: request, completionHandler: { (data1, response, error) in
    |                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
387 |
388 |             //defer the semaphore.
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:398:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
396 |             }
397 |
398 |             if response.statusCode / 100 == 2{
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
399 |
400 |                 do {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:443:26: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
441 |     deinit {
442 |         if !isFirstRequest {
443 |             self.session.finishTasksAndInvalidate()
    |                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
444 |         }
445 |     }
[12/28] Compiling SwiftCloudant RequestExecutor.swift
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:197:20: error: cannot find type 'URLSessionDelegate' in scope
195 |      - parameter configuration: The configuration for this session.
196 |      */
197 |     init(delegate: URLSessionDelegate?, configuration: InterceptableSessionConfiguration) {
    |                    `- error: cannot find type 'URLSessionDelegate' in scope
198 |         self.configuration = configuration
199 |
/host/spi-builder-workspace/Source/SwiftCloudant/CouchClient.swift:101:44: error: argument passed to call that takes no arguments
 99 |                                                                      password: password)
100 |
101 |         self.session = InterceptableSession(delegate: nil, configuration: sessionConfiguration)
    |                                            `- error: argument passed to call that takes no arguments
102 |
103 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/CouchClient.swift:101:55: error: 'nil' requires a contextual type
 99 |                                                                      password: password)
100 |
101 |         self.session = InterceptableSession(delegate: nil, configuration: sessionConfiguration)
    |                                                       `- error: 'nil' requires a contextual type
102 |
103 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:102:34: error: cannot find type 'URLRequest' in scope
100 |      Builds the NSURLRequest from the operation in the property `operation`
101 |      */
102 |     func makeRequest() throws -> URLRequest {
    |                                  `- error: cannot find type 'URLRequest' in scope
103 |
104 |         guard let components = NSURLComponents(url: operation.rootURL, resolvingAgainstBaseURL: false)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:123:23: error: cannot find 'URLRequest' in scope
121 |         }
122 |
123 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
124 |         request.cachePolicy = .useProtocolCachePolicy
125 |         request.timeoutInterval = 10.0
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:124:32: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
122 |
123 |         var request = URLRequest(url: url)
124 |         request.cachePolicy = .useProtocolCachePolicy
    |                                `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
125 |         request.timeoutInterval = 10.0
126 |         request.httpMethod = operation.httpMethod
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:48:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 46 |
 47 |     var buffer: Data
 48 |     var response: HTTPURLResponse?
    |                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 49 |     /**
 50 |      Creates an OperationRequestExecutor.
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:67:29: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 65 |     }
 66 |
 67 |     func received(response: HTTPURLResponse) {
    |                             `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 68 |         // Store the response to deliver with the data when the task completes.
 69 |         self.response = response
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:85:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 83 |         if let response = response {
 84 |                 var headers:[String: String] = [:]
 85 |                 for (key, value) in response.allHeaderFields {
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 86 |                     headers["\(key)"] = "\(value)"
 87 |                 }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:88:58: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 86 |                     headers["\(key)"] = "\(value)"
 87 |                 }
 88 |                 httpInfo = HTTPInfo(statusCode: response.statusCode, headers: headers)
    |                                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 89 |         } else {
 90 |             httpInfo = nil
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:217:37: error: cannot find type 'URLRequest' in scope
215 |      - returns: A `URLSessionTask` representing the task for the `NSURLRequest`
216 |      */
217 |     internal func dataTask(request: URLRequest, delegate: InterceptableSessionDelegate) -> URLSessionTask {
    |                                     `- error: cannot find type 'URLRequest' in scope
218 |
219 |         // Only request another cookie **if** cookie auth is enabled **and** it is the first request
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:29:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |      - parameter response: The response received from the server
 28 |     */
 29 |     func received(response:HTTPURLResponse)
    |                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 30 |
 31 |     /**
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:53:18: error: cannot find type 'URLRequest' in scope
 51 |      as session cookie authentication of custom tracking headers.
 52 |      */
 53 |     var request: URLRequest
    |                  `- error: cannot find type 'URLRequest' in scope
 54 |     /**
 55 |      The response that was received from the server. This will be `nil` if the request errored
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:58:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 56 |      or has not yet been made.
 57 |      */
 58 |     let response: HTTPURLResponse?
    |                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 59 |     /**
 60 |      A flag that signals to the HTTP layer that it should retry the request.
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:111:30: error: cannot find type 'URLRequest' in scope
109 |  */
110 | internal class URLSessionTask {
111 |     fileprivate let request: URLRequest
    |                              `- error: cannot find type 'URLRequest' in scope
112 |     fileprivate var inProgressTask: URLSessionDataTask
113 |     fileprivate let session: URLSession
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:112:37: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | internal class URLSessionTask {
111 |     fileprivate let request: URLRequest
112 |     fileprivate var inProgressTask: URLSessionDataTask
    |                                     `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 |     fileprivate let session: URLSession
114 |     fileprivate var remainingRetries: UInt = 10
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:113:30: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 |     fileprivate let request: URLRequest
112 |     fileprivate var inProgressTask: URLSessionDataTask
113 |     fileprivate let session: URLSession
    |                              `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     fileprivate var remainingRetries: UInt = 10
115 |     fileprivate var remainingBackOffRetries: UInt = 3
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:120:31: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
118 |     //This  is for caching before delivering the response to the delegate in the event a 401/403 is
119 |     // encountered.
120 |     fileprivate var response: HTTPURLResponse? = nil
    |                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 |     // Caching of the data before being delivered to the delegate in the event of a 401/403 response.
122 |     fileprivate var data: Data? = nil
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:124:49: error: 'State' is not a member type of type 'Foundation.URLSessionTask' (aka 'AnyObject')
122 |     fileprivate var data: Data? = nil
123 |
124 |     public var state: Foundation.URLSessionTask.State {
    |                                                 `- error: 'State' is not a member type of type 'Foundation.URLSessionTask' (aka 'AnyObject')
125 |         get {
126 |             return inProgressTask.state
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:40: error: cannot find type 'URLRequest' in scope
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                        `- error: cannot find type 'URLRequest' in scope
138 |         self.request = request
139 |         self.session = session
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:67: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:48: error: cannot find type 'URLSessionDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                `- error: cannot find type 'URLSessionDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:68: error: cannot find type 'URLSessionTaskDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:92: error: cannot find type 'URLSessionDataDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                            `- error: cannot find type 'URLSessionDataDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:116: error: cannot find type 'URLSessionStreamDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                                                    `- error: cannot find type 'URLSessionStreamDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:167:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |     // can't call super.init until all properties have been initialised. To get around this we lazily create the
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
    |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
168 |         let config = URLSessionConfiguration.default
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:168:46: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
168 |         let config = URLSessionConfiguration.default
    |                                              `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
170 |         config.httpCookieAcceptPolicy = .onlyFromMainDocumentDomain
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:27: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                           `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:39: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                                       `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:70: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:158: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                                                                              `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:104: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                        `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:148:24: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
146 |      */
147 |     public func resume() {
148 |         inProgressTask.resume()
    |                        `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
149 |     }
150 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:155:24: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
153 |      */
154 |     public func cancel() {
155 |         inProgressTask.cancel()
    |                        `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
156 |     }
157 | }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:188:18: error: argument passed to call that takes no arguments
186 |
187 |     convenience override init() {
188 |         self.init(delegate: nil, configuration: InterceptableSessionConfiguration(shouldBackOff: false))
    |                  `- error: argument passed to call that takes no arguments
189 |
190 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:188:29: error: 'nil' requires a contextual type
186 |
187 |     convenience override init() {
188 |         self.init(delegate: nil, configuration: InterceptableSessionConfiguration(shouldBackOff: false))
    |                             `- error: 'nil' requires a contextual type
189 |
190 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:228:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
226 |
227 |         // create the underlying task.
228 |         let nsTask = self.session.dataTask(with: request)
    |                                   `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         let task = URLSessionTask(session: session, request: request, inProgressTask: nsTask, delegate: delegate)
230 |         task.remainingRetries = configuration.maxRetries
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:240:35: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
240 |         guard let mTask = taskDict[task]
    |                                   `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
241 |         else {
242 |                 return
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:254:34: error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
252 |         // to our delegate queue because it is a concurrent queue, so blocking for a cookie request
253 |         // will not result in a blocked client.
254 |         self.delegateQueue.async {
    |                                  `- error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
255 |
256 |             // we have a caached response and data, we need to inspect the data to see if we need to renew
Dispatch.DispatchQueue:62:17: note: 'async(execute:)' declared here
60 |     public func sync(execute workItem: DispatchWorkItem)
61 |     @available(macOS 10.10, iOS 8.0, *)
62 |     public func async(execute workItem: DispatchWorkItem)
   |                 `- note: 'async(execute:)' declared here
63 |     @available(macOS 10.10, iOS 8.0, *)
64 |     public func async(group: DispatchGroup, execute workItem: DispatchWorkItem)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:293:34: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
293 |         guard let task = taskDict[dataTask]
    |                                  `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
294 |         else {
295 |             // perhaps we should also cancel the task if we fail to look it up.
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:34: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                  `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
315 |             else {
316 |                 completionHandler(.allow)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:70: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                                                      `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
315 |             else {
316 |                 completionHandler(.allow)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:74: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                                                          `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
315 |             else {
316 |                 completionHandler(.allow)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:316:36: error: cannot infer contextual base in reference to member 'allow'
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
315 |             else {
316 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
317 |                 return
318 |         }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:322:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
320 |         if task.remainingRetries > 0 {
321 |
322 |             if response.statusCode == 429 && self.configuration.shouldBackOff && task.remainingBackOffRetries > 0 {
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
323 |                 task.remainingBackOffRetries -= 1
324 |                 task.remainingRetries -= 1
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:337:31: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
335 |                 // backing off cancel the current request and then make the next one,
336 |                 // retry the request.
337 |                 self.taskDict.removeValue(forKey: task.inProgressTask)
    |                               `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
338 |                 task.inProgressTask = self.session.dataTask(with: task.request)
339 |                 self.taskDict[task.inProgressTask] = task
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:338:52: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
336 |                 // retry the request.
337 |                 self.taskDict.removeValue(forKey: task.inProgressTask)
338 |                 task.inProgressTask = self.session.dataTask(with: task.request)
    |                                                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
339 |                 self.taskDict[task.inProgressTask] = task
340 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:341:36: error: cannot infer contextual base in reference to member 'cancel'
339 |                 self.taskDict[task.inProgressTask] = task
340 |
341 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
342 |
343 |                 self.delegateQueue.asyncAfter(wallDeadline: deadline) {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:347:33: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
345 |                 }
346 |
347 |             } else if  response.statusCode == 401 || response.statusCode == 403 {
    |                                 `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
348 |                 // response delivery needs to be delayed.
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:347:63: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
345 |                 }
346 |
347 |             } else if  response.statusCode == 401 || response.statusCode == 403 {
    |                                                               `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
348 |                 // response delivery needs to be delayed.
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:351:36: error: cannot infer contextual base in reference to member 'allow'
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
350 |                 task.response = response
351 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
352 |             } else {
353 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:356:36: error: cannot infer contextual base in reference to member 'allow'
354 |                 // request was successful, URL Session will save cookies we can send the response straight through
355 |                 task.delegate.received(response: response)
356 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
357 |             }
358 |         } else {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:361:32: error: cannot infer contextual base in reference to member 'allow'
359 |             //URL Session will save cookies we can send the response straight through
360 |             task.delegate.received(response: response)
361 |             completionHandler(.allow)
    |                                `- error: cannot infer contextual base in reference to member 'allow'
362 |         }
363 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:378:23: error: cannot find 'URLRequest' in scope
376 |
377 |
378 |         var request = URLRequest(url: components.url!)
    |                       `- error: cannot find 'URLRequest' in scope
379 |         request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
380 |         request.httpMethod = "POST"
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:386:33: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
384 |         let semaphore = DispatchSemaphore(value: 0)
385 |
386 |         let task = self.session.dataTask(with: request, completionHandler: { (data1, response, error) in
    |                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
387 |
388 |             //defer the semaphore.
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:398:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
396 |             }
397 |
398 |             if response.statusCode / 100 == 2{
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
399 |
400 |                 do {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:443:26: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
441 |     deinit {
442 |         if !isFirstRequest {
443 |             self.session.finishTasksAndInvalidate()
    |                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
444 |         }
445 |     }
[13/28] Compiling SwiftCloudant URLSession.swift
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:197:20: error: cannot find type 'URLSessionDelegate' in scope
195 |      - parameter configuration: The configuration for this session.
196 |      */
197 |     init(delegate: URLSessionDelegate?, configuration: InterceptableSessionConfiguration) {
    |                    `- error: cannot find type 'URLSessionDelegate' in scope
198 |         self.configuration = configuration
199 |
/host/spi-builder-workspace/Source/SwiftCloudant/CouchClient.swift:101:44: error: argument passed to call that takes no arguments
 99 |                                                                      password: password)
100 |
101 |         self.session = InterceptableSession(delegate: nil, configuration: sessionConfiguration)
    |                                            `- error: argument passed to call that takes no arguments
102 |
103 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/CouchClient.swift:101:55: error: 'nil' requires a contextual type
 99 |                                                                      password: password)
100 |
101 |         self.session = InterceptableSession(delegate: nil, configuration: sessionConfiguration)
    |                                                       `- error: 'nil' requires a contextual type
102 |
103 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:102:34: error: cannot find type 'URLRequest' in scope
100 |      Builds the NSURLRequest from the operation in the property `operation`
101 |      */
102 |     func makeRequest() throws -> URLRequest {
    |                                  `- error: cannot find type 'URLRequest' in scope
103 |
104 |         guard let components = NSURLComponents(url: operation.rootURL, resolvingAgainstBaseURL: false)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:123:23: error: cannot find 'URLRequest' in scope
121 |         }
122 |
123 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
124 |         request.cachePolicy = .useProtocolCachePolicy
125 |         request.timeoutInterval = 10.0
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestBuilder.swift:124:32: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
122 |
123 |         var request = URLRequest(url: url)
124 |         request.cachePolicy = .useProtocolCachePolicy
    |                                `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
125 |         request.timeoutInterval = 10.0
126 |         request.httpMethod = operation.httpMethod
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:48:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 46 |
 47 |     var buffer: Data
 48 |     var response: HTTPURLResponse?
    |                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 49 |     /**
 50 |      Creates an OperationRequestExecutor.
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:67:29: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 65 |     }
 66 |
 67 |     func received(response: HTTPURLResponse) {
    |                             `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 68 |         // Store the response to deliver with the data when the task completes.
 69 |         self.response = response
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:85:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 83 |         if let response = response {
 84 |                 var headers:[String: String] = [:]
 85 |                 for (key, value) in response.allHeaderFields {
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
 86 |                     headers["\(key)"] = "\(value)"
 87 |                 }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/RequestExecutor.swift:88:58: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 86 |                     headers["\(key)"] = "\(value)"
 87 |                 }
 88 |                 httpInfo = HTTPInfo(statusCode: response.statusCode, headers: headers)
    |                                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 89 |         } else {
 90 |             httpInfo = nil
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:217:37: error: cannot find type 'URLRequest' in scope
215 |      - returns: A `URLSessionTask` representing the task for the `NSURLRequest`
216 |      */
217 |     internal func dataTask(request: URLRequest, delegate: InterceptableSessionDelegate) -> URLSessionTask {
    |                                     `- error: cannot find type 'URLRequest' in scope
218 |
219 |         // Only request another cookie **if** cookie auth is enabled **and** it is the first request
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:29:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |      - parameter response: The response received from the server
 28 |     */
 29 |     func received(response:HTTPURLResponse)
    |                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 30 |
 31 |     /**
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:53:18: error: cannot find type 'URLRequest' in scope
 51 |      as session cookie authentication of custom tracking headers.
 52 |      */
 53 |     var request: URLRequest
    |                  `- error: cannot find type 'URLRequest' in scope
 54 |     /**
 55 |      The response that was received from the server. This will be `nil` if the request errored
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:58:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 56 |      or has not yet been made.
 57 |      */
 58 |     let response: HTTPURLResponse?
    |                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 59 |     /**
 60 |      A flag that signals to the HTTP layer that it should retry the request.
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:111:30: error: cannot find type 'URLRequest' in scope
109 |  */
110 | internal class URLSessionTask {
111 |     fileprivate let request: URLRequest
    |                              `- error: cannot find type 'URLRequest' in scope
112 |     fileprivate var inProgressTask: URLSessionDataTask
113 |     fileprivate let session: URLSession
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:112:37: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | internal class URLSessionTask {
111 |     fileprivate let request: URLRequest
112 |     fileprivate var inProgressTask: URLSessionDataTask
    |                                     `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 |     fileprivate let session: URLSession
114 |     fileprivate var remainingRetries: UInt = 10
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:113:30: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 |     fileprivate let request: URLRequest
112 |     fileprivate var inProgressTask: URLSessionDataTask
113 |     fileprivate let session: URLSession
    |                              `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     fileprivate var remainingRetries: UInt = 10
115 |     fileprivate var remainingBackOffRetries: UInt = 3
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:120:31: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
118 |     //This  is for caching before delivering the response to the delegate in the event a 401/403 is
119 |     // encountered.
120 |     fileprivate var response: HTTPURLResponse? = nil
    |                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 |     // Caching of the data before being delivered to the delegate in the event of a 401/403 response.
122 |     fileprivate var data: Data? = nil
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:124:49: error: 'State' is not a member type of type 'Foundation.URLSessionTask' (aka 'AnyObject')
122 |     fileprivate var data: Data? = nil
123 |
124 |     public var state: Foundation.URLSessionTask.State {
    |                                                 `- error: 'State' is not a member type of type 'Foundation.URLSessionTask' (aka 'AnyObject')
125 |         get {
126 |             return inProgressTask.state
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:40: error: cannot find type 'URLRequest' in scope
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                        `- error: cannot find type 'URLRequest' in scope
138 |         self.request = request
139 |         self.session = session
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:137:67: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 |      - parameter delegate: The delegate for this task.
136 |      */
137 |     init(session: URLSession, request: URLRequest, inProgressTask:URLSessionDataTask, delegate: InterceptableSessionDelegate) {
    |                                                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 |         self.request = request
139 |         self.session = session
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:48: error: cannot find type 'URLSessionDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                `- error: cannot find type 'URLSessionDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:68: error: cannot find type 'URLSessionTaskDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:92: error: cannot find type 'URLSessionDataDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                            `- error: cannot find type 'URLSessionDataDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:162:116: error: cannot find type 'URLSessionStreamDelegate' in scope
160 |  A class to create `URLSessionTask`
161 |  */
162 | internal class InterceptableSession: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
    |                                                                                                                    `- error: cannot find type 'URLSessionStreamDelegate' in scope
163 |
164 |     // This is lazy because of swift init rules. We can't use self for the delegate until super.init is called, but we
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:167:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |     // can't call super.init until all properties have been initialised. To get around this we lazily create the
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
    |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
168 |         let config = URLSessionConfiguration.default
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:168:46: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
166 |     // URLSession instance when it is required.
167 |     internal lazy var session: URLSession = { () -> URLSession in
168 |         let config = URLSessionConfiguration.default
    |                                              `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
169 |         config.httpAdditionalHeaders = ["User-Agent" as AnyHashable: InterceptableSession.userAgent()]
170 |         config.httpCookieAcceptPolicy = .onlyFromMainDocumentDomain
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:27: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                           `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:175:39: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |         return URLSession(configuration: config, delegate: self, delegateQueue: nil) }()
174 |
175 |     private var taskDict: [Foundation.URLSessionTask: URLSessionTask] = [:]
    |                                       `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |
177 |     private let delegateQueue = DispatchQueue(label: "com.cloudant.swift.interceptable.session.delegate", attributes: .concurrent)
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:239:70: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
237 |
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
    |                                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |         guard let mTask = taskDict[task]
241 |         else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:292:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     }
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
293 |         guard let task = taskDict[dataTask]
294 |         else {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:158: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                                                                              `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:63: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                               `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:312:104: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
310 |     }
311 |
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
    |                                                                                                        `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:148:24: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
146 |      */
147 |     public func resume() {
148 |         inProgressTask.resume()
    |                        `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
149 |     }
150 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:155:24: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
153 |      */
154 |     public func cancel() {
155 |         inProgressTask.cancel()
    |                        `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
156 |     }
157 | }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:188:18: error: argument passed to call that takes no arguments
186 |
187 |     convenience override init() {
188 |         self.init(delegate: nil, configuration: InterceptableSessionConfiguration(shouldBackOff: false))
    |                  `- error: argument passed to call that takes no arguments
189 |
190 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:188:29: error: 'nil' requires a contextual type
186 |
187 |     convenience override init() {
188 |         self.init(delegate: nil, configuration: InterceptableSessionConfiguration(shouldBackOff: false))
    |                             `- error: 'nil' requires a contextual type
189 |
190 |     }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:228:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
226 |
227 |         // create the underlying task.
228 |         let nsTask = self.session.dataTask(with: request)
    |                                   `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         let task = URLSessionTask(session: session, request: request, inProgressTask: nsTask, delegate: delegate)
230 |         task.remainingRetries = configuration.maxRetries
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:240:35: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
238 |
239 |     internal func urlSession(_ session: URLSession, task: Foundation.URLSessionTask, didCompleteWithError error: Error?) {
240 |         guard let mTask = taskDict[task]
    |                                   `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
241 |         else {
242 |                 return
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:254:34: error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
252 |         // to our delegate queue because it is a concurrent queue, so blocking for a cookie request
253 |         // will not result in a blocked client.
254 |         self.delegateQueue.async {
    |                                  `- error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
255 |
256 |             // we have a caached response and data, we need to inspect the data to see if we need to renew
Dispatch.DispatchQueue:62:17: note: 'async(execute:)' declared here
60 |     public func sync(execute workItem: DispatchWorkItem)
61 |     @available(macOS 10.10, iOS 8.0, *)
62 |     public func async(execute workItem: DispatchWorkItem)
   |                 `- note: 'async(execute:)' declared here
63 |     @available(macOS 10.10, iOS 8.0, *)
64 |     public func async(group: DispatchGroup, execute workItem: DispatchWorkItem)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:293:34: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
291 |
292 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
293 |         guard let task = taskDict[dataTask]
    |                                  `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
294 |         else {
295 |             // perhaps we should also cancel the task if we fail to look it up.
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:34: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                  `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
315 |             else {
316 |                 completionHandler(.allow)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:70: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                                                      `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
315 |             else {
316 |                 completionHandler(.allow)
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:314:74: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 |     internal func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
313 |         // Retrieve the task from the dict.
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
    |                                                                          `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
315 |             else {
316 |                 completionHandler(.allow)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:316:36: error: cannot infer contextual base in reference to member 'allow'
314 |         guard let task = taskDict[dataTask], let response = response as? HTTPURLResponse
315 |             else {
316 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
317 |                 return
318 |         }
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:322:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
320 |         if task.remainingRetries > 0 {
321 |
322 |             if response.statusCode == 429 && self.configuration.shouldBackOff && task.remainingBackOffRetries > 0 {
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
323 |                 task.remainingBackOffRetries -= 1
324 |                 task.remainingRetries -= 1
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:337:31: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
335 |                 // backing off cancel the current request and then make the next one,
336 |                 // retry the request.
337 |                 self.taskDict.removeValue(forKey: task.inProgressTask)
    |                               `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
338 |                 task.inProgressTask = self.session.dataTask(with: task.request)
339 |                 self.taskDict[task.inProgressTask] = task
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:338:52: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
336 |                 // retry the request.
337 |                 self.taskDict.removeValue(forKey: task.inProgressTask)
338 |                 task.inProgressTask = self.session.dataTask(with: task.request)
    |                                                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
339 |                 self.taskDict[task.inProgressTask] = task
340 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:341:36: error: cannot infer contextual base in reference to member 'cancel'
339 |                 self.taskDict[task.inProgressTask] = task
340 |
341 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
342 |
343 |                 self.delegateQueue.asyncAfter(wallDeadline: deadline) {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:347:33: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
345 |                 }
346 |
347 |             } else if  response.statusCode == 401 || response.statusCode == 403 {
    |                                 `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
348 |                 // response delivery needs to be delayed.
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:347:63: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
345 |                 }
346 |
347 |             } else if  response.statusCode == 401 || response.statusCode == 403 {
    |                                                               `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
348 |                 // response delivery needs to be delayed.
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:351:36: error: cannot infer contextual base in reference to member 'allow'
349 |                 // if the 401 or 403 are the results of the cookie being expired, the request will be repeated
350 |                 task.response = response
351 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
352 |             } else {
353 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:356:36: error: cannot infer contextual base in reference to member 'allow'
354 |                 // request was successful, URL Session will save cookies we can send the response straight through
355 |                 task.delegate.received(response: response)
356 |                 completionHandler(.allow)
    |                                    `- error: cannot infer contextual base in reference to member 'allow'
357 |             }
358 |         } else {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:361:32: error: cannot infer contextual base in reference to member 'allow'
359 |             //URL Session will save cookies we can send the response straight through
360 |             task.delegate.received(response: response)
361 |             completionHandler(.allow)
    |                                `- error: cannot infer contextual base in reference to member 'allow'
362 |         }
363 |
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:378:23: error: cannot find 'URLRequest' in scope
376 |
377 |
378 |         var request = URLRequest(url: components.url!)
    |                       `- error: cannot find 'URLRequest' in scope
379 |         request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
380 |         request.httpMethod = "POST"
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:386:33: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
384 |         let semaphore = DispatchSemaphore(value: 0)
385 |
386 |         let task = self.session.dataTask(with: request, completionHandler: { (data1, response, error) in
    |                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
387 |
388 |             //defer the semaphore.
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:398:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
396 |             }
397 |
398 |             if response.statusCode / 100 == 2{
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
399 |
400 |                 do {
/host/spi-builder-workspace/Source/SwiftCloudant/HTTP/URLSession.swift:443:26: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
441 |     deinit {
442 |         if !isFirstRequest {
443 |             self.session.finishTasksAndInvalidate()
    |                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
444 |         }
445 |     }
[14/28] Compiling SwiftCloudant DeleteDocumentOperation.swift
[15/28] Compiling SwiftCloudant GetDocumentOperation.swift
[16/28] Compiling SwiftCloudant PutAttachmentOperation.swift
[17/28] Compiling SwiftCloudant FindDocumentsOperation.swift
[18/28] Compiling SwiftCloudant CouchDatabaseOperation.swift
[19/28] Compiling SwiftCloudant CreateDatabaseOperation.swift
[20/28] Compiling SwiftCloudant QueryViewOperation.swift
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Views/ViewPaging.swift:503:9: warning: backward matching of the unlabeled trailing closure is deprecated; label the argument with 'completionHandler' to suppress this warning
501 |                                         stale: stale,
502 |                                         includeLastUpdateSequenceNumber: includeLastUpdateSequenceNumber)
503 |         { (response, httpInfo, error) in
    |         `- warning: backward matching of the unlabeled trailing closure is deprecated; label the argument with 'completionHandler' to suppress this warning
504 |                 if let response = response, let rows = response["rows"] as? [[String: Any]] {
505 |
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Views/QueryViewOperation.swift:90:12: note: 'init(name:designDocumentID:databaseName:descending:startKey:startKeyDocumentID:endKey:endKeyDocumentID:inclusiveEnd:key:keys:limit:skip:includeDocs:conflicts:reduce:group:groupLevel:stale:includeLastUpdateSequenceNumber:rowHandler:completionHandler:)' declared here
 88 |
 89 |      */
 90 |     public init(name: String,
    |            `- note: 'init(name:designDocumentID:databaseName:descending:startKey:startKeyDocumentID:endKey:endKeyDocumentID:inclusiveEnd:key:keys:limit:skip:includeDocs:conflicts:reduce:group:groupLevel:stale:includeLastUpdateSequenceNumber:rowHandler:completionHandler:)' declared here
 91 |                 designDocumentID: String,
 92 |                 databaseName:String,
[21/28] Compiling SwiftCloudant ViewLikeOperation.swift
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Views/ViewPaging.swift:503:9: warning: backward matching of the unlabeled trailing closure is deprecated; label the argument with 'completionHandler' to suppress this warning
501 |                                         stale: stale,
502 |                                         includeLastUpdateSequenceNumber: includeLastUpdateSequenceNumber)
503 |         { (response, httpInfo, error) in
    |         `- warning: backward matching of the unlabeled trailing closure is deprecated; label the argument with 'completionHandler' to suppress this warning
504 |                 if let response = response, let rows = response["rows"] as? [[String: Any]] {
505 |
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Views/QueryViewOperation.swift:90:12: note: 'init(name:designDocumentID:databaseName:descending:startKey:startKeyDocumentID:endKey:endKeyDocumentID:inclusiveEnd:key:keys:limit:skip:includeDocs:conflicts:reduce:group:groupLevel:stale:includeLastUpdateSequenceNumber:rowHandler:completionHandler:)' declared here
 88 |
 89 |      */
 90 |     public init(name: String,
    |            `- note: 'init(name:designDocumentID:databaseName:descending:startKey:startKeyDocumentID:endKey:endKeyDocumentID:inclusiveEnd:key:keys:limit:skip:includeDocs:conflicts:reduce:group:groupLevel:stale:includeLastUpdateSequenceNumber:rowHandler:completionHandler:)' declared here
 91 |                 designDocumentID: String,
 92 |                 databaseName:String,
[22/28] Compiling SwiftCloudant ViewPaging.swift
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Views/ViewPaging.swift:503:9: warning: backward matching of the unlabeled trailing closure is deprecated; label the argument with 'completionHandler' to suppress this warning
501 |                                         stale: stale,
502 |                                         includeLastUpdateSequenceNumber: includeLastUpdateSequenceNumber)
503 |         { (response, httpInfo, error) in
    |         `- warning: backward matching of the unlabeled trailing closure is deprecated; label the argument with 'completionHandler' to suppress this warning
504 |                 if let response = response, let rows = response["rows"] as? [[String: Any]] {
505 |
/host/spi-builder-workspace/Source/SwiftCloudant/Operations/Views/QueryViewOperation.swift:90:12: note: 'init(name:designDocumentID:databaseName:descending:startKey:startKeyDocumentID:endKey:endKeyDocumentID:inclusiveEnd:key:keys:limit:skip:includeDocs:conflicts:reduce:group:groupLevel:stale:includeLastUpdateSequenceNumber:rowHandler:completionHandler:)' declared here
 88 |
 89 |      */
 90 |     public init(name: String,
    |            `- note: 'init(name:designDocumentID:databaseName:descending:startKey:startKeyDocumentID:endKey:endKeyDocumentID:inclusiveEnd:key:keys:limit:skip:includeDocs:conflicts:reduce:group:groupLevel:stale:includeLastUpdateSequenceNumber:rowHandler:completionHandler:)' declared here
 91 |                 designDocumentID: String,
 92 |                 databaseName:String,
[23/28] Compiling SwiftCloudant OperationProtocols.swift
[24/28] Compiling SwiftCloudant CreateQueryIndexOperation.swift
[25/28] Compiling SwiftCloudant DeleteQueryIndexOperation.swift
[26/28] Compiling SwiftCloudant DeleteDatabaseOperation.swift
[27/28] Compiling SwiftCloudant GetAllDatabasesOperation.swift
[28/28] Compiling SwiftCloudant GetAllDocsOperation.swift
BUILD FAILURE 6.0 linux