Build Information
Failed to build RealHTTP, reference main (8f1ea5
), with Swift 5.9 for Linux on 15 Jan 2025 15:40:59 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Build Log
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:90:28: error: cannot infer contextual base in reference to member 'useCredential'
completionHandler(.useCredential, URLCredential(trust: trust))
~^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:90:43: error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
completionHandler(.useCredential, URLCredential(trust: trust))
^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:96:9: error: cannot find 'SecTrustSetPolicies' in scope
SecTrustSetPolicies(trust, trustPolicyForDomain(domain))
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:125:23: error: cannot find type 'SecCertificate' in scope
let collect: [SecCertificate] = certs.map {
^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:129:9: error: cannot find 'SecTrustSetAnchorCertificates' in scope
SecTrustSetAnchorCertificates(trust, collect as CFArray)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:129:57: error: cannot find type 'CFArray' in scope
SecTrustSetAnchorCertificates(trust, collect as CFArray)
^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:130:21: error: cannot find type 'SecTrustResultType' in scope
var result: SecTrustResultType = SecTrustResultType(rawValue: UInt32(0))!
^~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:131:12: error: cannot find 'SecTrustEvaluateWithError' in scope
if SecTrustEvaluateWithError(trust, nil) == false {
^~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:131:45: error: 'nil' requires a contextual type
if SecTrustEvaluateWithError(trust, nil) == false {
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:135:52: error: cannot infer contextual base in reference to member 'proceed'
guard result == .unspecified || result == .proceed else {
~^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:181:28: error: cannot find 'SecCertificateCreateWithData' in scope
let possibleCert = SecCertificateCreateWithData(nil, self as CFData)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:181:70: error: cannot find type 'CFData' in scope
let possibleCert = SecCertificateCreateWithData(nil, self as CFData)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:181:57: error: 'nil' requires a contextual type
let possibleCert = SecCertificateCreateWithData(nil, self as CFData)
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/SSLCertificate.swift:44:28: error: cannot find type 'SecKey' in scope
public init(publicKey: SecKey) {
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:193:31: error: cannot find type 'SecKey' in scope
func publicKeyChain() -> [SecKey] {
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:224:57: error: cannot find type 'SecKey' in scope
func extractPublicKeyFromCert(policy: SecPolicy) -> SecKey? {
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPSecurity/Options/CertificatesSecurity/CertificatesSecurity.swift:224:43: error: cannot find type 'SecPolicy' in scope
func extractPublicKeyFromCert(policy: SecPolicy) -> SecKey? {
^~~~~~~~~
[61/79] Compiling RealHTTP HTTPBody+FormValues.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[62/79] Compiling RealHTTP HTTPBody+Multipart.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[63/79] Compiling RealHTTP MultipartForm+Boundary.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[64/79] Compiling RealHTTP MultipartForm+Item.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[65/79] Compiling RealHTTP MultipartForm.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[66/79] Compiling RealHTTP HTTPBody+Stream.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[67/79] Compiling RealHTTP StreamContent.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[68/79] Compiling RealHTTP HTTPBody+QueryString.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[69/79] Compiling RealHTTP URLParametersData.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[70/79] Compiling RealHTTP HTTPDataLoader+Response.swift
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPBody/Multipart/Support/MultipartForm.swift:113:31: error: value of type 'URL' has no member 'checkPromisedItemIsReachable'
try fileURL.checkPromisedItemIsReachable() else { // is file reachable
~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:35:29: error: cannot find type 'URLSessionTaskMetrics' in scope
var sessionTaskMetrics: URLSessionTaskMetrics?
^~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:44:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var urlResponse: URLResponse?
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:33: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/HTTPDataLoader/HTTPDataLoader+Response.swift:58:55: error: cannot find type 'URLRequest' in scope
var urlRequests: (original: URLRequest?, current: URLRequest?) = (nil, nil)
^~~~~~~~~~
[71/79] Compiling RealHTTP Foundation+Stubber.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[72/79] Compiling RealHTTP HTTPStub+Extension.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[73/79] Compiling RealHTTP HTTPStubDataConvertible.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[74/79] Compiling RealHTTP HTTPStubber.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[75/79] Compiling RealHTTP HTTPStubberErrors.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[76/79] Compiling RealHTTP HTTPStubHookProtocol.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[77/79] Compiling RealHTTP HTTPStubURLProtocol.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[78/79] Compiling RealHTTP URLHook.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[79/79] Compiling RealHTTP URLSessionHook.swift
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:189:53: error: cannot find type 'URLRequest' in scope
internal func suitableStubForRequest(_ request: URLRequest) -> HTTPStubRequest? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:199:41: error: cannot find type 'URLRequest' in scope
public func shouldHandle(_ request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Request/HTTPStubRequest.swift:50:37: error: cannot find type 'URLRequest' in scope
public func match(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/Stub Matchers/Built-In Matchers/HTTPStubCustomMatcher.swift:22:33: error: cannot find type 'URLRequest' in scope
public typealias Handler = (URLRequest, HTTPMatcherSource) -> Bool
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubber.swift:191:16: error: cannot convert value of type 'HTTPStubRequest' to closure result type 'Bool'
$0.match(request)
~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/DataTypes/HTTPStubIgnoreRule.swift:83:41: error: cannot find type 'URLRequest' in scope
internal func matches(_ urlRequest: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/HTTPStubberErrors.swift:22:28: error: cannot find type 'URLRequest' in scope
case matchStubNotFound(URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:25: error: property does not override any property from its superclass
public override var task: URLSessionTask? {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:29:31: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override var task: URLSessionTask? {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:33:33: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var urlSessionTask: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:54: error: cannot find type 'URLRequest' in scope
public override class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:44:32: error: method does not override any method from its superclass
public override class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:77: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:62: error: cannot find type 'URLRequest' in scope
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:54:32: error: method does not override any method from its superclass
public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:69: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:94: error: cannot find type 'URLRequest' in scope
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:58:32: error: method does not override any method from its superclass
public override class func requestIsCacheEquivalent(_ requestA: URLRequest, to requestB: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:35: error: cannot find type 'URLRequest' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:91: error: cannot find type 'URLProtocolClient' in scope
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:21: error: initializer does not override a designated initializer from its superclass
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:63:63: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:83: error: cannot find type 'URLProtocolClient' in scope
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:67:55: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(task: URLSessionTask, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
^~~~~~~~~~~~~~~~~
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
public typealias CachedURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:72:26: error: method does not override any method from its superclass
public override func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:135:26: error: method does not override any method from its superclass
public override func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:142:49: error: cannot find type 'URLRequest' in scope
forRequest request: URLRequest, forStub stub: HTTPStubResponse,
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:43: error: cannot find type 'URLRequest' in scope
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:190:105: error: 'HTTPCookieStorage' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func finishRequest(_ request: URLRequest, withStub stubResponse: HTTPStubResponse, cookies: HTTPCookieStorage) {
^~~~~~~~~~~~~~~~~
Foundation.HTTPCookieStorage:2:18: note: 'HTTPCookieStorage' has been explicitly marked unavailable here
public typealias HTTPCookieStorage = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:14: error: only protocols can inherit from 'AnyObject'
public class HTTPStubURLProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:21:35: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class HTTPStubURLProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:64:9: error: 'super' members cannot be referenced in a root class
super.init(request: request, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:68:9: error: 'super' members cannot be referenced in a root class
super.init(request: task.currentRequest!, cachedResponse: cachedResponse, client: client)
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:73:28: error: value of type 'HTTPStubURLProtocol' has no member 'request'
var request = self.request
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:76:47: error: type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'shared'
var cookieStorage = HTTPCookieStorage.shared
~~~~~~~~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:77:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'value'
if let session = task?.value(forKey: "session") as? URLSession,
~~~~~ ^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:87:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
request.allHTTPHeaderFields!.merge(HTTPCookie.requestHeaderFields(with: cookies)) { (current, _) in
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:99:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: HTTPStubberErrors.matchStubNotFound(request))
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:119:22: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: Data())
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:176:26: error: value of type 'HTTPStubURLProtocol' has no member 'client'
self.client?.urlProtocol(self, didLoad: data)
~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:301:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^ ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Client/Internal/Other Structures/Headers/HTTPHeaders.swift:312:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:193:39: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'cookies'
let cookiesToSet = HTTPCookie.cookies(withResponseHeaderFields: headers, for: url)
~~~~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:194:17: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'setCookies'
cookies.setCookies(cookiesToSet, for: request.url!, mainDocumentURL: url)
~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:197:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didFailWithError: failureError)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:202:24: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: url,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:204:53: error: 'nil' requires a contextual type
httpVersion: nil,
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:215:28: error: cannot find 'URLRequest' in scope
var redirect = URLRequest(url: location)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:216:48: error: value of type 'HTTPCookieStorage' (aka 'AnyObject') has no member 'cookies'
if let cookiesInRedirect = cookies.cookies(for: url) {
~~~~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:217:59: error: type 'HTTPCookie' (aka 'AnyObject') has no member 'requestHeaderFields'
redirect.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesInRedirect)
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:219:13: error: cannot find 'client' in scope
client?.urlProtocol(self, wasRedirectedTo: redirect, redirectResponse: response!)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:9: error: cannot find 'client' in scope
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:223:79: error: cannot infer contextual base in reference to member 'notAllowed'
client?.urlProtocol(self, didReceive: response!, cacheStoragePolicy: .notAllowed)
~^~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:225:13: error: cannot find 'client' in scope
client?.urlProtocol(self, didLoad: data)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/HTTPStubURLProtocol.swift:227:9: error: cannot find 'client' in scope
client?.urlProtocolDidFinishLoading(self)
^~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:25:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLHook.swift:29:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
URLProtocol.unregisterClass(HTTPStubURLProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:41:40: error: cannot find type 'Selector' in scope
private func originalSelector() -> Selector {
^~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:45:6: error: Objective-C interoperability is disabled
@objc private func protocolClasses() -> [AnyClass] {
~^~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:26:28: error: cannot find 'class_getInstanceMethod' in scope
guard let method = class_getInstanceMethod(originalClass(), originalSelector()),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:26: error: cannot find 'class_getInstanceMethod' in scope
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:27:71: error: '#selector' can only be used with the Objective-C runtime
let stub = class_getInstanceMethod(URLSessionHook.self, #selector(protocolClasses)) else {
^
/host/spi-builder-workspace/Sources/RealHTTP/Stubber/Hooks/URLSessionHook.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(method, stub)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux