Build Information
Failed to build Replacer, reference 0.1.0 (2042d6
), with Swift 6.1 for Linux on 25 Apr 2025 20:00:26 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/tattn/Replacer.git
Reference: 0.1.0
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
* tag 0.1.0 -> FETCH_HEAD
HEAD is now at 2042d67 Update Swift 5.0
Cloned https://github.com/tattn/Replacer.git
Revision (git rev-parse @):
2042d67080e9de57673f8bdf25788510377f975e
SUCCESS checkout https://github.com/tattn/Replacer.git at 0.1.0
========================================
Build
========================================
Selected platform: linux
Swift version: 6.1
Building package at path: $PWD
https://github.com/tattn/Replacer.git
https://github.com/tattn/Replacer.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
{
"identity" : "alamofire",
"requirement" : {
"range" : [
{
"lower_bound" : "4.9.0",
"upper_bound" : "5.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Alamofire/Alamofire.git"
}
],
"manifest_display_name" : "Replacer",
"name" : "Replacer",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "Replacer",
"targets" : [
"Replacer"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "TestReplacer",
"targets" : [
"TestReplacer"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "TestReplacer",
"module_type" : "SwiftTarget",
"name" : "TestReplacer",
"path" : "Sources/TestReplacer",
"product_memberships" : [
"TestReplacer"
],
"sources" : [
"XCTest+.swift"
],
"target_dependencies" : [
"Replacer"
],
"type" : "library"
},
{
"c99name" : "ReplacerTests",
"module_type" : "SwiftTarget",
"name" : "ReplacerTests",
"path" : "Tests/ReplacerTests",
"product_dependencies" : [
"Alamofire"
],
"sources" : [
"ReplacerTests.swift"
],
"target_dependencies" : [
"Replacer"
],
"type" : "test"
},
{
"c99name" : "Replacer",
"module_type" : "SwiftTarget",
"name" : "Replacer",
"path" : "Sources/Replacer",
"product_memberships" : [
"Replacer",
"TestReplacer"
],
"sources" : [
"Replacer.swift",
"URLSessionConfiguration+.swift",
"URLStub.swift",
"URLStubManager.swift",
"URLStubProtocol.swift"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Fetching https://github.com/Alamofire/Alamofire.git
[1/30137] Fetching alamofire
Fetched https://github.com/Alamofire/Alamofire.git from cache (2.81s)
Computing version for https://github.com/Alamofire/Alamofire.git
Computed https://github.com/Alamofire/Alamofire.git at 4.9.1 (3.36s)
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
[4/9] Compiling Replacer URLStubProtocol.swift
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:52: error: cannot find type 'URLRequest' in scope
11 | public class URLStubProtocol: URLProtocol {
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
14 | return URLStubManager.shared.findStub(by: request) != nil
15 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:75: error: cannot find type 'URLRequest' in scope
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
18 | return request
19 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:60: error: cannot find type 'URLRequest' in scope
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
18 | return request
19 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:21:24: error: method does not override any method from its superclass
19 | }
20 |
21 | override open func startLoading() {
| `- error: method does not override any method from its superclass
22 | let stub = URLStubManager.shared.findStub(by: request)!
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:43:24: error: method does not override any method from its superclass
41 | }
42 |
43 | override open func stopLoading() {
| `- error: method does not override any method from its superclass
44 | // noop
45 | }
/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.
9 | import Foundation
10 |
11 | public class URLStubProtocol: URLProtocol {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLProtocol = AnyObject
| `- note: 'URLProtocol' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
43 | }
44 |
45 | func findStub(by request: URLRequest) -> URLStub? {
| `- error: cannot find type 'URLRequest' in scope
46 | if let url = request.url?.absoluteString {
47 | return stubs
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:22:55: error: cannot find 'request' in scope
20 |
21 | override open func startLoading() {
22 | let stub = URLStubManager.shared.findStub(by: request)!
| `- error: cannot find 'request' in scope
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
24 | if let responseBlock = stub._responseBlock {
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:23:87: error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
21 | override open func startLoading() {
22 | let stub = URLStubManager.shared.findStub(by: request)!
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
| `- error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
24 | if let responseBlock = stub._responseBlock {
25 | (stub._data, stub._error) = responseBlock(self.request)
Dispatch.DispatchQueue.asyncAfter:3:15: note: 'asyncAfter(deadline:execute:)' declared here
1 | class DispatchQueue {
2 | @available(macOS 10.10, iOS 8.0, *)
3 | public func asyncAfter(deadline: DispatchTime, execute: DispatchWorkItem)}
| `- note: 'asyncAfter(deadline:execute:)' declared here
4 |
[5/9] Compiling Replacer URLStub.swift
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:19:39: error: cannot find type 'URLRequest' in scope
17 | var _delay: Double = 0
18 |
19 | public typealias ResponseBlock = (URLRequest) -> (Data?, Error?)
| `- error: cannot find type 'URLRequest' in scope
20 | var _responseBlock: ResponseBlock?
21 |
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:112:33: error: @escaping attribute only applies to function types
110 |
111 | @discardableResult
112 | public func response(block: @escaping ResponseBlock) -> Self {
| `- error: @escaping attribute only applies to function types
113 | self._responseBlock = block
114 | return self
[6/9] Compiling Replacer URLStubManager.swift
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:13:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public final class URLStubManager {
| `- note: class 'URLStubManager' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = URLStubManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | fileprivate var stubs: [URLStub] = []
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
43 | }
44 |
45 | func findStub(by request: URLRequest) -> URLStub? {
| `- error: cannot find type 'URLRequest' in scope
46 | if let url = request.url?.absoluteString {
47 | return stubs
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:28:43: error: cannot find 'class_getClassMethod' in scope
26 |
27 | private func swizzleDefaultSessionConfiguration() {
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
| `- error: cannot find 'class_getClassMethod' in scope
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:28:94: error: '#selector' can only be used with the Objective-C runtime
26 |
27 | private func swizzleDefaultSessionConfiguration() {
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
| `- error: '#selector' can only be used with the Objective-C runtime
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:29:51: error: cannot find 'class_getClassMethod' in scope
27 | private func swizzleDefaultSessionConfiguration() {
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
| `- error: cannot find 'class_getClassMethod' in scope
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
31 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:29:102: error: '#selector' can only be used with the Objective-C runtime
27 | private func swizzleDefaultSessionConfiguration() {
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
| `- error: '#selector' can only be used with the Objective-C runtime
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
31 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
| `- error: cannot find 'method_exchangeImplementations' in scope
31 | }
32 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:38:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
36 | func register(_ stub: URLStub) {
37 | stubs.append(stub)
38 | URLProtocol.registerClass(URLStubProtocol.self)
| `- error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
39 | }
40 |
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/9] Emitting module Replacer
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:12:43: error: cannot find type 'Selector' in scope
10 |
11 | @discardableResult
12 | public func replaceStatic(_ fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
13 | of fromClass: AnyClass? = nil,
14 | with toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:14:44: error: cannot find type 'Selector' in scope
12 | public func replaceStatic(_ fromSelector: Selector,
13 | of fromClass: AnyClass? = nil,
14 | with toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
15 | of toClass: AnyClass) -> Bool {
16 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:30:45: error: cannot find type 'Selector' in scope
28 |
29 | @discardableResult
30 | public func replaceInstance(_ fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
31 | of fromClass: AnyClass? = nil,
32 | with toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:32:46: error: cannot find type 'Selector' in scope
30 | public func replaceInstance(_ fromSelector: Selector,
31 | of fromClass: AnyClass? = nil,
32 | with toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
33 | of toClass: AnyClass) -> Bool {
34 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:51:48: error: cannot find type 'Selector' in scope
49 | }
50 |
51 | private func addOrExchangeMethod(fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
52 | fromMethod: Method,
53 | of fromClass: AnyClass,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:52:46: error: cannot find type 'Method' in scope
50 |
51 | private func addOrExchangeMethod(fromSelector: Selector,
52 | fromMethod: Method,
| `- error: cannot find type 'Method' in scope
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:54:46: error: cannot find type 'Selector' in scope
52 | fromMethod: Method,
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
55 | toMethod: Method,
56 | of toClass: AnyClass) {
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:55:44: error: cannot find type 'Method' in scope
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
55 | toMethod: Method,
| `- error: cannot find type 'Method' in scope
56 | of toClass: AnyClass) {
57 | // add if not exists
/host/spi-builder-workspace/Sources/Replacer/URLSessionConfiguration+.swift:11:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
9 | import Foundation
10 |
11 | extension URLSessionConfiguration {
| `- error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
12 |
13 | @objc dynamic class var mock: URLSessionConfiguration {
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:19:39: error: cannot find type 'URLRequest' in scope
17 | var _delay: Double = 0
18 |
19 | public typealias ResponseBlock = (URLRequest) -> (Data?, Error?)
| `- error: cannot find type 'URLRequest' in scope
20 | var _responseBlock: ResponseBlock?
21 |
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:112:33: error: @escaping attribute only applies to function types
110 |
111 | @discardableResult
112 | public func response(block: @escaping ResponseBlock) -> Self {
| `- error: @escaping attribute only applies to function types
113 | self._responseBlock = block
114 | return self
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:13:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public final class URLStubManager {
| `- note: class 'URLStubManager' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = URLStubManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | fileprivate var stubs: [URLStub] = []
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
43 | }
44 |
45 | func findStub(by request: URLRequest) -> URLStub? {
| `- error: cannot find type 'URLRequest' in scope
46 | if let url = request.url?.absoluteString {
47 | return stubs
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:52: error: cannot find type 'URLRequest' in scope
11 | public class URLStubProtocol: URLProtocol {
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
14 | return URLStubManager.shared.findStub(by: request) != nil
15 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:75: error: cannot find type 'URLRequest' in scope
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
18 | return request
19 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:60: error: cannot find type 'URLRequest' in scope
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
18 | return request
19 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:21:24: error: method does not override any method from its superclass
19 | }
20 |
21 | override open func startLoading() {
| `- error: method does not override any method from its superclass
22 | let stub = URLStubManager.shared.findStub(by: request)!
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:43:24: error: method does not override any method from its superclass
41 | }
42 |
43 | override open func stopLoading() {
| `- error: method does not override any method from its superclass
44 | // noop
45 | }
/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.
9 | import Foundation
10 |
11 | public class URLStubProtocol: URLProtocol {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLProtocol = AnyObject
| `- note: 'URLProtocol' has been explicitly marked unavailable here
[8/9] Compiling Replacer Replacer.swift
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:12:43: error: cannot find type 'Selector' in scope
10 |
11 | @discardableResult
12 | public func replaceStatic(_ fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
13 | of fromClass: AnyClass? = nil,
14 | with toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:14:44: error: cannot find type 'Selector' in scope
12 | public func replaceStatic(_ fromSelector: Selector,
13 | of fromClass: AnyClass? = nil,
14 | with toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
15 | of toClass: AnyClass) -> Bool {
16 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:30:45: error: cannot find type 'Selector' in scope
28 |
29 | @discardableResult
30 | public func replaceInstance(_ fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
31 | of fromClass: AnyClass? = nil,
32 | with toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:32:46: error: cannot find type 'Selector' in scope
30 | public func replaceInstance(_ fromSelector: Selector,
31 | of fromClass: AnyClass? = nil,
32 | with toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
33 | of toClass: AnyClass) -> Bool {
34 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:51:48: error: cannot find type 'Selector' in scope
49 | }
50 |
51 | private func addOrExchangeMethod(fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
52 | fromMethod: Method,
53 | of fromClass: AnyClass,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:52:46: error: cannot find type 'Method' in scope
50 |
51 | private func addOrExchangeMethod(fromSelector: Selector,
52 | fromMethod: Method,
| `- error: cannot find type 'Method' in scope
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:54:46: error: cannot find type 'Selector' in scope
52 | fromMethod: Method,
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
55 | toMethod: Method,
56 | of toClass: AnyClass) {
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:55:44: error: cannot find type 'Method' in scope
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
55 | toMethod: Method,
| `- error: cannot find type 'Method' in scope
56 | of toClass: AnyClass) {
57 | // add if not exists
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:19:22: error: cannot find 'class_getClassMethod' in scope
17 | let fromClass: AnyClass = fromClass ?? toClass
18 |
19 | guard let from = class_getClassMethod(fromClass, fromSelector),
| `- error: cannot find 'class_getClassMethod' in scope
20 | let to = class_getClassMethod(toClass, toSelector) else {
21 | return false
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:20:18: error: cannot find 'class_getClassMethod' in scope
18 |
19 | guard let from = class_getClassMethod(fromClass, fromSelector),
20 | let to = class_getClassMethod(toClass, toSelector) else {
| `- error: cannot find 'class_getClassMethod' in scope
21 | return false
22 | }
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:24:5: error: cannot find 'method_exchangeImplementations' in scope
22 | }
23 |
24 | method_exchangeImplementations(from, to)
| `- error: cannot find 'method_exchangeImplementations' in scope
25 |
26 | return true
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:37:22: error: cannot find 'class_getInstanceMethod' in scope
35 | let fromClass: AnyClass = fromClass ?? toClass
36 |
37 | guard let from = class_getInstanceMethod(fromClass, fromSelector),
| `- error: cannot find 'class_getInstanceMethod' in scope
38 | let to = class_getInstanceMethod(toClass, toSelector) else {
39 | return false
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:38:18: error: cannot find 'class_getInstanceMethod' in scope
36 |
37 | guard let from = class_getInstanceMethod(fromClass, fromSelector),
38 | let to = class_getInstanceMethod(toClass, toSelector) else {
| `- error: cannot find 'class_getInstanceMethod' in scope
39 | return false
40 | }
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:58:8: error: cannot find 'class_addMethod' in scope
56 | of toClass: AnyClass) {
57 | // add if not exists
58 | if class_addMethod(fromClass,
| `- error: cannot find 'class_addMethod' in scope
59 | fromSelector,
60 | method_getImplementation(toMethod),
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:60:24: error: cannot find 'method_getImplementation' in scope
58 | if class_addMethod(fromClass,
59 | fromSelector,
60 | method_getImplementation(toMethod),
| `- error: cannot find 'method_getImplementation' in scope
61 | method_getTypeEncoding(toMethod)) {
62 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:61:24: error: cannot find 'method_getTypeEncoding' in scope
59 | fromSelector,
60 | method_getImplementation(toMethod),
61 | method_getTypeEncoding(toMethod)) {
| `- error: cannot find 'method_getTypeEncoding' in scope
62 |
63 | // replace added method
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:64:9: error: cannot find 'class_replaceMethod' in scope
62 |
63 | // replace added method
64 | class_replaceMethod(fromClass,
| `- error: cannot find 'class_replaceMethod' in scope
65 | toSelector,
66 | method_getImplementation(fromMethod),
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:66:29: error: cannot find 'method_getImplementation' in scope
64 | class_replaceMethod(fromClass,
65 | toSelector,
66 | method_getImplementation(fromMethod),
| `- error: cannot find 'method_getImplementation' in scope
67 | method_getTypeEncoding(fromMethod))
68 | } else {
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:67:29: error: cannot find 'method_getTypeEncoding' in scope
65 | toSelector,
66 | method_getImplementation(fromMethod),
67 | method_getTypeEncoding(fromMethod))
| `- error: cannot find 'method_getTypeEncoding' in scope
68 | } else {
69 | // exchange if exists
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:70:9: error: cannot find 'method_exchangeImplementations' in scope
68 | } else {
69 | // exchange if exists
70 | method_exchangeImplementations(fromMethod, toMethod)
| `- error: cannot find 'method_exchangeImplementations' in scope
71 | }
72 | }
[9/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
9 | import Foundation
10 |
11 | extension URLSessionConfiguration {
| `- error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
12 |
13 | @objc dynamic class var mock: URLSessionConfiguration {
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/7] Emitting module Replacer
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:12:43: error: cannot find type 'Selector' in scope
10 |
11 | @discardableResult
12 | public func replaceStatic(_ fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
13 | of fromClass: AnyClass? = nil,
14 | with toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:14:44: error: cannot find type 'Selector' in scope
12 | public func replaceStatic(_ fromSelector: Selector,
13 | of fromClass: AnyClass? = nil,
14 | with toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
15 | of toClass: AnyClass) -> Bool {
16 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:30:45: error: cannot find type 'Selector' in scope
28 |
29 | @discardableResult
30 | public func replaceInstance(_ fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
31 | of fromClass: AnyClass? = nil,
32 | with toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:32:46: error: cannot find type 'Selector' in scope
30 | public func replaceInstance(_ fromSelector: Selector,
31 | of fromClass: AnyClass? = nil,
32 | with toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
33 | of toClass: AnyClass) -> Bool {
34 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:51:48: error: cannot find type 'Selector' in scope
49 | }
50 |
51 | private func addOrExchangeMethod(fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
52 | fromMethod: Method,
53 | of fromClass: AnyClass,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:52:46: error: cannot find type 'Method' in scope
50 |
51 | private func addOrExchangeMethod(fromSelector: Selector,
52 | fromMethod: Method,
| `- error: cannot find type 'Method' in scope
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:54:46: error: cannot find type 'Selector' in scope
52 | fromMethod: Method,
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
55 | toMethod: Method,
56 | of toClass: AnyClass) {
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:55:44: error: cannot find type 'Method' in scope
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
55 | toMethod: Method,
| `- error: cannot find type 'Method' in scope
56 | of toClass: AnyClass) {
57 | // add if not exists
/host/spi-builder-workspace/Sources/Replacer/URLSessionConfiguration+.swift:11:1: error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
9 | import Foundation
10 |
11 | extension URLSessionConfiguration {
| `- error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
12 |
13 | @objc dynamic class var mock: URLSessionConfiguration {
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:19:39: error: cannot find type 'URLRequest' in scope
17 | var _delay: Double = 0
18 |
19 | public typealias ResponseBlock = (URLRequest) -> (Data?, Error?)
| `- error: cannot find type 'URLRequest' in scope
20 | var _responseBlock: ResponseBlock?
21 |
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:112:33: error: @escaping attribute only applies to function types
110 |
111 | @discardableResult
112 | public func response(block: @escaping ResponseBlock) -> Self {
| `- error: @escaping attribute only applies to function types
113 | self._responseBlock = block
114 | return self
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
43 | }
44 |
45 | func findStub(by request: URLRequest) -> URLStub? {
| `- error: cannot find type 'URLRequest' in scope
46 | if let url = request.url?.absoluteString {
47 | return stubs
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:52: error: cannot find type 'URLRequest' in scope
11 | public class URLStubProtocol: URLProtocol {
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
14 | return URLStubManager.shared.findStub(by: request) != nil
15 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:75: error: cannot find type 'URLRequest' in scope
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
18 | return request
19 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:60: error: cannot find type 'URLRequest' in scope
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
18 | return request
19 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:21:24: error: method does not override any method from its superclass
19 | }
20 |
21 | override open func startLoading() {
| `- error: method does not override any method from its superclass
22 | let stub = URLStubManager.shared.findStub(by: request)!
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:43:24: error: method does not override any method from its superclass
41 | }
42 |
43 | override open func stopLoading() {
| `- error: method does not override any method from its superclass
44 | // noop
45 | }
/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.
9 | import Foundation
10 |
11 | public class URLStubProtocol: URLProtocol {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLProtocol = AnyObject
| `- note: 'URLProtocol' has been explicitly marked unavailable here
[3/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
9 | import Foundation
10 |
11 | extension URLSessionConfiguration {
| `- error: non-nominal type 'URLSessionConfiguration' (aka 'AnyObject') cannot be extended
12 |
13 | @objc dynamic class var mock: URLSessionConfiguration {
[4/7] Compiling Replacer URLStubManager.swift
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
43 | }
44 |
45 | func findStub(by request: URLRequest) -> URLStub? {
| `- error: cannot find type 'URLRequest' in scope
46 | if let url = request.url?.absoluteString {
47 | return stubs
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:28:43: error: cannot find 'class_getClassMethod' in scope
26 |
27 | private func swizzleDefaultSessionConfiguration() {
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
| `- error: cannot find 'class_getClassMethod' in scope
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:28:94: error: '#selector' can only be used with the Objective-C runtime
26 |
27 | private func swizzleDefaultSessionConfiguration() {
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
| `- error: '#selector' can only be used with the Objective-C runtime
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:29:51: error: cannot find 'class_getClassMethod' in scope
27 | private func swizzleDefaultSessionConfiguration() {
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
| `- error: cannot find 'class_getClassMethod' in scope
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
31 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:29:102: error: '#selector' can only be used with the Objective-C runtime
27 | private func swizzleDefaultSessionConfiguration() {
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
| `- error: '#selector' can only be used with the Objective-C runtime
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
31 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:30:9: error: cannot find 'method_exchangeImplementations' in scope
28 | let defaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.default))!
29 | let swizzledDefaultSessionConfiguration = class_getClassMethod(URLSessionConfiguration.self, #selector(getter: URLSessionConfiguration.mock))!
30 | method_exchangeImplementations(defaultSessionConfiguration, swizzledDefaultSessionConfiguration)
| `- error: cannot find 'method_exchangeImplementations' in scope
31 | }
32 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:38:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
36 | func register(_ stub: URLStub) {
37 | stubs.append(stub)
38 | URLProtocol.registerClass(URLStubProtocol.self)
| `- error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
39 | }
40 |
[5/7] Compiling Replacer URLStubProtocol.swift
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:13:52: error: cannot find type 'URLRequest' in scope
11 | public class URLStubProtocol: URLProtocol {
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
14 | return URLStubManager.shared.findStub(by: request) != nil
15 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:75: error: cannot find type 'URLRequest' in scope
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
18 | return request
19 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:17:60: error: cannot find type 'URLRequest' in scope
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
18 | return request
19 | }
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:21:24: error: method does not override any method from its superclass
19 | }
20 |
21 | override open func startLoading() {
| `- error: method does not override any method from its superclass
22 | let stub = URLStubManager.shared.findStub(by: request)!
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:43:24: error: method does not override any method from its superclass
41 | }
42 |
43 | override open func stopLoading() {
| `- error: method does not override any method from its superclass
44 | // noop
45 | }
/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.
9 | import Foundation
10 |
11 | public class URLStubProtocol: URLProtocol {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLProtocol = AnyObject
| `- note: 'URLProtocol' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:45:31: error: cannot find type 'URLRequest' in scope
43 | }
44 |
45 | func findStub(by request: URLRequest) -> URLStub? {
| `- error: cannot find type 'URLRequest' in scope
46 | if let url = request.url?.absoluteString {
47 | return stubs
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:22:55: error: cannot find 'request' in scope
20 |
21 | override open func startLoading() {
22 | let stub = URLStubManager.shared.findStub(by: request)!
| `- error: cannot find 'request' in scope
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
24 | if let responseBlock = stub._responseBlock {
/host/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:23:87: error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
21 | override open func startLoading() {
22 | let stub = URLStubManager.shared.findStub(by: request)!
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
| `- error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
24 | if let responseBlock = stub._responseBlock {
25 | (stub._data, stub._error) = responseBlock(self.request)
Dispatch.DispatchQueue.asyncAfter:3:15: note: 'asyncAfter(deadline:execute:)' declared here
1 | class DispatchQueue {
2 | @available(macOS 10.10, iOS 8.0, *)
3 | public func asyncAfter(deadline: DispatchTime, execute: DispatchWorkItem)}
| `- note: 'asyncAfter(deadline:execute:)' declared here
4 |
[6/7] Compiling Replacer Replacer.swift
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:12:43: error: cannot find type 'Selector' in scope
10 |
11 | @discardableResult
12 | public func replaceStatic(_ fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
13 | of fromClass: AnyClass? = nil,
14 | with toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:14:44: error: cannot find type 'Selector' in scope
12 | public func replaceStatic(_ fromSelector: Selector,
13 | of fromClass: AnyClass? = nil,
14 | with toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
15 | of toClass: AnyClass) -> Bool {
16 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:30:45: error: cannot find type 'Selector' in scope
28 |
29 | @discardableResult
30 | public func replaceInstance(_ fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
31 | of fromClass: AnyClass? = nil,
32 | with toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:32:46: error: cannot find type 'Selector' in scope
30 | public func replaceInstance(_ fromSelector: Selector,
31 | of fromClass: AnyClass? = nil,
32 | with toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
33 | of toClass: AnyClass) -> Bool {
34 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:51:48: error: cannot find type 'Selector' in scope
49 | }
50 |
51 | private func addOrExchangeMethod(fromSelector: Selector,
| `- error: cannot find type 'Selector' in scope
52 | fromMethod: Method,
53 | of fromClass: AnyClass,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:52:46: error: cannot find type 'Method' in scope
50 |
51 | private func addOrExchangeMethod(fromSelector: Selector,
52 | fromMethod: Method,
| `- error: cannot find type 'Method' in scope
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:54:46: error: cannot find type 'Selector' in scope
52 | fromMethod: Method,
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
| `- error: cannot find type 'Selector' in scope
55 | toMethod: Method,
56 | of toClass: AnyClass) {
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:55:44: error: cannot find type 'Method' in scope
53 | of fromClass: AnyClass,
54 | toSelector: Selector,
55 | toMethod: Method,
| `- error: cannot find type 'Method' in scope
56 | of toClass: AnyClass) {
57 | // add if not exists
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:19:22: error: cannot find 'class_getClassMethod' in scope
17 | let fromClass: AnyClass = fromClass ?? toClass
18 |
19 | guard let from = class_getClassMethod(fromClass, fromSelector),
| `- error: cannot find 'class_getClassMethod' in scope
20 | let to = class_getClassMethod(toClass, toSelector) else {
21 | return false
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:20:18: error: cannot find 'class_getClassMethod' in scope
18 |
19 | guard let from = class_getClassMethod(fromClass, fromSelector),
20 | let to = class_getClassMethod(toClass, toSelector) else {
| `- error: cannot find 'class_getClassMethod' in scope
21 | return false
22 | }
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:24:5: error: cannot find 'method_exchangeImplementations' in scope
22 | }
23 |
24 | method_exchangeImplementations(from, to)
| `- error: cannot find 'method_exchangeImplementations' in scope
25 |
26 | return true
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:37:22: error: cannot find 'class_getInstanceMethod' in scope
35 | let fromClass: AnyClass = fromClass ?? toClass
36 |
37 | guard let from = class_getInstanceMethod(fromClass, fromSelector),
| `- error: cannot find 'class_getInstanceMethod' in scope
38 | let to = class_getInstanceMethod(toClass, toSelector) else {
39 | return false
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:38:18: error: cannot find 'class_getInstanceMethod' in scope
36 |
37 | guard let from = class_getInstanceMethod(fromClass, fromSelector),
38 | let to = class_getInstanceMethod(toClass, toSelector) else {
| `- error: cannot find 'class_getInstanceMethod' in scope
39 | return false
40 | }
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:58:8: error: cannot find 'class_addMethod' in scope
56 | of toClass: AnyClass) {
57 | // add if not exists
58 | if class_addMethod(fromClass,
| `- error: cannot find 'class_addMethod' in scope
59 | fromSelector,
60 | method_getImplementation(toMethod),
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:60:24: error: cannot find 'method_getImplementation' in scope
58 | if class_addMethod(fromClass,
59 | fromSelector,
60 | method_getImplementation(toMethod),
| `- error: cannot find 'method_getImplementation' in scope
61 | method_getTypeEncoding(toMethod)) {
62 |
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:61:24: error: cannot find 'method_getTypeEncoding' in scope
59 | fromSelector,
60 | method_getImplementation(toMethod),
61 | method_getTypeEncoding(toMethod)) {
| `- error: cannot find 'method_getTypeEncoding' in scope
62 |
63 | // replace added method
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:64:9: error: cannot find 'class_replaceMethod' in scope
62 |
63 | // replace added method
64 | class_replaceMethod(fromClass,
| `- error: cannot find 'class_replaceMethod' in scope
65 | toSelector,
66 | method_getImplementation(fromMethod),
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:66:29: error: cannot find 'method_getImplementation' in scope
64 | class_replaceMethod(fromClass,
65 | toSelector,
66 | method_getImplementation(fromMethod),
| `- error: cannot find 'method_getImplementation' in scope
67 | method_getTypeEncoding(fromMethod))
68 | } else {
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:67:29: error: cannot find 'method_getTypeEncoding' in scope
65 | toSelector,
66 | method_getImplementation(fromMethod),
67 | method_getTypeEncoding(fromMethod))
| `- error: cannot find 'method_getTypeEncoding' in scope
68 | } else {
69 | // exchange if exists
/host/spi-builder-workspace/Sources/Replacer/Replacer.swift:70:9: error: cannot find 'method_exchangeImplementations' in scope
68 | } else {
69 | // exchange if exists
70 | method_exchangeImplementations(fromMethod, toMethod)
| `- error: cannot find 'method_exchangeImplementations' in scope
71 | }
72 | }
[7/7] Compiling Replacer URLStub.swift
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:19:39: error: cannot find type 'URLRequest' in scope
17 | var _delay: Double = 0
18 |
19 | public typealias ResponseBlock = (URLRequest) -> (Data?, Error?)
| `- error: cannot find type 'URLRequest' in scope
20 | var _responseBlock: ResponseBlock?
21 |
/host/spi-builder-workspace/Sources/Replacer/URLStub.swift:112:33: error: @escaping attribute only applies to function types
110 |
111 | @discardableResult
112 | public func response(block: @escaping ResponseBlock) -> Self {
| `- error: @escaping attribute only applies to function types
113 | self._responseBlock = block
114 | return self
BUILD FAILURE 6.1 linux