Build Information
Failed to build Replacer, reference master (2d6199
), with Swift 6.0 for Linux on 1 Nov 2024 00:43:03 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.56.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: 6.0
Building package at path: $PWD
https://github.com/tattn/Replacer.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Fetching https://github.com/Alamofire/Alamofire.git
[1/29789] Fetching alamofire
Fetched https://github.com/Alamofire/Alamofire.git from cache (2.73s)
Computing version for https://github.com/Alamofire/Alamofire.git
Computed https://github.com/Alamofire/Alamofire.git at 4.9.1 (0.48s)
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
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: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- 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:13:30: error: method does not override any method from its superclass
11 | public class URLStubProtocol: URLProtocol {
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
| `- error: method does not override any method from its superclass
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:17:30: error: method does not override any method from its superclass
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: method does not override any method from its superclass
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
[5/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 {
[6/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 | }
/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: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 |
15 | fileprivate var stubs: [URLStub] = []
[7/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
[8/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: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- 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 |
[9/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:13:30: error: method does not override any method from its superclass
11 | public class URLStubProtocol: URLProtocol {
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
| `- error: method does not override any method from its superclass
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:17:30: error: method does not override any method from its superclass
15 | }
16 |
17 | override open class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: method does not override any method from its superclass
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:71:17: note: 'asyncAfter(deadline:execute:)' declared here
69 | public func asyncAfter(wallDeadline: DispatchWallTime, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @escaping @Sendable @convention(block) () -> Void)
70 | @available(macOS 10.10, iOS 8.0, *)
71 | public func asyncAfter(deadline: DispatchTime, execute: DispatchWorkItem)
| `- note: 'asyncAfter(deadline:execute:)' declared here
72 | @available(macOS 10.10, iOS 8.0, *)
73 | public func asyncAfter(wallDeadline: DispatchWallTime, execute: DispatchWorkItem)
BUILD FAILURE 6.0 linux