Build Information
Failed to build RestEssentials, reference master (dc7366), with Swift 6.1 for Linux on 20 Apr 2026 14:26:35 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-3":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/sean7512/RestEssentials.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/sean7512/RestEssentials
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at dc7366d remove build file and update package.swift
Cloned https://github.com/sean7512/RestEssentials.git
Revision (git rev-parse @):
dc7366d999f449e2c6eedf30251b80f70c88069a
SUCCESS checkout https://github.com/sean7512/RestEssentials.git at master
========================================
Build
========================================
Selected platform: linux
Swift version: 6.1
Building package at path: $PWD
https://github.com/sean7512/RestEssentials.git
https://github.com/sean7512/RestEssentials.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-3":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
basic-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:a7bfd71e9384436264431030299dc8a2d42d0664a168cfa1a5dd84c9bc592ccf
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/host/spi-builder-workspace/Sources/RestEssentials/Info.plist
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/6] Compiling RestEssentials Deserializer.swift
[4/6] Emitting module RestEssentials
/host/spi-builder-workspace/Sources/RestEssentials/JSON.swift:22:24: warning: static property 'kJSONNull' is not concurrency-safe because non-'Sendable' type 'JSON' may have shared mutable state; this is an error in the Swift 6 language mode
18 |
19 | /// Represents any valid JSON type: another JSON object, an array, a string, a number, or a boolean.
20 | public struct JSON : CustomStringConvertible, ExpressibleByArrayLiteral, ExpressibleByDictionaryLiteral {
| `- note: consider making struct 'JSON' conform to the 'Sendable' protocol
21 |
22 | private static let kJSONNull = JSON(rawValue: Void())
| |- warning: static property 'kJSONNull' is not concurrency-safe because non-'Sendable' type 'JSON' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'kJSONNull' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private let raw: JSONValue
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:16:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | /// - parameter HTTPURLResponse: The HTTPURLResponse from the server
15 | /// - parameter Data: The raw returned data from the server
16 | case unexpectedStatusCode(Int, HTTPURLResponse, Data)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |
18 | /// Indicates that the server responded using an unknown protocol.
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/RestEssentials/RestController.swift:21:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | /// - parameter URLResponse: The response returned form the server.
20 | /// - parameter Data: The raw returned data from the server.
21 | case badResponse(URLResponse, Data)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 | /// Indicates the server's response could not be deserialized using the given Deserializer.
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/RestEssentials/RestController.swift:27:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 | /// - parameter Data: The raw returned data from the server
26 | /// - parameter Error: The original system error (like a DecodingError, etc) that caused the malformedResponse to trigger
27 | case malformedResponse(HTTPURLResponse, Data, Error)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 | }
29 |
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/RestEssentials/RestController.swift:16:10: warning: associated value 'unexpectedStatusCode' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
14 | /// - parameter HTTPURLResponse: The HTTPURLResponse from the server
15 | /// - parameter Data: The raw returned data from the server
16 | case unexpectedStatusCode(Int, HTTPURLResponse, Data)
| `- warning: associated value 'unexpectedStatusCode' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
17 |
18 | /// Indicates that the server responded using an unknown protocol.
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:21:10: warning: associated value 'badResponse' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
19 | /// - parameter URLResponse: The response returned form the server.
20 | /// - parameter Data: The raw returned data from the server.
21 | case badResponse(URLResponse, Data)
| `- warning: associated value 'badResponse' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
22 |
23 | /// Indicates the server's response could not be deserialized using the given Deserializer.
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:27:10: warning: associated value 'malformedResponse' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
25 | /// - parameter Data: The raw returned data from the server
26 | /// - parameter Error: The original system error (like a DecodingError, etc) that caused the malformedResponse to trigger
27 | case malformedResponse(HTTPURLResponse, Data, Error)
| `- warning: associated value 'malformedResponse' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
28 | }
29 |
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:65:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |
64 | private let url: URL
65 | private var session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 |
67 | /// This generator will be called before every useage of this RestController
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/RestEssentials/RestController.swift:106:142: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:106:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
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/RestEssentials/RestController.swift:106:73: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
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/RestEssentials/RestController.swift:115:176: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 | }
114 |
115 | private func dataTask(relativePath: String?, queryItems: [URLQueryItem]?, httpMethod: String, accept: String, payload: Data?, options: RestOptions) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | var restURL: URL
117 | if let relativeURL = relativePath {
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/RestEssentials/RestController.swift:52:41: error: cannot find type 'URLSessionDelegate' in scope
50 | ///
51 | /// **NOTE:** Ensure to configure `App Transport Security` appropriately.
52 | public class RestController : NSObject, URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
53 |
54 | fileprivate static let kDefaultRequestTimeout = 60 as TimeInterval
[5/6] Compiling RestEssentials JSON.swift
/host/spi-builder-workspace/Sources/RestEssentials/JSON.swift:22:24: warning: static property 'kJSONNull' is not concurrency-safe because non-'Sendable' type 'JSON' may have shared mutable state; this is an error in the Swift 6 language mode
18 |
19 | /// Represents any valid JSON type: another JSON object, an array, a string, a number, or a boolean.
20 | public struct JSON : CustomStringConvertible, ExpressibleByArrayLiteral, ExpressibleByDictionaryLiteral {
| `- note: consider making struct 'JSON' conform to the 'Sendable' protocol
21 |
22 | private static let kJSONNull = JSON(rawValue: Void())
| |- warning: static property 'kJSONNull' is not concurrency-safe because non-'Sendable' type 'JSON' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'kJSONNull' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 |
24 | private let raw: JSONValue
/host/spi-builder-workspace/Sources/RestEssentials/JSON.swift:27:35: error: value of type 'AnyObject' has no member 'description'
25 |
26 | public var description: String {
27 | return (raw as AnyObject).description
| `- error: value of type 'AnyObject' has no member 'description'
28 | }
29 |
[6/6] Compiling RestEssentials RestController.swift
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:16:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | /// - parameter HTTPURLResponse: The HTTPURLResponse from the server
15 | /// - parameter Data: The raw returned data from the server
16 | case unexpectedStatusCode(Int, HTTPURLResponse, Data)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |
18 | /// Indicates that the server responded using an unknown protocol.
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/RestEssentials/RestController.swift:21:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | /// - parameter URLResponse: The response returned form the server.
20 | /// - parameter Data: The raw returned data from the server.
21 | case badResponse(URLResponse, Data)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 | /// Indicates the server's response could not be deserialized using the given Deserializer.
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/RestEssentials/RestController.swift:27:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 | /// - parameter Data: The raw returned data from the server
26 | /// - parameter Error: The original system error (like a DecodingError, etc) that caused the malformedResponse to trigger
27 | case malformedResponse(HTTPURLResponse, Data, Error)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 | }
29 |
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/RestEssentials/RestController.swift:16:10: warning: associated value 'unexpectedStatusCode' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
14 | /// - parameter HTTPURLResponse: The HTTPURLResponse from the server
15 | /// - parameter Data: The raw returned data from the server
16 | case unexpectedStatusCode(Int, HTTPURLResponse, Data)
| `- warning: associated value 'unexpectedStatusCode' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
17 |
18 | /// Indicates that the server responded using an unknown protocol.
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:21:10: warning: associated value 'badResponse' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
19 | /// - parameter URLResponse: The response returned form the server.
20 | /// - parameter Data: The raw returned data from the server.
21 | case badResponse(URLResponse, Data)
| `- warning: associated value 'badResponse' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'URLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
22 |
23 | /// Indicates the server's response could not be deserialized using the given Deserializer.
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:27:10: warning: associated value 'malformedResponse' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
25 | /// - parameter Data: The raw returned data from the server
26 | /// - parameter Error: The original system error (like a DecodingError, etc) that caused the malformedResponse to trigger
27 | case malformedResponse(HTTPURLResponse, Data, Error)
| `- warning: associated value 'malformedResponse' of 'Sendable'-conforming enum 'NetworkingError' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject'); this is an error in the Swift 6 language mode
28 | }
29 |
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:65:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |
64 | private let url: URL
65 | private var session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 |
67 | /// This generator will be called before every useage of this RestController
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/RestEssentials/RestController.swift:106:142: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:106:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
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/RestEssentials/RestController.swift:106:73: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
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/RestEssentials/RestController.swift:115:176: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 | }
114 |
115 | private func dataTask(relativePath: String?, queryItems: [URLQueryItem]?, httpMethod: String, accept: String, payload: Data?, options: RestOptions) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | var restURL: URL
117 | if let relativeURL = relativePath {
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/RestEssentials/RestController.swift:52:41: error: cannot find type 'URLSessionDelegate' in scope
50 | ///
51 | /// **NOTE:** Ensure to configure `App Transport Security` appropriately.
52 | public class RestController : NSObject, URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
53 |
54 | fileprivate static let kDefaultRequestTimeout = 60 as TimeInterval
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:79:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
77 | private init(url: URL) {
78 | self.url = url
79 | self.session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
80 | }
81 |
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:102:34: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 | public static func make(url: URL) -> RestController {
101 | let restController = RestController(url: url)
102 | restController.session = URLSession(configuration: URLSessionConfiguration.default, delegate: restController, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
103 | return restController
104 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:102:84: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
100 | public static func make(url: URL) -> RestController {
101 | let restController = RestController(url: url)
102 | restController.session = URLSession(configuration: URLSessionConfiguration.default, delegate: restController, delegateQueue: nil)
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
103 | return restController
104 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:102:134: error: 'nil' requires a contextual type
100 | public static func make(url: URL) -> RestController {
101 | let restController = RestController(url: url)
102 | restController.session = URLSession(configuration: URLSessionConfiguration.default, delegate: restController, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
103 | return restController
104 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:107:93: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
| `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
109 | completionHandler(.useCredential, credential);
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:107:53: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
109 | completionHandler(.useCredential, credential);
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:107:143: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
109 | completionHandler(.useCredential, credential);
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:108:30: error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
| `- error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
109 | completionHandler(.useCredential, credential);
110 | } else {
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:108:61: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
109 | completionHandler(.useCredential, credential);
110 | } else {
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:109:32: error: cannot infer contextual base in reference to member 'useCredential'
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
109 | completionHandler(.useCredential, credential);
| `- error: cannot infer contextual base in reference to member 'useCredential'
110 | } else {
111 | completionHandler(.performDefaultHandling, nil)
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:111:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
109 | completionHandler(.useCredential, credential);
110 | } else {
111 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
112 | }
113 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:111:56: error: 'nil' requires a contextual type
109 | completionHandler(.useCredential, credential);
110 | } else {
111 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
112 | }
113 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:125:51: error: 'URLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
123 | if let queryItems, !queryItems.isEmpty {
124 | guard var components = URLComponents(url: restURL, resolvingAgainstBaseURL: false) else {
125 | throw NetworkingError.badResponse(URLResponse(), Data())
| `- error: 'URLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
126 | }
127 | var existingItems = components.queryItems ?? []
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:131:51: error: 'URLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
129 | components.queryItems = existingItems
130 | guard let urlWithQuery = components.url else {
131 | throw NetworkingError.badResponse(URLResponse(), Data())
| `- error: 'URLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
132 | }
133 | restURL = urlWithQuery
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:136:23: error: cannot find 'URLRequest' in scope
134 | }
135 |
136 | var request = URLRequest(url: restURL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: options.requestTimeoutSeconds)
| `- error: cannot find 'URLRequest' in scope
137 | request.httpMethod = httpMethod
138 |
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:136:62: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
134 | }
135 |
136 | var request = URLRequest(url: restURL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: options.requestTimeoutSeconds)
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
137 | request.httpMethod = httpMethod
138 |
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:157:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
155 | }
156 |
157 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
158 | guard let httpResponse = response as? HTTPURLResponse else {
159 | throw NetworkingError.badResponse(response, data)
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-3":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:a7bfd71e9384436264431030299dc8a2d42d0664a168cfa1a5dd84c9bc592ccf
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:basic-6.1-latest
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/host/spi-builder-workspace/Sources/RestEssentialsTests/Info.plist
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/host/spi-builder-workspace/Sources/RestEssentials/Info.plist
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/5] Emitting module RestEssentials
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:16:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | /// - parameter HTTPURLResponse: The HTTPURLResponse from the server
15 | /// - parameter Data: The raw returned data from the server
16 | case unexpectedStatusCode(Int, HTTPURLResponse, Data)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |
18 | /// Indicates that the server responded using an unknown protocol.
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/RestEssentials/RestController.swift:21:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | /// - parameter URLResponse: The response returned form the server.
20 | /// - parameter Data: The raw returned data from the server.
21 | case badResponse(URLResponse, Data)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 | /// Indicates the server's response could not be deserialized using the given Deserializer.
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/RestEssentials/RestController.swift:27:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 | /// - parameter Data: The raw returned data from the server
26 | /// - parameter Error: The original system error (like a DecodingError, etc) that caused the malformedResponse to trigger
27 | case malformedResponse(HTTPURLResponse, Data, Error)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 | }
29 |
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/RestEssentials/RestController.swift:65:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |
64 | private let url: URL
65 | private var session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 |
67 | /// This generator will be called before every useage of this RestController
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/RestEssentials/RestController.swift:106:142: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:106:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
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/RestEssentials/RestController.swift:106:73: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
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/RestEssentials/RestController.swift:115:176: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 | }
114 |
115 | private func dataTask(relativePath: String?, queryItems: [URLQueryItem]?, httpMethod: String, accept: String, payload: Data?, options: RestOptions) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | var restURL: URL
117 | if let relativeURL = relativePath {
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/RestEssentials/RestController.swift:52:41: error: cannot find type 'URLSessionDelegate' in scope
50 | ///
51 | /// **NOTE:** Ensure to configure `App Transport Security` appropriately.
52 | public class RestController : NSObject, URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
53 |
54 | fileprivate static let kDefaultRequestTimeout = 60 as TimeInterval
[3/5] Compiling RestEssentials Deserializer.swift
[4/5] Compiling RestEssentials JSON.swift
/host/spi-builder-workspace/Sources/RestEssentials/JSON.swift:27:35: error: value of type 'AnyObject' has no member 'description'
25 |
26 | public var description: String {
27 | return (raw as AnyObject).description
| `- error: value of type 'AnyObject' has no member 'description'
28 | }
29 |
[5/5] Compiling RestEssentials RestController.swift
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:16:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | /// - parameter HTTPURLResponse: The HTTPURLResponse from the server
15 | /// - parameter Data: The raw returned data from the server
16 | case unexpectedStatusCode(Int, HTTPURLResponse, Data)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |
18 | /// Indicates that the server responded using an unknown protocol.
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/RestEssentials/RestController.swift:21:22: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | /// - parameter URLResponse: The response returned form the server.
20 | /// - parameter Data: The raw returned data from the server.
21 | case badResponse(URLResponse, Data)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 | /// Indicates the server's response could not be deserialized using the given Deserializer.
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/RestEssentials/RestController.swift:27:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 | /// - parameter Data: The raw returned data from the server
26 | /// - parameter Error: The original system error (like a DecodingError, etc) that caused the malformedResponse to trigger
27 | case malformedResponse(HTTPURLResponse, Data, Error)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 | }
29 |
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/RestEssentials/RestController.swift:65:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |
64 | private let url: URL
65 | private var session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 |
67 | /// This generator will be called before every useage of this RestController
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/RestEssentials/RestController.swift:106:142: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:106:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
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/RestEssentials/RestController.swift:106:73: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
104 | }
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
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/RestEssentials/RestController.swift:115:176: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 | }
114 |
115 | private func dataTask(relativePath: String?, queryItems: [URLQueryItem]?, httpMethod: String, accept: String, payload: Data?, options: RestOptions) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | var restURL: URL
117 | if let relativeURL = relativePath {
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/RestEssentials/RestController.swift:52:41: error: cannot find type 'URLSessionDelegate' in scope
50 | ///
51 | /// **NOTE:** Ensure to configure `App Transport Security` appropriately.
52 | public class RestController : NSObject, URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
53 |
54 | fileprivate static let kDefaultRequestTimeout = 60 as TimeInterval
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:79:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
77 | private init(url: URL) {
78 | self.url = url
79 | self.session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
80 | }
81 |
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:102:34: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 | public static func make(url: URL) -> RestController {
101 | let restController = RestController(url: url)
102 | restController.session = URLSession(configuration: URLSessionConfiguration.default, delegate: restController, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
103 | return restController
104 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:102:84: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
100 | public static func make(url: URL) -> RestController {
101 | let restController = RestController(url: url)
102 | restController.session = URLSession(configuration: URLSessionConfiguration.default, delegate: restController, delegateQueue: nil)
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
103 | return restController
104 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:102:134: error: 'nil' requires a contextual type
100 | public static func make(url: URL) -> RestController {
101 | let restController = RestController(url: url)
102 | restController.session = URLSession(configuration: URLSessionConfiguration.default, delegate: restController, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
103 | return restController
104 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:107:93: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
| `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
109 | completionHandler(.useCredential, credential);
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:107:53: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
109 | completionHandler(.useCredential, credential);
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:107:143: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
105 |
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
109 | completionHandler(.useCredential, credential);
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:108:30: error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
| `- error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
109 | completionHandler(.useCredential, credential);
110 | } else {
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:108:61: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
106 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
| `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
109 | completionHandler(.useCredential, credential);
110 | } else {
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:109:32: error: cannot infer contextual base in reference to member 'useCredential'
107 | if(acceptSelfSignedCertificate && challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust && challenge.protectionSpace.host == url.host) {
108 | let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
109 | completionHandler(.useCredential, credential);
| `- error: cannot infer contextual base in reference to member 'useCredential'
110 | } else {
111 | completionHandler(.performDefaultHandling, nil)
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:111:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
109 | completionHandler(.useCredential, credential);
110 | } else {
111 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
112 | }
113 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:111:56: error: 'nil' requires a contextual type
109 | completionHandler(.useCredential, credential);
110 | } else {
111 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
112 | }
113 | }
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:125:51: error: 'URLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
123 | if let queryItems, !queryItems.isEmpty {
124 | guard var components = URLComponents(url: restURL, resolvingAgainstBaseURL: false) else {
125 | throw NetworkingError.badResponse(URLResponse(), Data())
| `- error: 'URLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
126 | }
127 | var existingItems = components.queryItems ?? []
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:131:51: error: 'URLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
129 | components.queryItems = existingItems
130 | guard let urlWithQuery = components.url else {
131 | throw NetworkingError.badResponse(URLResponse(), Data())
| `- error: 'URLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
132 | }
133 | restURL = urlWithQuery
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:136:23: error: cannot find 'URLRequest' in scope
134 | }
135 |
136 | var request = URLRequest(url: restURL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: options.requestTimeoutSeconds)
| `- error: cannot find 'URLRequest' in scope
137 | request.httpMethod = httpMethod
138 |
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:136:62: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
134 | }
135 |
136 | var request = URLRequest(url: restURL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: options.requestTimeoutSeconds)
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
137 | request.httpMethod = httpMethod
138 |
/host/spi-builder-workspace/Sources/RestEssentials/RestController.swift:157:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
155 | }
156 |
157 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
158 | guard let httpResponse = response as? HTTPURLResponse else {
159 | throw NetworkingError.badResponse(response, data)
BUILD FAILURE 6.1 linux