Build Information
Failed to build Exoscale, reference v0.2.0 (07946c), with Swift 6.3 for Wasm on 18 Oct 2026 21:46:24 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344843-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1Build Log
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[487/554] Compiling Exoscale AI.swift
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[488/554] Compiling Exoscale AIAPIKey.swift
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[489/554] Compiling Exoscale AITypes.swift
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[490/554] Compiling Exoscale AntiAffinityGroups.swift
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[491/554] Compiling Exoscale DeployTargets.swift
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[492/554] Compiling Exoscale Instance.swift
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[493/554] Compiling Exoscale InstancePool.swift
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[494/554] Compiling Exoscale InstancePools.swift
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
error: emit-module command failed with exit code 1 (use -v to see invocation)
[495/563] Emitting module Exoscale
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Exoscale.swift:26:69: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
/host/spi-builder-workspace/Sources/Exoscale.swift:26:96: error: value of type '_' expected to be instance of class or class-constrained type
24 | /// answer requests locally in tests.
25 | /// - Throws: ``ClientError/invalidZone(_:)`` when the zone can't be part of a hostname.
26 | public init(configuration: Configuration, sessionConfiguration: URLSessionConfiguration = .default) throws {
| `- error: value of type '_' expected to be instance of class or class-constrained type
27 | self.configuration = configuration
28 | client = try HTTPClient(configuration: configuration, sessionConfiguration: sessionConfiguration)
[496/563] Compiling Exoscale LoadBalancer.swift
[497/563] Compiling Exoscale LoadBalancers.swift
[498/563] Compiling Exoscale NetworkTypes.swift
[499/563] Compiling Exoscale PrivateNetworks.swift
[500/563] Compiling Exoscale ReverseDNS.swift
[501/563] Compiling Exoscale SecurityGroup.swift
[502/563] Compiling Exoscale SecurityGroups.swift
[503/563] Compiling Exoscale VPC.swift
[504/563] Compiling Exoscale VPCs.swift
[505/563] Compiling Exoscale Operation.swift
[506/563] Compiling Exoscale Operations.swift
[507/563] Compiling Exoscale EnvironmentalImpact.swift
[508/563] Compiling Exoscale Organization.swift
[509/563] Compiling Exoscale Zones.swift
[510/563] Compiling Exoscale BlockStorage.swift
[511/563] Compiling Exoscale ObjectStorage.swift
[512/563] Compiling Exoscale ObjectStorageCounting.swift
[513/563] Compiling Exoscale ObjectStorageEmptying.swift
[514/563] Compiling Exoscale OpenSearchService.swift
[515/563] Compiling Exoscale OpenSearchServices.swift
[516/563] Compiling Exoscale PostgresService.swift
[517/563] Compiling Exoscale PostgresServices.swift
[518/563] Compiling Exoscale Thanos.swift
[519/563] Compiling Exoscale Valkey.swift
[520/563] Compiling Exoscale Domains.swift
[521/563] Compiling Exoscale Events.swift
[522/563] Compiling Exoscale Policy.swift
[523/563] Compiling Exoscale Roles.swift
[524/563] Compiling Exoscale Users.swift
[525/563] Compiling Exoscale Crypto.swift
[526/563] Compiling Exoscale KMSKey.swift
[527/563] Compiling Exoscale KMSKeys.swift
[528/563] Compiling Exoscale KeyStores.swift
[529/563] Compiling Exoscale SKSCluster.swift
[530/563] Compiling Exoscale SKSClusters.swift
[531/563] Compiling Exoscale SKSNodepool.swift
[532/563] Compiling Exoscale SKSNodepools.swift
[533/563] Compiling Exoscale ElasticIPs.swift
[534/563] Compiling Exoscale DBaaSEngineCalls.swift
[535/563] Compiling Exoscale DBaaSNodes.swift
[536/563] Compiling Exoscale DBaaSService.swift
[537/563] Compiling Exoscale DBaaSServiceType.swift
[538/563] Compiling Exoscale DBaaSTypes.swift
[539/563] Compiling Exoscale ExternalEndpoints.swift
[540/563] Compiling Exoscale Grafana.swift
[541/563] Compiling Exoscale KafkaService.swift
[542/563] Compiling Exoscale KafkaServices.swift
[543/563] Compiling Exoscale MySQL.swift
[544/563] Compiling Exoscale InstanceType.swift
[545/563] Compiling Exoscale InstanceTypes.swift
[546/563] Compiling Exoscale Instances.swift
[547/563] Compiling Exoscale SSHKeys.swift
[548/563] Compiling Exoscale Snapshots.swift
[549/563] Compiling Exoscale Template.swift
[550/563] Compiling Exoscale Templates.swift
[551/563] Compiling Exoscale ClickHouseService.swift
[552/563] Compiling Exoscale ClickHouseServices.swift
[553/563] Compiling Exoscale DBaaS.swift
[554/563] Compiling Exoscale Configuration.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[555/563] Compiling Exoscale Errors.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[556/563] Compiling Exoscale HTTPClient.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[557/563] Compiling Exoscale JSON.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[558/563] Compiling Exoscale JSONValue.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[559/563] Compiling Exoscale Path.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[560/563] Compiling Exoscale Reference.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[561/563] Compiling Exoscale RequestSigner.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[562/563] Compiling Exoscale S3Client.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
[563/563] Compiling Exoscale S3Signer.swift
/host/spi-builder-workspace/Sources/Core/Errors.swift:29:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
27 | /// A summary of the status, followed by the API's explanation.
28 | public var errorDescription: String? {
29 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
30 | let status = "The API returned HTTP \(statusCode) (\(reason))."
31 | return message.map { "\(status) \($0)" } ?? status
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/HTTPClient.swift:21:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | private let session: URLSession
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | guard let endpoint = configuration.zone.apiEndpoint else {
23 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:122:17: error: cannot find type 'URLRequest' in scope
120 | query: [String: String?] = [:],
121 | body: (any Encodable & Sendable)? = nil
122 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
123 | if let component = path.invalidComponent {
124 | throw Exoscale.ClientError.invalidPathComponent(component)
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:19:17: error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
17 | let userAgent: String
18 | private let signer: RequestSigner
19 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'HTTPClient' has non-Sendable type 'AnyObject'
20 |
21 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:28:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | userAgent = configuration.userAgent
27 | signer = RequestSigner(apiKey: configuration.apiKey, apiSecret: configuration.apiSecret)
28 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:32:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
30 |
31 | deinit {
32 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
33 | }
34 |
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:61: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:16:26: error: cannot find type 'URLRequest' in scope
14 |
15 | /// Returns `request` with an `Authorization` header valid until ``validity`` after `now`.
16 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
17 | // Requests are built from a valid base URL, so they always have a URL.
18 | let url = request.url!
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:92:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | try Task.checkCancellation()
91 | let request = try signer.sign(makeRequest(method, path, query: query, body: body))
92 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
93 | try Task.checkCancellation()
94 |
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:107:86: error: cannot infer contextual base in reference to member 'whitespaces'
105 | // An omitted Content-Type is accepted; decoding still checks the body.
106 | if !data.isEmpty, let contentType = response.value(forHTTPHeaderField: "Content-Type") {
107 | let mediaType = contentType.prefix { $0 != ";" }.trimmingCharacters(in: .whitespaces).lowercased()
| `- error: cannot infer contextual base in reference to member 'whitespaces'
108 | guard mediaType == "application/json" ||
109 | (mediaType.hasPrefix("application/") && mediaType.hasSuffix("+json"))
/host/spi-builder-workspace/Sources/Core/HTTPClient.swift:139:23: error: cannot find 'URLRequest' in scope
137 | }
138 |
139 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
140 | request.httpMethod = method.rawValue
141 | request.setValue(userAgent, forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:23:26: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
21 |
22 | // Repeated query parameters can't be signed, so only parameters present once are.
23 | let parameters = Dictionary(grouping: components?.queryItems ?? [], by: \.name)
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
24 | .filter { $0.value.count == 1 }
25 | .sorted { $0.key < $1.key }
/host/spi-builder-workspace/Sources/Core/RequestSigner.swift:42:70: error: cannot infer key path type from context; consider explicitly specifying a root type
40 | var authorization = ["EXO2-HMAC-SHA256 credential=\(apiKey)"]
41 | if !parameters.isEmpty {
42 | authorization.append("signed-query-args=\(parameters.map(\.key).joined(separator: ";"))")
| `- error: cannot infer key path type from context; consider explicitly specifying a root type
43 | }
44 | authorization.append("expires=\(expires)")
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
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/Core/S3Client.swift:13:71: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | private let session: URLSession
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | guard let endpoint = configuration.zone.sosEndpoint else {
15 | throw Exoscale.ClientError.invalidZone(configuration.zone.rawValue)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Core/S3Client.swift:11:17: error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
9 | let userAgent: String
10 | private let signer: S3Signer
11 | private let session: URLSession
| `- error: stored property 'session' of 'Sendable'-conforming class 'S3Client' has non-Sendable type 'AnyObject'
12 |
13 | init(configuration: Exoscale.Configuration, sessionConfiguration: URLSessionConfiguration) throws {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:24:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
22 | region: configuration.zone.rawValue
23 | )
24 | session = URLSession(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
25 | }
26 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:28:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
26 |
27 | deinit {
28 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
29 | }
30 |
/host/spi-builder-workspace/Sources/Core/S3Client.swift:53:23: error: cannot find 'URLRequest' in scope
51 | .sorted { $0.name < $1.name }
52 | }
53 | var request = URLRequest(url: components.url!)
| `- error: cannot find 'URLRequest' in scope
54 | request.httpMethod = method.rawValue
55 | request.httpBody = body
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:61: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:21:26: error: cannot find type 'URLRequest' in scope
19 | /// The headers signed are `Host`, any `Range`, `Content-Type` and `Content-MD5`, and every
20 | /// `x-amz-` header.
21 | func sign(_ request: URLRequest, now: Date = Date()) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
22 | var signed = request
23 | // Requests are built from a valid base URL, so they always have a URL.
/host/spi-builder-workspace/Sources/Core/S3Client.swift:61:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
59 | }
60 |
61 | let (data, response) = try await session.data(for: signer.sign(request))
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
62 | try Task.checkCancellation()
63 | guard let response = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/Core/S3Client.swift:117:42: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
115 | return message
116 | }
117 | let reason = HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
118 | return ["Object Storage returned HTTP \(statusCode) (\(reason)).", code].compactMap(\.self)
119 | .joined(separator: " ")
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:31:57: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
29 |
30 | var headers = ["host": Self.host(of: url)]
31 | for (name, value) in signed.allHTTPHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:34:63: error: cannot infer contextual base in reference to member 'whitespaces'
32 | let name = name.lowercased()
33 | if name.hasPrefix("x-amz-") || ["range", "content-type", "content-md5"].contains(name) {
34 | headers[name] = value.trimmingCharacters(in: .whitespaces)
| `- error: cannot infer contextual base in reference to member 'whitespaces'
35 | }
36 | }
/host/spi-builder-workspace/Sources/Core/S3Signer.swift:45:32: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
43 | .map { ($0.name, $0.value ?? "") }
44 | .sorted { $0 < $1 }
45 | .map { "\($0)=\($1)" }
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
46 | .joined(separator: "&")
47 | let canonicalRequest = [
BUILD FAILURE 6.3 wasm