Build Information
Failed to build APIManager, reference main (c8b6b4
), with Swift 6.0 for Linux on 30 Oct 2024 23:16:49 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/rauhul/api-manager.git
Reference: main
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/rauhul/api-manager
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at c8b6b42 Migrate to swift 5.0+, remove Cocopods for SPM
Cloned https://github.com/rauhul/api-manager.git
Revision (git rev-parse @):
c8b6b426a4172cf1cd4568601cf36b6437d65ae8
SUCCESS checkout https://github.com/rauhul/api-manager.git at main
========================================
Build
========================================
Selected platform: linux
Swift version: 6.0
Building package at path: $PWD
https://github.com/rauhul/api-manager.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
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/9] Compiling APIManager HTTP.swift
[4/9] Compiling APIManager APIReturnable.swift
[5/9] Compiling APIManager Dictionary.swift
[6/9] Compiling APIManager APIService.swift
/host/spi-builder-workspace/Sources/APIManager/APIService.swift:67:47: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
65 | static func validate(statusCode: Int) throws {
66 | if !(200..<300).contains(statusCode) {
67 | let description = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
68 | throw APIRequestError.invalidHTTPReponse(code: statusCode, description: description)
69 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/9] Compiling APIManager APIAuthorization.swift
[8/9] Emitting module APIManager
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:58:6: error: Objective-C interoperability is disabled
56 | private var _state: APIRequestState = .ready
57 | /// Objective-C visible setter and getter for `_state`.
58 | @objc private dynamic var state: APIRequestState {
| `- error: Objective-C interoperability is disabled
59 | get { return stateQueue.sync { _state } }
60 | set { stateQueue.sync(flags: .barrier) { _state = newValue } }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:71:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 | public final override var isAsynchronous: Bool { return true }
70 | /// The `URLSessionDataTask` backing the request.
71 | private var dataTask: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
72 |
73 | // MARK: - Request Properties
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:6: error: Objective-C interoperability is disabled
91 | // MARK: - Private API
92 | /// Registers the dependent keys for `isReady`.
93 | @objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
| `- error: Objective-C interoperability is disabled
94 | /// Registers the dependent keys for `isExecuting`.
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:6: error: Objective-C interoperability is disabled
93 | @objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
94 | /// Registers the dependent keys for `isExecuting`.
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
| `- error: Objective-C interoperability is disabled
96 | /// Registers the dependent keys for `isFinished`.
97 | @objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:6: error: Objective-C interoperability is disabled
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
96 | /// Registers the dependent keys for `isFinished`.
97 | @objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
| `- error: Objective-C interoperability is disabled
98 |
99 | /// Creates a `URLRequest` representing the request.
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:100:45: error: cannot find type 'URLRequest' in scope
98 |
99 | /// Creates a `URLRequest` representing the request.
100 | private func formURLRequest() throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
101 | let parameters = Dictionary(service.parameters, self.parameters, authorization?.parametersFor(request: self))
102 | let body = Dictionary(service.body, self.body, authorization?.bodyFor(request: self))
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:129:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
127 |
128 | /// The completion handler for the `URLSessionDataTask` backing the request.
129 | private func urlRequestCallback(data: Data?, response: URLResponse?, error: Error?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | if let error = error {
131 | if (error as NSError).code == NSURLErrorCancelled {
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:46:12: warning: class 'APIRequest' must restate inherited '@unchecked Sendable' conformance
44 | /// - note: `APIRequest`s should be created through a class that conforms to
45 | /// `APIService`.
46 | open class APIRequest<ReturnType: APIReturnable>: Operation {
| `- warning: class 'APIRequest' must restate inherited '@unchecked Sendable' conformance
47 |
48 | // MARK: - Types & Aliases
[9/9] Compiling APIManager APIRequest.swift
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:58:6: error: Objective-C interoperability is disabled
56 | private var _state: APIRequestState = .ready
57 | /// Objective-C visible setter and getter for `_state`.
58 | @objc private dynamic var state: APIRequestState {
| `- error: Objective-C interoperability is disabled
59 | get { return stateQueue.sync { _state } }
60 | set { stateQueue.sync(flags: .barrier) { _state = newValue } }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:71:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 | public final override var isAsynchronous: Bool { return true }
70 | /// The `URLSessionDataTask` backing the request.
71 | private var dataTask: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
72 |
73 | // MARK: - Request Properties
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:6: error: Objective-C interoperability is disabled
91 | // MARK: - Private API
92 | /// Registers the dependent keys for `isReady`.
93 | @objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
| `- error: Objective-C interoperability is disabled
94 | /// Registers the dependent keys for `isExecuting`.
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:6: error: Objective-C interoperability is disabled
93 | @objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
94 | /// Registers the dependent keys for `isExecuting`.
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
| `- error: Objective-C interoperability is disabled
96 | /// Registers the dependent keys for `isFinished`.
97 | @objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:6: error: Objective-C interoperability is disabled
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
96 | /// Registers the dependent keys for `isFinished`.
97 | @objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
| `- error: Objective-C interoperability is disabled
98 |
99 | /// Creates a `URLRequest` representing the request.
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:100:45: error: cannot find type 'URLRequest' in scope
98 |
99 | /// Creates a `URLRequest` representing the request.
100 | private func formURLRequest() throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
101 | let parameters = Dictionary(service.parameters, self.parameters, authorization?.parametersFor(request: self))
102 | let body = Dictionary(service.body, self.body, authorization?.bodyFor(request: self))
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:129:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
127 |
128 | /// The completion handler for the `URLSessionDataTask` backing the request.
129 | private func urlRequestCallback(data: Data?, response: URLResponse?, error: Error?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | if let error = error {
131 | if (error as NSError).code == NSURLErrorCancelled {
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:46:12: warning: class 'APIRequest' must restate inherited '@unchecked Sendable' conformance
44 | /// - note: `APIRequest`s should be created through a class that conforms to
45 | /// `APIService`.
46 | open class APIRequest<ReturnType: APIReturnable>: Operation {
| `- warning: class 'APIRequest' must restate inherited '@unchecked Sendable' conformance
47 |
48 | // MARK: - Types & Aliases
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:99: error: '#keyPath' can only be used with the Objective-C runtime
91 | // MARK: - Private API
92 | /// Registers the dependent keys for `isReady`.
93 | @objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
| `- error: '#keyPath' can only be used with the Objective-C runtime
94 | /// Registers the dependent keys for `isExecuting`.
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:103: error: '#keyPath' can only be used with the Objective-C runtime
93 | @objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
94 | /// Registers the dependent keys for `isExecuting`.
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
| `- error: '#keyPath' can only be used with the Objective-C runtime
96 | /// Registers the dependent keys for `isFinished`.
97 | @objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:102: error: '#keyPath' can only be used with the Objective-C runtime
95 | @objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
96 | /// Registers the dependent keys for `isFinished`.
97 | @objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
| `- error: '#keyPath' can only be used with the Objective-C runtime
98 |
99 | /// Creates a `URLRequest` representing the request.
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:114:23: error: cannot find 'URLRequest' in scope
112 | }
113 |
114 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
115 | request.httpMethod = method.rawValue
116 |
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:136:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
134 | completion?(.failure(error))
135 | }
136 | } else if let response = response as? HTTPURLResponse, let data = data {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
137 | let result = Result { () -> (ReturnType, HTTPCookies) in
138 | try service.validate(statusCode: response.statusCode)
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:136:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 | completion?(.failure(error))
135 | }
136 | } else if let response = response as? HTTPURLResponse, let data = data {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
137 | let result = Result { () -> (ReturnType, HTTPCookies) in
138 | try service.validate(statusCode: response.statusCode)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:138:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
136 | } else if let response = response as? HTTPURLResponse, let data = data {
137 | let result = Result { () -> (ReturnType, HTTPCookies) in
138 | try service.validate(statusCode: response.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
139 | return (try ReturnType.init(from: data), response.allHeaderFields)
140 | }
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:160:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
158 | do {
159 | let urlRequest = try formURLRequest()
160 | dataTask = URLSession.shared.dataTask(with: urlRequest, completionHandler: urlRequestCallback)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
161 | dataTask?.resume()
162 | } catch {
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:161:23: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
159 | let urlRequest = try formURLRequest()
160 | dataTask = URLSession.shared.dataTask(with: urlRequest, completionHandler: urlRequestCallback)
161 | dataTask?.resume()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
162 | } catch {
163 | completion?(.failure(error))
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:224:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
222 | /// Cancels an in-flight request.
223 | open override func cancel() {
224 | dataTask?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
225 | super.cancel()
226 | }
BUILD FAILURE 6.0 linux