Build Information
Failed to build Replacer with Swift 5.10 for Linux.
Build Command
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.29.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/tattn/Replacer.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/tattn/Replacer
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 2d6199d Merge pull request #5 from tattn/dependabot/bundler/tzinfo-1.2.10
Cloned https://github.com/tattn/Replacer.git
Revision (git rev-parse @):
2d6199d8e5200fa18a654ce0b111fdf976f34d8d
SUCCESS checkout https://github.com/tattn/Replacer.git at master
========================================
Build
========================================
Selected platform: linux
Swift version: 5.10
Building package at path: $workDir
https://github.com/tattn/Replacer.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Fetching https://github.com/Alamofire/Alamofire.git
[1/28049] Fetching alamofire
Fetched https://github.com/Alamofire/Alamofire.git from cache (2.44s)
Computing version for https://github.com/Alamofire/Alamofire.git
Computed https://github.com/Alamofire/Alamofire.git at 4.9.1 (0.38s)
Creating working copy for https://github.com/Alamofire/Alamofire.git
Working copy of https://github.com/Alamofire/Alamofire.git resolved at 4.9.1
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/9] Emitting module Replacer
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:12:43: error: cannot find type 'Selector' in scope
public func replaceStatic(_ fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:14:44: error: cannot find type 'Selector' in scope
with toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:30:45: error: cannot find type 'Selector' in scope
public func replaceInstance(_ fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:32:46: error: cannot find type 'Selector' in scope
with toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:51:48: error: cannot find type 'Selector' in scope
private func addOrExchangeMethod(fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:52:46: error: cannot find type 'Method' in scope
fromMethod: Method,
^~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:54:46: error: cannot find type 'Selector' in scope
toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:55:44: error: cannot find type 'Method' in scope
toMethod: Method,
^~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLSessionConfiguration+.swift:11:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:19:39: error: cannot find type 'URLRequest' in scope
public typealias ResponseBlock = (URLRequest) -> (Data?, Error?)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
func findStub(by request: URLRequest) -> URLStub? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:52: error: cannot find type 'URLRequest' in scope
override open class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:30: error: method does not override any method from its superclass
override open class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:75: error: cannot find type 'URLRequest' in scope
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:60: error: cannot find type 'URLRequest' in scope
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:30: error: method does not override any method from its superclass
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:21:24: error: method does not override any method from its superclass
override open func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:43:24: error: method does not override any method from its superclass
override open func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:11:14: error: only protocols can inherit from 'AnyObject'
public class URLStubProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:11:31: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class URLStubProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
[5/9] Compiling Replacer URLStubManager.swift
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
func findStub(by request: URLRequest) -> URLStub? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:28:43: error: cannot find 'class_getClassMethod' in scope
let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
^~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:28:94: error: '#selector' can only be used with the Objective-C runtime
let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
^
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:29:51: error: cannot find 'class_getClassMethod' in scope
let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
^~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:29:102: error: '#selector' can only be used with the Objective-C runtime
let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
^
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:38:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(URLStubProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
[6/9] Compiling Replacer URLSessionConfiguration+.swift
/host/spi-builder-workspace/Sources/Replacer/URLSessionConfiguration+.swift:11:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
[7/9] Compiling Replacer URLStub.swift
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:19:39: error: cannot find type 'URLRequest' in scope
public typealias ResponseBlock = (URLRequest) -> (Data?, Error?)
^~~~~~~~~~
[8/9] Compiling Replacer Replacer.swift
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:12:43: error: cannot find type 'Selector' in scope
public func replaceStatic(_ fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:14:44: error: cannot find type 'Selector' in scope
with toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:30:45: error: cannot find type 'Selector' in scope
public func replaceInstance(_ fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:32:46: error: cannot find type 'Selector' in scope
with toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:51:48: error: cannot find type 'Selector' in scope
private func addOrExchangeMethod(fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:52:46: error: cannot find type 'Method' in scope
fromMethod: Method,
^~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:54:46: error: cannot find type 'Selector' in scope
toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:55:44: error: cannot find type 'Method' in scope
toMethod: Method,
^~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:19:22: error: cannot find 'class_getClassMethod' in scope
guard let from = class_getClassMethod(fromClass, fromSelector),
^~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:20:18: error: cannot find 'class_getClassMethod' in scope
let to = class_getClassMethod(toClass, toSelector) else {
^~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:24:5: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(from, to)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:37:22: error: cannot find 'class_getInstanceMethod' in scope
guard let from = class_getInstanceMethod(fromClass, fromSelector),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:38:18: error: cannot find 'class_getInstanceMethod' in scope
let to = class_getInstanceMethod(toClass, toSelector) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:58:8: error: cannot find 'class_addMethod' in scope
if class_addMethod(fromClass,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:60:24: error: cannot find 'method_getImplementation' in scope
method_getImplementation(toMethod),
^~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:61:24: error: cannot find 'method_getTypeEncoding' in scope
method_getTypeEncoding(toMethod)) {
^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:64:9: error: cannot find 'class_replaceMethod' in scope
class_replaceMethod(fromClass,
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:66:29: error: cannot find 'method_getImplementation' in scope
method_getImplementation(fromMethod),
^~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:67:29: error: cannot find 'method_getTypeEncoding' in scope
method_getTypeEncoding(fromMethod))
^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:70:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(fromMethod, toMethod)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[9/9] Compiling Replacer URLStubProtocol.swift
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:52: error: cannot find type 'URLRequest' in scope
override open class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:30: error: method does not override any method from its superclass
override open class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:75: error: cannot find type 'URLRequest' in scope
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:60: error: cannot find type 'URLRequest' in scope
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:30: error: method does not override any method from its superclass
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:21:24: error: method does not override any method from its superclass
override open func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:43:24: error: method does not override any method from its superclass
override open func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:11:14: error: only protocols can inherit from 'AnyObject'
public class URLStubProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:11:31: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class URLStubProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
func findStub(by request: URLRequest) -> URLStub? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:22:55: error: cannot find 'request' in scope
let stub = URLStubManager.shared.findStub(by: request)!
^~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:29:32: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: self.request.url!, statusCode: statusCode, httpVersion: nil, headerFields: nil)
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:29:58: error: value of type 'URLStubProtocol' has no member 'request'
let response = HTTPURLResponse(url: self.request.url!, statusCode: statusCode, httpVersion: nil, headerFields: nil)
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:29:109: error: 'nil' requires a contextual type
let response = HTTPURLResponse(url: self.request.url!, statusCode: statusCode, httpVersion: nil, headerFields: nil)
^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:29:128: error: 'nil' requires a contextual type
let response = HTTPURLResponse(url: self.request.url!, statusCode: statusCode, httpVersion: nil, headerFields: nil)
^
error: fatalError
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/7] Compiling Replacer URLStubProtocol.swift
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:52: error: cannot find type 'URLRequest' in scope
override open class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:30: error: method does not override any method from its superclass
override open class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:75: error: cannot find type 'URLRequest' in scope
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:60: error: cannot find type 'URLRequest' in scope
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:30: error: method does not override any method from its superclass
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:21:24: error: method does not override any method from its superclass
override open func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:43:24: error: method does not override any method from its superclass
override open func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:11:14: error: only protocols can inherit from 'AnyObject'
public class URLStubProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:11:31: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class URLStubProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
func findStub(by request: URLRequest) -> URLStub? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:22:55: error: cannot find 'request' in scope
let stub = URLStubManager.shared.findStub(by: request)!
^~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:29:32: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
let response = HTTPURLResponse(url: self.request.url!, statusCode: statusCode, httpVersion: nil, headerFields: nil)
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:29:58: error: value of type 'URLStubProtocol' has no member 'request'
let response = HTTPURLResponse(url: self.request.url!, statusCode: statusCode, httpVersion: nil, headerFields: nil)
~~~~ ^~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:29:109: error: 'nil' requires a contextual type
let response = HTTPURLResponse(url: self.request.url!, statusCode: statusCode, httpVersion: nil, headerFields: nil)
^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:29:128: error: 'nil' requires a contextual type
let response = HTTPURLResponse(url: self.request.url!, statusCode: statusCode, httpVersion: nil, headerFields: nil)
^
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/7] Emitting module Replacer
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:12:43: error: cannot find type 'Selector' in scope
public func replaceStatic(_ fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:14:44: error: cannot find type 'Selector' in scope
with toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:30:45: error: cannot find type 'Selector' in scope
public func replaceInstance(_ fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:32:46: error: cannot find type 'Selector' in scope
with toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:51:48: error: cannot find type 'Selector' in scope
private func addOrExchangeMethod(fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:52:46: error: cannot find type 'Method' in scope
fromMethod: Method,
^~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:54:46: error: cannot find type 'Selector' in scope
toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:55:44: error: cannot find type 'Method' in scope
toMethod: Method,
^~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLSessionConfiguration+.swift:11:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:19:39: error: cannot find type 'URLRequest' in scope
public typealias ResponseBlock = (URLRequest) -> (Data?, Error?)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
func findStub(by request: URLRequest) -> URLStub? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:52: error: cannot find type 'URLRequest' in scope
override open class func canInit(with request: URLRequest) -> Bool {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:30: error: method does not override any method from its superclass
override open class func canInit(with request: URLRequest) -> Bool {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:75: error: cannot find type 'URLRequest' in scope
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:60: error: cannot find type 'URLRequest' in scope
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:30: error: method does not override any method from its superclass
override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:21:24: error: method does not override any method from its superclass
override open func startLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:43:24: error: method does not override any method from its superclass
override open func stopLoading() {
~~~~~~~~ ^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:11:14: error: only protocols can inherit from 'AnyObject'
public class URLStubProtocol: URLProtocol {
^
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:11:31: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public class URLStubProtocol: URLProtocol {
^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
^
[4/7] Compiling Replacer Replacer.swift
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:12:43: error: cannot find type 'Selector' in scope
public func replaceStatic(_ fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:14:44: error: cannot find type 'Selector' in scope
with toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:30:45: error: cannot find type 'Selector' in scope
public func replaceInstance(_ fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:32:46: error: cannot find type 'Selector' in scope
with toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:51:48: error: cannot find type 'Selector' in scope
private func addOrExchangeMethod(fromSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:52:46: error: cannot find type 'Method' in scope
fromMethod: Method,
^~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:54:46: error: cannot find type 'Selector' in scope
toSelector: Selector,
^~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:55:44: error: cannot find type 'Method' in scope
toMethod: Method,
^~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:19:22: error: cannot find 'class_getClassMethod' in scope
guard let from = class_getClassMethod(fromClass, fromSelector),
^~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:20:18: error: cannot find 'class_getClassMethod' in scope
let to = class_getClassMethod(toClass, toSelector) else {
^~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:24:5: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(from, to)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:37:22: error: cannot find 'class_getInstanceMethod' in scope
guard let from = class_getInstanceMethod(fromClass, fromSelector),
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:38:18: error: cannot find 'class_getInstanceMethod' in scope
let to = class_getInstanceMethod(toClass, toSelector) else {
^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:58:8: error: cannot find 'class_addMethod' in scope
if class_addMethod(fromClass,
^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:60:24: error: cannot find 'method_getImplementation' in scope
method_getImplementation(toMethod),
^~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:61:24: error: cannot find 'method_getTypeEncoding' in scope
method_getTypeEncoding(toMethod)) {
^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:64:9: error: cannot find 'class_replaceMethod' in scope
class_replaceMethod(fromClass,
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:66:29: error: cannot find 'method_getImplementation' in scope
method_getImplementation(fromMethod),
^~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:67:29: error: cannot find 'method_getTypeEncoding' in scope
method_getTypeEncoding(fromMethod))
^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:70:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(fromMethod, toMethod)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[5/7] Compiling Replacer URLStub.swift
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:19:39: error: cannot find type 'URLRequest' in scope
public typealias ResponseBlock = (URLRequest) -> (Data?, Error?)
^~~~~~~~~~
[6/7] Compiling Replacer URLStubManager.swift
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
func findStub(by request: URLRequest) -> URLStub? {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:28:43: error: cannot find 'class_getClassMethod' in scope
let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
^~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:28:94: error: '#selector' can only be used with the Objective-C runtime
let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
^
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:29:51: error: cannot find 'class_getClassMethod' in scope
let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
^~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:29:102: error: '#selector' can only be used with the Objective-C runtime
let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
^
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:38:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
URLProtocol.registerClass(URLStubProtocol.self)
~~~~~~~~~~~ ^~~~~~~~~~~~~
[7/7] Compiling Replacer URLSessionConfiguration+.swift
/host/spi-builder-workspace/Sources/Replacer/URLSessionConfiguration+.swift:11:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
extension URLSessionConfiguration {
^ ~~~~~~~~~~~~~~~~~~~~~~~
error: fatalError
BUILD FAILURE 5.10 linux