Build Information
Failed to build PactConsumerSwift, reference v0.10.2 (405dcb
), with Swift 6.0 for Linux on 28 Nov 2024 05:37:10 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 -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
Build Log
========================================
RunAll
========================================
Builder version: 4.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/DiUS/pact-consumer-swift.git
Reference: v0.10.2
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/DiUS/pact-consumer-swift
* tag v0.10.2 -> FETCH_HEAD
HEAD is now at 405dcbf chore: Bumping version to 0.10.2
Cloned https://github.com/DiUS/pact-consumer-swift.git
Revision (git rev-parse @):
405dcbf565241b8da08ff3ff329ab493229bae83
SUCCESS checkout https://github.com/DiUS/pact-consumer-swift.git at v0.10.2
========================================
Build
========================================
Selected platform: linux
Swift version: 6.0
Building package at path: $PWD
https://github.com/DiUS/pact-consumer-swift.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 -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.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
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/9] Compiling PactConsumerSwift MockService.swift
/host/spi-builder-workspace/Sources/MockService.swift:4:2: error: Objective-C interoperability is disabled
2 | import XCTest
3 |
4 | @objc
| `- error: Objective-C interoperability is disabled
5 | open class MockService: NSObject {
6 | private let provider: String
/host/spi-builder-workspace/Sources/MockService.swift:13:4: error: Objective-C interoperability is disabled
11 |
12 | /// The baseUrl of Pact Mock Service
13 | @objc
| `- error: Objective-C interoperability is disabled
14 | public var baseUrl: String {
15 | return pactVerificationService.baseUrl
/host/spi-builder-workspace/Sources/MockService.swift:47:4: error: Objective-C interoperability is disabled
45 | /// Use this initialiser to use the default XCodeErrorReporter
46 | ///
47 | @objc(initWithProvider: consumer: andVerificationService:)
| `- error: Objective-C interoperability is disabled
48 | public convenience init(provider: String, consumer: String, pactVerificationService: PactVerificationService) {
49 | self.init(provider: provider,
/host/spi-builder-workspace/Sources/MockService.swift:63:4: error: Objective-C interoperability is disabled
61 | /// Use this initialiser to use the default PactVerificationService and ErrorReporter
62 | ///
63 | @objc(initWithProvider: consumer:)
| `- error: Objective-C interoperability is disabled
64 | public convenience init(provider: String, consumer: String) {
65 | self.init(provider: provider,
/host/spi-builder-workspace/Sources/MockService.swift:81:4: error: Objective-C interoperability is disabled
79 | /// - Returns: An `Interaction` object
80 | ///
81 | @objc
| `- error: Objective-C interoperability is disabled
82 | public func given(_ providerState: String) -> Interaction {
83 | let interaction = Interaction().given(providerState)
/host/spi-builder-workspace/Sources/MockService.swift:98:4: error: Objective-C interoperability is disabled
96 | /// - Returns: An `Interaction` object
97 | ///
98 | @objc(uponReceiving:)
| `- error: Objective-C interoperability is disabled
99 | public func uponReceiving(_ description: String) -> Interaction {
100 | let interaction = Interaction().uponReceiving(description)
/host/spi-builder-workspace/Sources/MockService.swift:120:4: error: Objective-C interoperability is disabled
118 | /// - Parameter testFunction: The function making the network request you are testing
119 | ///
120 | @objc(run:)
| `- error: Objective-C interoperability is disabled
121 | public func objcRun(_ testFunction: @escaping (_ testComplete: @escaping () -> Void) -> Void) {
122 | self.run(nil, line: nil, timeout: 30, testFunction: testFunction)
/host/spi-builder-workspace/Sources/MockService.swift:141:4: error: Objective-C interoperability is disabled
139 | /// - Parameter timeout: Time to wait for the `testComplete()` else it fails the test
140 | ///
141 | @objc(run: withTimeout:)
| `- error: Objective-C interoperability is disabled
142 | public func objcRun(
143 | _ testFunction: @escaping (_ testComplete: @escaping () -> Void) -> Void,
[4/9] Compiling PactConsumerSwift Matcher.swift
/host/spi-builder-workspace/Sources/Matcher.swift:3:2: error: Objective-C interoperability is disabled
1 | import Foundation
2 |
3 | @objc
| `- error: Objective-C interoperability is disabled
4 | open class Matcher: NSObject {
5 |
/host/spi-builder-workspace/Sources/Matcher.swift:6:4: error: Objective-C interoperability is disabled
4 | open class Matcher: NSObject {
5 |
6 | @objc
| `- error: Objective-C interoperability is disabled
7 | public class func term(matcher: String, generate: String) -> [String: Any] {
8 | return [ "json_class": "Pact::Term",
/host/spi-builder-workspace/Sources/Matcher.swift:18:4: error: Objective-C interoperability is disabled
16 | }
17 |
18 | @objc
| `- error: Objective-C interoperability is disabled
19 | public class func somethingLike(_ value: Any) -> [String: Any] {
20 | return [
/host/spi-builder-workspace/Sources/Matcher.swift:26:4: error: Objective-C interoperability is disabled
24 | }
25 |
26 | @objc
| `- error: Objective-C interoperability is disabled
27 | public class func eachLike(_ value: Any, min: Int = 1) -> [String: Any] {
28 | return [
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/9] Emitting module PactConsumerSwift
/host/spi-builder-workspace/Sources/Interaction.swift:8:2: error: Objective-C interoperability is disabled
6 | }
7 |
8 | @objc
| `- error: Objective-C interoperability is disabled
9 | public class Interaction: NSObject {
10 | private var providerState: String?
/host/spi-builder-workspace/Sources/Interaction.swift:42:4: error: Objective-C interoperability is disabled
40 | /// - Returns: An `Interaction` object
41 | ///
42 | @objc
| `- error: Objective-C interoperability is disabled
43 | @discardableResult
44 | public func uponReceiving(_ testDescription: String) -> Interaction {
/host/spi-builder-workspace/Sources/Interaction.swift:65:4: error: Objective-C interoperability is disabled
63 | /// - Returns: An `Interaction` object
64 | ///
65 | @objc(withRequestHTTPMethod: path: query: headers: body:)
| `- error: Objective-C interoperability is disabled
66 | @discardableResult
67 | public func withRequest(method: PactHTTPMethod,
/host/spi-builder-workspace/Sources/Interaction.swift:102:4: error: Objective-C interoperability is disabled
100 | /// - Returns: An `Interaction` object
101 | ///
102 | @objc(willRespondWithHTTPStatus: headers: body:)
| `- error: Objective-C interoperability is disabled
103 | @discardableResult
104 | public func willRespondWith(status: Int,
/host/spi-builder-workspace/Sources/Interaction.swift:118:4: error: Objective-C interoperability is disabled
116 |
117 | ///
118 | @objc
| `- error: Objective-C interoperability is disabled
119 | func payload() -> [String: Any] {
120 | var payload: [String: Any] = ["description": testDescription,
/host/spi-builder-workspace/Sources/Matcher.swift:3:2: error: Objective-C interoperability is disabled
1 | import Foundation
2 |
3 | @objc
| `- error: Objective-C interoperability is disabled
4 | open class Matcher: NSObject {
5 |
/host/spi-builder-workspace/Sources/Matcher.swift:6:4: error: Objective-C interoperability is disabled
4 | open class Matcher: NSObject {
5 |
6 | @objc
| `- error: Objective-C interoperability is disabled
7 | public class func term(matcher: String, generate: String) -> [String: Any] {
8 | return [ "json_class": "Pact::Term",
/host/spi-builder-workspace/Sources/Matcher.swift:18:4: error: Objective-C interoperability is disabled
16 | }
17 |
18 | @objc
| `- error: Objective-C interoperability is disabled
19 | public class func somethingLike(_ value: Any) -> [String: Any] {
20 | return [
/host/spi-builder-workspace/Sources/Matcher.swift:26:4: error: Objective-C interoperability is disabled
24 | }
25 |
26 | @objc
| `- error: Objective-C interoperability is disabled
27 | public class func eachLike(_ value: Any, min: Int = 1) -> [String: Any] {
28 | return [
/host/spi-builder-workspace/Sources/MockService.swift:4:2: error: Objective-C interoperability is disabled
2 | import XCTest
3 |
4 | @objc
| `- error: Objective-C interoperability is disabled
5 | open class MockService: NSObject {
6 | private let provider: String
/host/spi-builder-workspace/Sources/MockService.swift:13:4: error: Objective-C interoperability is disabled
11 |
12 | /// The baseUrl of Pact Mock Service
13 | @objc
| `- error: Objective-C interoperability is disabled
14 | public var baseUrl: String {
15 | return pactVerificationService.baseUrl
/host/spi-builder-workspace/Sources/MockService.swift:47:4: error: Objective-C interoperability is disabled
45 | /// Use this initialiser to use the default XCodeErrorReporter
46 | ///
47 | @objc(initWithProvider: consumer: andVerificationService:)
| `- error: Objective-C interoperability is disabled
48 | public convenience init(provider: String, consumer: String, pactVerificationService: PactVerificationService) {
49 | self.init(provider: provider,
/host/spi-builder-workspace/Sources/MockService.swift:63:4: error: Objective-C interoperability is disabled
61 | /// Use this initialiser to use the default PactVerificationService and ErrorReporter
62 | ///
63 | @objc(initWithProvider: consumer:)
| `- error: Objective-C interoperability is disabled
64 | public convenience init(provider: String, consumer: String) {
65 | self.init(provider: provider,
/host/spi-builder-workspace/Sources/MockService.swift:81:4: error: Objective-C interoperability is disabled
79 | /// - Returns: An `Interaction` object
80 | ///
81 | @objc
| `- error: Objective-C interoperability is disabled
82 | public func given(_ providerState: String) -> Interaction {
83 | let interaction = Interaction().given(providerState)
/host/spi-builder-workspace/Sources/MockService.swift:98:4: error: Objective-C interoperability is disabled
96 | /// - Returns: An `Interaction` object
97 | ///
98 | @objc(uponReceiving:)
| `- error: Objective-C interoperability is disabled
99 | public func uponReceiving(_ description: String) -> Interaction {
100 | let interaction = Interaction().uponReceiving(description)
/host/spi-builder-workspace/Sources/MockService.swift:120:4: error: Objective-C interoperability is disabled
118 | /// - Parameter testFunction: The function making the network request you are testing
119 | ///
120 | @objc(run:)
| `- error: Objective-C interoperability is disabled
121 | public func objcRun(_ testFunction: @escaping (_ testComplete: @escaping () -> Void) -> Void) {
122 | self.run(nil, line: nil, timeout: 30, testFunction: testFunction)
/host/spi-builder-workspace/Sources/MockService.swift:141:4: error: Objective-C interoperability is disabled
139 | /// - Parameter timeout: Time to wait for the `testComplete()` else it fails the test
140 | ///
141 | @objc(run: withTimeout:)
| `- error: Objective-C interoperability is disabled
142 | public func objcRun(
143 | _ testFunction: @escaping (_ testComplete: @escaping () -> Void) -> Void,
/host/spi-builder-workspace/Sources/PactVerificationService.swift:18:12: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
16 |
17 | private lazy var session = {
18 | return URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
19 | }()
20 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:18:39: error: cannot infer contextual base in reference to member 'ephemeral'
16 |
17 | private lazy var session = {
18 | return URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
| `- error: cannot infer contextual base in reference to member 'ephemeral'
19 | }()
20 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:18:82: error: cannot infer contextual base in reference to member 'main'
16 |
17 | private lazy var session = {
18 | return URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
| `- error: cannot infer contextual base in reference to member 'main'
19 | }()
20 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:3:2: error: Objective-C interoperability is disabled
1 | import Foundation
2 |
3 | @objc
| `- error: Objective-C interoperability is disabled
4 | open class PactVerificationService: NSObject {
5 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:9:4: error: Objective-C interoperability is disabled
7 | typealias StringHandler = (Result<String, NSError>) -> Void
8 |
9 | @objc public let url: String
| `- error: Objective-C interoperability is disabled
10 | @objc public let port: Int
11 | @objc public let allowInsecureCertificates: Bool
/host/spi-builder-workspace/Sources/PactVerificationService.swift:10:4: error: Objective-C interoperability is disabled
8 |
9 | @objc public let url: String
10 | @objc public let port: Int
| `- error: Objective-C interoperability is disabled
11 | @objc public let allowInsecureCertificates: Bool
12 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:11:4: error: Objective-C interoperability is disabled
9 | @objc public let url: String
10 | @objc public let port: Int
11 | @objc public let allowInsecureCertificates: Bool
| `- error: Objective-C interoperability is disabled
12 |
13 | open var baseUrl: String {
/host/spi-builder-workspace/Sources/PactVerificationService.swift:22:16: warning: static property 'baseURLString' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | enum Router {
22 | static var baseURLString = "http://example.com"
| |- warning: static property 'baseURLString' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'baseURLString' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'baseURLString' 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
23 |
24 | case clean
/host/spi-builder-workspace/Sources/PactVerificationService.swift:55:35: error: cannot find type 'URLRequest' in scope
53 |
54 | // MARK: URLRequestConvertible
55 | func asURLRequest() throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
56 | guard let url = URL(string: Router.baseURLString) else { throw NSError(domain: "", code: 1, userInfo: nil) }
57 | var urlRequest = URLRequest(url: url.appendingPathComponent(path))
/host/spi-builder-workspace/Sources/PactVerificationService.swift:71:94: error: cannot find type 'URLRequest' in scope
69 | }
70 |
71 | private func jsonEncode(_ request: URLRequest, with parameters: [String: Any]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
72 | var urlRequest = request
73 | let data = try JSONSerialization.data(withJSONObject: parameters, options: [])
/host/spi-builder-workspace/Sources/PactVerificationService.swift:71:40: error: cannot find type 'URLRequest' in scope
69 | }
70 |
71 | private func jsonEncode(_ request: URLRequest, with parameters: [String: Any]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
72 | var urlRequest = request
73 | let data = try JSONSerialization.data(withJSONObject: parameters, options: [])
/host/spi-builder-workspace/Sources/PactVerificationService.swift:82:4: error: Objective-C interoperability is disabled
80 | }
81 |
82 | @objc(initWithUrl: port: allowInsecureCertificate:)
| `- error: Objective-C interoperability is disabled
83 | public init(url: String, port: Int, allowInsecureCertificates: Bool) {
84 | self.url = url
/host/spi-builder-workspace/Sources/PactVerificationService.swift:93:4: error: Objective-C interoperability is disabled
91 | }
92 |
93 | @objc(initWithUrl: port:)
| `- error: Objective-C interoperability is disabled
94 | public convenience init(url: String = "http://localhost", port: Int = 1234) {
95 | self.init(url: url, port: port, allowInsecureCertificates: false)
/host/spi-builder-workspace/Sources/PactVerificationService.swift:98:4: error: Objective-C interoperability is disabled
96 | }
97 |
98 | @objc(initWithUrl: port: session:)
| `- error: Objective-C interoperability is disabled
99 | public convenience init(url: String = "http://localhost", port: Int = 1234, session: URLSession) {
100 | self.init(url: url, port: port, allowInsecureCertificates: false)
/host/spi-builder-workspace/Sources/PactVerificationService.swift:99:88: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 |
98 | @objc(initWithUrl: port: session:)
99 | public convenience init(url: String = "http://localhost", port: Int = 1234, session: URLSession) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 | self.init(url: url, port: port, allowInsecureCertificates: false)
101 | self.session = session
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/PactVerificationService.swift:187:57: error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
185 | }
186 |
187 | func handleResponse(result: Result<String, URLSession.APIServiceError>, completion: @escaping VoidHandler) {
| `- error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
188 | switch result {
189 | case .success:
/host/spi-builder-workspace/Sources/PactVerificationService.swift:196:57: error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
194 | }
195 |
196 | func handleResponse(result: Result<String, URLSession.APIServiceError>, completion: @escaping StringHandler) {
| `- error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
197 | switch result {
198 | case .success(let resultString):
/host/spi-builder-workspace/Sources/PactVerificationService.swift:209:36: error: cannot find type 'URLSessionDelegate' in scope
207 | // MARK: - Network request handler
208 |
209 | extension PactVerificationService: URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
210 |
211 | public func urlSession(
/host/spi-builder-workspace/Sources/PactVerificationService.swift:214:46: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
212 | _ session: URLSession,
213 | didReceive challenge: URLAuthenticationChallenge,
214 | completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
215 | ) {
216 | guard
/host/spi-builder-workspace/Sources/PactVerificationService.swift:212:16: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
210 |
211 | public func urlSession(
212 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 | didReceive challenge: URLAuthenticationChallenge,
214 | completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/PactVerificationService.swift:213:27: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
211 | public func urlSession(
212 | _ session: URLSession,
213 | didReceive challenge: URLAuthenticationChallenge,
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
214 | completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
215 | ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' 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 URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/PactVerificationService.swift:231:54: error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
229 | fileprivate func performNetworkRequest(
230 | for router: Router,
231 | completion: @escaping (Result<String, URLSession.APIServiceError>) -> Void
| `- error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
232 | ) {
233 | do {
/host/spi-builder-workspace/Sources/PactVerificationService.swift:276:9: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
274 | }
275 |
276 | private extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
277 |
278 | enum APIServiceError: Error {
/host/spi-builder-workspace/Sources/PactVerificationService.swift:306:22: error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
304 | }
305 |
306 | extension URLSession.APIServiceError: LocalizedError {
| `- error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
307 |
308 | public var localizedDescription: String {
[6/9] Compiling PactConsumerSwift Interaction.swift
/host/spi-builder-workspace/Sources/Interaction.swift:8:2: error: Objective-C interoperability is disabled
6 | }
7 |
8 | @objc
| `- error: Objective-C interoperability is disabled
9 | public class Interaction: NSObject {
10 | private var providerState: String?
/host/spi-builder-workspace/Sources/Interaction.swift:42:4: error: Objective-C interoperability is disabled
40 | /// - Returns: An `Interaction` object
41 | ///
42 | @objc
| `- error: Objective-C interoperability is disabled
43 | @discardableResult
44 | public func uponReceiving(_ testDescription: String) -> Interaction {
/host/spi-builder-workspace/Sources/Interaction.swift:65:4: error: Objective-C interoperability is disabled
63 | /// - Returns: An `Interaction` object
64 | ///
65 | @objc(withRequestHTTPMethod: path: query: headers: body:)
| `- error: Objective-C interoperability is disabled
66 | @discardableResult
67 | public func withRequest(method: PactHTTPMethod,
/host/spi-builder-workspace/Sources/Interaction.swift:102:4: error: Objective-C interoperability is disabled
100 | /// - Returns: An `Interaction` object
101 | ///
102 | @objc(willRespondWithHTTPStatus: headers: body:)
| `- error: Objective-C interoperability is disabled
103 | @discardableResult
104 | public func willRespondWith(status: Int,
/host/spi-builder-workspace/Sources/Interaction.swift:118:4: error: Objective-C interoperability is disabled
116 |
117 | ///
118 | @objc
| `- error: Objective-C interoperability is disabled
119 | func payload() -> [String: Any] {
120 | var payload: [String: Any] = ["description": testDescription,
[7/9] Compiling PactConsumerSwift ErrorReporterXCTest.swift
[8/9] Compiling PactConsumerSwift ErrorReporter.swift
[9/9] Compiling PactConsumerSwift PactVerificationService.swift
/host/spi-builder-workspace/Sources/PactVerificationService.swift:18:12: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
16 |
17 | private lazy var session = {
18 | return URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
19 | }()
20 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:18:39: error: cannot infer contextual base in reference to member 'ephemeral'
16 |
17 | private lazy var session = {
18 | return URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
| `- error: cannot infer contextual base in reference to member 'ephemeral'
19 | }()
20 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:18:82: error: cannot infer contextual base in reference to member 'main'
16 |
17 | private lazy var session = {
18 | return URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
| `- error: cannot infer contextual base in reference to member 'main'
19 | }()
20 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:3:2: error: Objective-C interoperability is disabled
1 | import Foundation
2 |
3 | @objc
| `- error: Objective-C interoperability is disabled
4 | open class PactVerificationService: NSObject {
5 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:9:4: error: Objective-C interoperability is disabled
7 | typealias StringHandler = (Result<String, NSError>) -> Void
8 |
9 | @objc public let url: String
| `- error: Objective-C interoperability is disabled
10 | @objc public let port: Int
11 | @objc public let allowInsecureCertificates: Bool
/host/spi-builder-workspace/Sources/PactVerificationService.swift:10:4: error: Objective-C interoperability is disabled
8 |
9 | @objc public let url: String
10 | @objc public let port: Int
| `- error: Objective-C interoperability is disabled
11 | @objc public let allowInsecureCertificates: Bool
12 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:11:4: error: Objective-C interoperability is disabled
9 | @objc public let url: String
10 | @objc public let port: Int
11 | @objc public let allowInsecureCertificates: Bool
| `- error: Objective-C interoperability is disabled
12 |
13 | open var baseUrl: String {
/host/spi-builder-workspace/Sources/PactVerificationService.swift:22:16: warning: static property 'baseURLString' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | enum Router {
22 | static var baseURLString = "http://example.com"
| |- warning: static property 'baseURLString' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'baseURLString' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'baseURLString' 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
23 |
24 | case clean
/host/spi-builder-workspace/Sources/PactVerificationService.swift:55:35: error: cannot find type 'URLRequest' in scope
53 |
54 | // MARK: URLRequestConvertible
55 | func asURLRequest() throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
56 | guard let url = URL(string: Router.baseURLString) else { throw NSError(domain: "", code: 1, userInfo: nil) }
57 | var urlRequest = URLRequest(url: url.appendingPathComponent(path))
/host/spi-builder-workspace/Sources/PactVerificationService.swift:71:94: error: cannot find type 'URLRequest' in scope
69 | }
70 |
71 | private func jsonEncode(_ request: URLRequest, with parameters: [String: Any]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
72 | var urlRequest = request
73 | let data = try JSONSerialization.data(withJSONObject: parameters, options: [])
/host/spi-builder-workspace/Sources/PactVerificationService.swift:71:40: error: cannot find type 'URLRequest' in scope
69 | }
70 |
71 | private func jsonEncode(_ request: URLRequest, with parameters: [String: Any]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
72 | var urlRequest = request
73 | let data = try JSONSerialization.data(withJSONObject: parameters, options: [])
/host/spi-builder-workspace/Sources/PactVerificationService.swift:82:4: error: Objective-C interoperability is disabled
80 | }
81 |
82 | @objc(initWithUrl: port: allowInsecureCertificate:)
| `- error: Objective-C interoperability is disabled
83 | public init(url: String, port: Int, allowInsecureCertificates: Bool) {
84 | self.url = url
/host/spi-builder-workspace/Sources/PactVerificationService.swift:93:4: error: Objective-C interoperability is disabled
91 | }
92 |
93 | @objc(initWithUrl: port:)
| `- error: Objective-C interoperability is disabled
94 | public convenience init(url: String = "http://localhost", port: Int = 1234) {
95 | self.init(url: url, port: port, allowInsecureCertificates: false)
/host/spi-builder-workspace/Sources/PactVerificationService.swift:98:4: error: Objective-C interoperability is disabled
96 | }
97 |
98 | @objc(initWithUrl: port: session:)
| `- error: Objective-C interoperability is disabled
99 | public convenience init(url: String = "http://localhost", port: Int = 1234, session: URLSession) {
100 | self.init(url: url, port: port, allowInsecureCertificates: false)
/host/spi-builder-workspace/Sources/PactVerificationService.swift:99:88: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
97 |
98 | @objc(initWithUrl: port: session:)
99 | public convenience init(url: String = "http://localhost", port: Int = 1234, session: URLSession) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 | self.init(url: url, port: port, allowInsecureCertificates: false)
101 | self.session = session
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/PactVerificationService.swift:187:57: error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
185 | }
186 |
187 | func handleResponse(result: Result<String, URLSession.APIServiceError>, completion: @escaping VoidHandler) {
| `- error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
188 | switch result {
189 | case .success:
/host/spi-builder-workspace/Sources/PactVerificationService.swift:196:57: error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
194 | }
195 |
196 | func handleResponse(result: Result<String, URLSession.APIServiceError>, completion: @escaping StringHandler) {
| `- error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
197 | switch result {
198 | case .success(let resultString):
/host/spi-builder-workspace/Sources/PactVerificationService.swift:209:36: error: cannot find type 'URLSessionDelegate' in scope
207 | // MARK: - Network request handler
208 |
209 | extension PactVerificationService: URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
210 |
211 | public func urlSession(
/host/spi-builder-workspace/Sources/PactVerificationService.swift:214:46: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
212 | _ session: URLSession,
213 | didReceive challenge: URLAuthenticationChallenge,
214 | completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
215 | ) {
216 | guard
/host/spi-builder-workspace/Sources/PactVerificationService.swift:212:16: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
210 |
211 | public func urlSession(
212 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 | didReceive challenge: URLAuthenticationChallenge,
214 | completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/PactVerificationService.swift:213:27: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
211 | public func urlSession(
212 | _ session: URLSession,
213 | didReceive challenge: URLAuthenticationChallenge,
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
214 | completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
215 | ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' 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 URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/PactVerificationService.swift:231:54: error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
229 | fileprivate func performNetworkRequest(
230 | for router: Router,
231 | completion: @escaping (Result<String, URLSession.APIServiceError>) -> Void
| `- error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
232 | ) {
233 | do {
/host/spi-builder-workspace/Sources/PactVerificationService.swift:276:9: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
274 | }
275 |
276 | private extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
277 |
278 | enum APIServiceError: Error {
/host/spi-builder-workspace/Sources/PactVerificationService.swift:306:22: error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
304 | }
305 |
306 | extension URLSession.APIServiceError: LocalizedError {
| `- error: 'APIServiceError' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
307 |
308 | public var localizedDescription: String {
/host/spi-builder-workspace/Sources/PactVerificationService.swift:57:24: error: cannot find 'URLRequest' in scope
55 | func asURLRequest() throws -> URLRequest {
56 | guard let url = URL(string: Router.baseURLString) else { throw NSError(domain: "", code: 1, userInfo: nil) }
57 | var urlRequest = URLRequest(url: url.appendingPathComponent(path))
| `- error: cannot find 'URLRequest' in scope
58 | urlRequest.httpMethod = method
59 | urlRequest.setValue("true", forHTTPHeaderField: "X-Pact-Mock-Service")
/host/spi-builder-workspace/Sources/PactVerificationService.swift:151:55: error: cannot convert value of type 'PactVerificationService.StringHandler' (aka '(Result<String, NSError>) -> ()') to expected argument type 'PactVerificationService.VoidHandler' (aka '(Result<(), NSError>) -> ()')
149 |
150 | performNetworkRequest(for: Router.setup(payload)) { result in
151 | self.handleResponse(result: result, completion: completion)
| |- error: cannot convert value of type 'PactVerificationService.StringHandler' (aka '(Result<String, NSError>) -> ()') to expected argument type 'PactVerificationService.VoidHandler' (aka '(Result<(), NSError>) -> ()')
| `- note: arguments to generic parameter 'Success' ('Void' and 'String') are expected to be equal
152 | }
153 | }
/host/spi-builder-workspace/Sources/PactVerificationService.swift:168:56: error: cannot convert value of type 'PactVerificationService.StringHandler' (aka '(Result<String, NSError>) -> ()') to expected argument type 'PactVerificationService.VoidHandler' (aka '(Result<(), NSError>) -> ()')
166 |
167 | performNetworkRequest(for: Router.write(payload)) { result in
168 | self.handleResponse(result: result, completion: completion)
| |- error: cannot convert value of type 'PactVerificationService.StringHandler' (aka '(Result<String, NSError>) -> ()') to expected argument type 'PactVerificationService.VoidHandler' (aka '(Result<(), NSError>) -> ()')
| `- note: arguments to generic parameter 'Success' ('Void' and 'String') are expected to be equal
169 | }
170 | }
/host/spi-builder-workspace/Sources/PactVerificationService.swift:218:57: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
216 | guard
217 | allowInsecureCertificates,
218 | challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust,
| `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
219 | ["localhost", "127.0.0.1", "0.0.0.0"].contains(where: challenge.protectionSpace.host.contains),
220 | let serverTrust = challenge.protectionSpace.serverTrust
/host/spi-builder-workspace/Sources/PactVerificationService.swift:218:17: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
216 | guard
217 | allowInsecureCertificates,
218 | challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust,
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
219 | ["localhost", "127.0.0.1", "0.0.0.0"].contains(where: challenge.protectionSpace.host.contains),
220 | let serverTrust = challenge.protectionSpace.serverTrust
/host/spi-builder-workspace/Sources/PactVerificationService.swift:219:71: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
217 | allowInsecureCertificates,
218 | challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust,
219 | ["localhost", "127.0.0.1", "0.0.0.0"].contains(where: challenge.protectionSpace.host.contains),
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
220 | let serverTrust = challenge.protectionSpace.serverTrust
221 | else {
/host/spi-builder-workspace/Sources/PactVerificationService.swift:220:35: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
218 | challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust,
219 | ["localhost", "127.0.0.1", "0.0.0.0"].contains(where: challenge.protectionSpace.host.contains),
220 | let serverTrust = challenge.protectionSpace.serverTrust
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
221 | else {
222 | completionHandler(.performDefaultHandling, nil)
/host/spi-builder-workspace/Sources/PactVerificationService.swift:222:28: error: cannot infer contextual base in reference to member 'performDefaultHandling'
220 | let serverTrust = challenge.protectionSpace.serverTrust
221 | else {
222 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
223 | return
224 | }
/host/spi-builder-workspace/Sources/PactVerificationService.swift:222:52: error: 'nil' requires a contextual type
220 | let serverTrust = challenge.protectionSpace.serverTrust
221 | else {
222 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
223 | return
224 | }
/host/spi-builder-workspace/Sources/PactVerificationService.swift:225:22: error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
223 | return
224 | }
225 | let credential = URLCredential(trust: serverTrust)
| `- error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
226 | completionHandler(.useCredential, credential)
227 | }
/host/spi-builder-workspace/Sources/PactVerificationService.swift:226:24: error: cannot infer contextual base in reference to member 'useCredential'
224 | }
225 | let credential = URLCredential(trust: serverTrust)
226 | completionHandler(.useCredential, credential)
| `- error: cannot infer contextual base in reference to member 'useCredential'
227 | }
228 |
/host/spi-builder-workspace/Sources/PactVerificationService.swift:252:19: error: cannot infer contextual base in reference to member 'failure'
250 | dataTask.resume()
251 | } catch let error {
252 | completion(.failure(.dataTaskError(error)))
| `- error: cannot infer contextual base in reference to member 'failure'
253 | }
254 | }
/host/spi-builder-workspace/Sources/PactVerificationService.swift:252:28: error: cannot infer contextual base in reference to member 'dataTaskError'
250 | dataTask.resume()
251 | } catch let error {
252 | completion(.failure(.dataTaskError(error)))
| `- error: cannot infer contextual base in reference to member 'dataTaskError'
253 | }
254 | }
/host/spi-builder-workspace/Sources/PactVerificationService.swift:287:27: error: cannot find type 'URLRequest' in scope
285 | }
286 |
287 | func dataTask(with url: URLRequest, result: @escaping (Result<(URLResponse, Data), Error>) -> Void) -> URLSessionDataTask {
| `- error: cannot find type 'URLRequest' in scope
288 | return dataTask(with: url) { (data, response, error) in
289 | guard error == nil else {
BUILD FAILURE 6.0 linux