Build Information
Failed to build UnleashProxyClientSwift, reference 2.5.2 (033bf6), with Swift 6.1 for Linux on 17 Aug 2026 15:45:41 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-53886769-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:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1Build Log
========================================
RunAll
========================================
Builder version: 5.0.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Unleash/unleash-ios-sdk.git
Reference: 2.5.2
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/Unleash/unleash-ios-sdk
* tag 2.5.2 -> FETCH_HEAD
HEAD is now at 033bf6d chore: release 2.5.2 (#147)
Cloned https://github.com/Unleash/unleash-ios-sdk.git
Revision (git rev-parse @):
033bf6dbf5e1605f4839198a3173e77c91360d8b
SUCCESS checkout https://github.com/Unleash/unleash-ios-sdk.git at 2.5.2
========================================
Build
========================================
Selected platform: linux
Swift version: 6.1
Building package at path: $PWD
https://github.com/Unleash/unleash-ios-sdk.git
https://github.com/Unleash/unleash-ios-sdk.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-53886769-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:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
basic-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:dff62030f4387a2d827d2b365d39a91716bd1d13650763ccbcbfe23419000563
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:basic-6.1-latest
Fetching https://github.com/cesarferreira/SwiftEventBus.git
[1/617] Fetching swifteventbus
Fetched https://github.com/cesarferreira/SwiftEventBus.git from cache (0.47s)
Computing version for https://github.com/cesarferreira/SwiftEventBus.git
Computed https://github.com/cesarferreira/SwiftEventBus.git at 5.3.0 (0.68s)
Creating working copy for https://github.com/cesarferreira/SwiftEventBus.git
Working copy of https://github.com/cesarferreira/SwiftEventBus.git resolved at 5.3.0
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-24593BA9C3E375BF.txt
[4/5] Emitting module SwiftEventBus
[5/5] Compiling SwiftEventBus SwiftEventBus.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/29] Emitting module UnleashProxyClientSwift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:36:16: warning: static property 'defaultDisabled' is not concurrency-safe because non-'Sendable' type 'Variant' may have shared mutable state; this is an error in the Swift 6 language mode
1 | // MARK: - Variant
2 |
3 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
4 | enum CodingKeys: String, CodingKey {
5 | case name, enabled, payload
:
34 |
35 | extension Variant {
36 | static let defaultDisabled = Variant(
| |- warning: static property 'defaultDisabled' is not concurrency-safe because non-'Sendable' type 'Variant' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaultDisabled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
37 | name: "disabled",
38 | enabled: false,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:148:42: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | func createRequest(payload: Data) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
150 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:27:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
25 | unleashUrl: URL,
26 | apiKey: String,
27 | session: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
28 | storageProvider: StorageProvider = DictionaryStorageProvider(),
29 | customHeaders: [String: String] = [:],
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:252:71: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | }
6 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:12:24: warning: static property '_showPrintStatements' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 | class Printer {
11 | private static let lock = NSLock()
12 | private static var _showPrintStatements = false
| |- warning: static property '_showPrintStatements' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert '_showPrintStatements' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property '_showPrintStatements' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | static var showPrintStatements: Bool {
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:3:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
1 | import Foundation
2 |
3 | extension URLSession: PollerSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { data, response, error in
[8/32] Compiling UnleashProxyClientSwift Poller.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:27:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
25 | unleashUrl: URL,
26 | apiKey: String,
27 | session: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
28 | storageProvider: StorageProvider = DictionaryStorageProvider(),
29 | customHeaders: [String: String] = [:],
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:252:71: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:140:23: error: cannot find 'URLRequest' in scope
138 | }
139 |
140 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
141 | request.httpMethod = "GET"
142 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:171:32: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
169 | }
170 | }
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
172 |
173 | session.perform(request) { [self] data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:43: error: cannot infer type of closure parameter 'data' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'data' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:49: error: cannot infer type of closure parameter 'response' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'response' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:59: error: cannot infer type of closure parameter 'error' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:180:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
178 | }
179 |
180 | if httpResponse.statusCode == 304 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
181 | completionHandler?(nil)
182 | Printer.printMessage("No changes in feature toggles.")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:254:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
255 | guard let header = key as? String else { return false }
256 | return header.caseInsensitiveCompare(field) == .orderedSame
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | }
6 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
[9/32] Compiling UnleashProxyClientSwift PollerError.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:27:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
25 | unleashUrl: URL,
26 | apiKey: String,
27 | session: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
28 | storageProvider: StorageProvider = DictionaryStorageProvider(),
29 | customHeaders: [String: String] = [:],
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:252:71: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:140:23: error: cannot find 'URLRequest' in scope
138 | }
139 |
140 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
141 | request.httpMethod = "GET"
142 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:171:32: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
169 | }
170 | }
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
172 |
173 | session.perform(request) { [self] data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:43: error: cannot infer type of closure parameter 'data' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'data' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:49: error: cannot infer type of closure parameter 'response' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'response' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:59: error: cannot infer type of closure parameter 'error' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:180:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
178 | }
179 |
180 | if httpResponse.statusCode == 304 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
181 | completionHandler?(nil)
182 | Printer.printMessage("No changes in feature toggles.")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:254:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
255 | guard let header = key as? String else { return false }
256 | return header.caseInsensitiveCompare(field) == .orderedSame
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | }
6 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
[10/32] Compiling UnleashProxyClientSwift PollerSession.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:27:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
25 | unleashUrl: URL,
26 | apiKey: String,
27 | session: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
28 | storageProvider: StorageProvider = DictionaryStorageProvider(),
29 | customHeaders: [String: String] = [:],
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:252:71: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:140:23: error: cannot find 'URLRequest' in scope
138 | }
139 |
140 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
141 | request.httpMethod = "GET"
142 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:171:32: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
169 | }
170 | }
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
172 |
173 | session.perform(request) { [self] data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:43: error: cannot infer type of closure parameter 'data' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'data' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:49: error: cannot infer type of closure parameter 'response' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'response' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:59: error: cannot infer type of closure parameter 'error' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:180:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
178 | }
179 |
180 | if httpResponse.statusCode == 304 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
181 | completionHandler?(nil)
182 | Printer.printMessage("No changes in feature toggles.")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:254:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
255 | guard let header = key as? String else { return false }
256 | return header.caseInsensitiveCompare(field) == .orderedSame
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | }
6 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
[11/32] Compiling UnleashProxyClientSwift Bootstrap.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:132:30: warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
130 | toggleName: name,
131 | enabled: enabled,
132 | context: contextSnapshot
| `- warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
133 | ))
134 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Context.swift:1:15: note: consider making struct 'Context' conform to the 'Sendable' protocol
1 | public struct Context {
| `- note: consider making struct 'Context' conform to the 'Sendable' protocol
2 | let appName: String?
3 | let environment: String?
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:154:30: warning: capture of 'variant' with non-sendable type 'Variant' in a '@Sendable' closure; this is an error in the Swift 6 language mode
152 | toggleName: name,
153 | enabled: enabled,
154 | variant: variant,
| `- warning: capture of 'variant' with non-sendable type 'Variant' in a '@Sendable' closure; this is an error in the Swift 6 language mode
155 | context: contextSnapshot
156 | ))
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:3:15: note: consider making struct 'Variant' conform to the 'Sendable' protocol
1 | // MARK: - Variant
2 |
3 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
4 | enum CodingKeys: String, CodingKey {
5 | case name, enabled, payload
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:155:30: warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
153 | enabled: enabled,
154 | variant: variant,
155 | context: contextSnapshot
| `- warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
156 | ))
157 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Context.swift:1:15: note: consider making struct 'Context' conform to the 'Sendable' protocol
1 | public struct Context {
| `- note: consider making struct 'Context' conform to the 'Sendable' protocol
2 | let appName: String?
3 | let environment: String?
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:216:13: warning: capture of 'self' with non-sendable type 'UnleashClientBase' in a '@Sendable' closure; this is an error in the Swift 6 language mode
3 |
4 | @available(macOS 10.15, *)
5 | public class UnleashClientBase {
| `- note: class 'UnleashClientBase' does not conform to the 'Sendable' protocol
6 | private var _context: Context
7 |
:
214 |
215 | DispatchQueue.global(qos: .background).async {
216 | self.start(Printer.showPrintStatements, completionHandler: completionHandler)
| `- warning: capture of 'self' with non-sendable type 'UnleashClientBase' in a '@Sendable' closure; this is an error in the Swift 6 language mode
217 | }
218 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:216:72: warning: capture of 'completionHandler' with non-sendable type '((PollerError?) -> Void)?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
214 |
215 | DispatchQueue.global(qos: .background).async {
216 | self.start(Printer.showPrintStatements, completionHandler: completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type '((PollerError?) -> Void)?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
217 | }
218 | }
[12/32] Compiling UnleashProxyClientSwift UnleashProxyClientSwift.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:132:30: warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
130 | toggleName: name,
131 | enabled: enabled,
132 | context: contextSnapshot
| `- warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
133 | ))
134 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Context.swift:1:15: note: consider making struct 'Context' conform to the 'Sendable' protocol
1 | public struct Context {
| `- note: consider making struct 'Context' conform to the 'Sendable' protocol
2 | let appName: String?
3 | let environment: String?
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:154:30: warning: capture of 'variant' with non-sendable type 'Variant' in a '@Sendable' closure; this is an error in the Swift 6 language mode
152 | toggleName: name,
153 | enabled: enabled,
154 | variant: variant,
| `- warning: capture of 'variant' with non-sendable type 'Variant' in a '@Sendable' closure; this is an error in the Swift 6 language mode
155 | context: contextSnapshot
156 | ))
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:3:15: note: consider making struct 'Variant' conform to the 'Sendable' protocol
1 | // MARK: - Variant
2 |
3 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
4 | enum CodingKeys: String, CodingKey {
5 | case name, enabled, payload
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:155:30: warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
153 | enabled: enabled,
154 | variant: variant,
155 | context: contextSnapshot
| `- warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
156 | ))
157 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Context.swift:1:15: note: consider making struct 'Context' conform to the 'Sendable' protocol
1 | public struct Context {
| `- note: consider making struct 'Context' conform to the 'Sendable' protocol
2 | let appName: String?
3 | let environment: String?
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:216:13: warning: capture of 'self' with non-sendable type 'UnleashClientBase' in a '@Sendable' closure; this is an error in the Swift 6 language mode
3 |
4 | @available(macOS 10.15, *)
5 | public class UnleashClientBase {
| `- note: class 'UnleashClientBase' does not conform to the 'Sendable' protocol
6 | private var _context: Context
7 |
:
214 |
215 | DispatchQueue.global(qos: .background).async {
216 | self.start(Printer.showPrintStatements, completionHandler: completionHandler)
| `- warning: capture of 'self' with non-sendable type 'UnleashClientBase' in a '@Sendable' closure; this is an error in the Swift 6 language mode
217 | }
218 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:216:72: warning: capture of 'completionHandler' with non-sendable type '((PollerError?) -> Void)?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
214 |
215 | DispatchQueue.global(qos: .background).async {
216 | self.start(Printer.showPrintStatements, completionHandler: completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type '((PollerError?) -> Void)?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
217 | }
218 | }
[13/32] Compiling UnleashProxyClientSwift Context.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:132:30: warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
130 | toggleName: name,
131 | enabled: enabled,
132 | context: contextSnapshot
| `- warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
133 | ))
134 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Context.swift:1:15: note: consider making struct 'Context' conform to the 'Sendable' protocol
1 | public struct Context {
| `- note: consider making struct 'Context' conform to the 'Sendable' protocol
2 | let appName: String?
3 | let environment: String?
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:154:30: warning: capture of 'variant' with non-sendable type 'Variant' in a '@Sendable' closure; this is an error in the Swift 6 language mode
152 | toggleName: name,
153 | enabled: enabled,
154 | variant: variant,
| `- warning: capture of 'variant' with non-sendable type 'Variant' in a '@Sendable' closure; this is an error in the Swift 6 language mode
155 | context: contextSnapshot
156 | ))
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:3:15: note: consider making struct 'Variant' conform to the 'Sendable' protocol
1 | // MARK: - Variant
2 |
3 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
4 | enum CodingKeys: String, CodingKey {
5 | case name, enabled, payload
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:155:30: warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
153 | enabled: enabled,
154 | variant: variant,
155 | context: contextSnapshot
| `- warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
156 | ))
157 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Context.swift:1:15: note: consider making struct 'Context' conform to the 'Sendable' protocol
1 | public struct Context {
| `- note: consider making struct 'Context' conform to the 'Sendable' protocol
2 | let appName: String?
3 | let environment: String?
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:216:13: warning: capture of 'self' with non-sendable type 'UnleashClientBase' in a '@Sendable' closure; this is an error in the Swift 6 language mode
3 |
4 | @available(macOS 10.15, *)
5 | public class UnleashClientBase {
| `- note: class 'UnleashClientBase' does not conform to the 'Sendable' protocol
6 | private var _context: Context
7 |
:
214 |
215 | DispatchQueue.global(qos: .background).async {
216 | self.start(Printer.showPrintStatements, completionHandler: completionHandler)
| `- warning: capture of 'self' with non-sendable type 'UnleashClientBase' in a '@Sendable' closure; this is an error in the Swift 6 language mode
217 | }
218 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:216:72: warning: capture of 'completionHandler' with non-sendable type '((PollerError?) -> Void)?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
214 |
215 | DispatchQueue.global(qos: .background).async {
216 | self.start(Printer.showPrintStatements, completionHandler: completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type '((PollerError?) -> Void)?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
217 | }
218 | }
[14/32] Compiling UnleashProxyClientSwift FeatureResponse.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:132:30: warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
130 | toggleName: name,
131 | enabled: enabled,
132 | context: contextSnapshot
| `- warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
133 | ))
134 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Context.swift:1:15: note: consider making struct 'Context' conform to the 'Sendable' protocol
1 | public struct Context {
| `- note: consider making struct 'Context' conform to the 'Sendable' protocol
2 | let appName: String?
3 | let environment: String?
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:154:30: warning: capture of 'variant' with non-sendable type 'Variant' in a '@Sendable' closure; this is an error in the Swift 6 language mode
152 | toggleName: name,
153 | enabled: enabled,
154 | variant: variant,
| `- warning: capture of 'variant' with non-sendable type 'Variant' in a '@Sendable' closure; this is an error in the Swift 6 language mode
155 | context: contextSnapshot
156 | ))
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:3:15: note: consider making struct 'Variant' conform to the 'Sendable' protocol
1 | // MARK: - Variant
2 |
3 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
4 | enum CodingKeys: String, CodingKey {
5 | case name, enabled, payload
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:155:30: warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
153 | enabled: enabled,
154 | variant: variant,
155 | context: contextSnapshot
| `- warning: capture of 'contextSnapshot' with non-sendable type 'Context' in a '@Sendable' closure; this is an error in the Swift 6 language mode
156 | ))
157 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Context.swift:1:15: note: consider making struct 'Context' conform to the 'Sendable' protocol
1 | public struct Context {
| `- note: consider making struct 'Context' conform to the 'Sendable' protocol
2 | let appName: String?
3 | let environment: String?
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:216:13: warning: capture of 'self' with non-sendable type 'UnleashClientBase' in a '@Sendable' closure; this is an error in the Swift 6 language mode
3 |
4 | @available(macOS 10.15, *)
5 | public class UnleashClientBase {
| `- note: class 'UnleashClientBase' does not conform to the 'Sendable' protocol
6 | private var _context: Context
7 |
:
214 |
215 | DispatchQueue.global(qos: .background).async {
216 | self.start(Printer.showPrintStatements, completionHandler: completionHandler)
| `- warning: capture of 'self' with non-sendable type 'UnleashClientBase' in a '@Sendable' closure; this is an error in the Swift 6 language mode
217 | }
218 | }
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:216:72: warning: capture of 'completionHandler' with non-sendable type '((PollerError?) -> Void)?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
214 |
215 | DispatchQueue.global(qos: .background).async {
216 | self.start(Printer.showPrintStatements, completionHandler: completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type '((PollerError?) -> Void)?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
217 | }
218 | }
[15/32] Compiling UnleashProxyClientSwift CustomHeadersProvider.swift
[16/32] Compiling UnleashProxyClientSwift DefaultCustomHeadersProvider.swift
[17/32] Compiling UnleashProxyClientSwift DictionaryStorageProvider.swift
[18/32] Compiling UnleashProxyClientSwift StorageProvider.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:12:24: warning: static property '_showPrintStatements' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 | class Printer {
11 | private static let lock = NSLock()
12 | private static var _showPrintStatements = false
| |- warning: static property '_showPrintStatements' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert '_showPrintStatements' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property '_showPrintStatements' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | static var showPrintStatements: Bool {
[19/32] Compiling UnleashProxyClientSwift Date+iso8601String.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:12:24: warning: static property '_showPrintStatements' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 | class Printer {
11 | private static let lock = NSLock()
12 | private static var _showPrintStatements = false
| |- warning: static property '_showPrintStatements' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert '_showPrintStatements' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property '_showPrintStatements' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | static var showPrintStatements: Bool {
[20/32] Compiling UnleashProxyClientSwift Printer.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:12:24: warning: static property '_showPrintStatements' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 | class Printer {
11 | private static let lock = NSLock()
12 | private static var _showPrintStatements = false
| |- warning: static property '_showPrintStatements' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert '_showPrintStatements' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property '_showPrintStatements' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | static var showPrintStatements: Bool {
[21/32] Compiling UnleashProxyClientSwift Variant.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:36:16: warning: static property 'defaultDisabled' is not concurrency-safe because non-'Sendable' type 'Variant' may have shared mutable state; this is an error in the Swift 6 language mode
1 | // MARK: - Variant
2 |
3 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
4 | enum CodingKeys: String, CodingKey {
5 | case name, enabled, payload
:
34 |
35 | extension Variant {
36 | static let defaultDisabled = Variant(
| |- warning: static property 'defaultDisabled' is not concurrency-safe because non-'Sendable' type 'Variant' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaultDisabled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
37 | name: "disabled",
38 | enabled: false,
[22/32] Compiling UnleashProxyClientSwift ImpressionEvent.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:36:16: warning: static property 'defaultDisabled' is not concurrency-safe because non-'Sendable' type 'Variant' may have shared mutable state; this is an error in the Swift 6 language mode
1 | // MARK: - Variant
2 |
3 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
4 | enum CodingKeys: String, CodingKey {
5 | case name, enabled, payload
:
34 |
35 | extension Variant {
36 | static let defaultDisabled = Variant(
| |- warning: static property 'defaultDisabled' is not concurrency-safe because non-'Sendable' type 'Variant' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaultDisabled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
37 | name: "disabled",
38 | enabled: false,
[23/32] Compiling UnleashProxyClientSwift Bucket.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:36:16: warning: static property 'defaultDisabled' is not concurrency-safe because non-'Sendable' type 'Variant' may have shared mutable state; this is an error in the Swift 6 language mode
1 | // MARK: - Variant
2 |
3 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
4 | enum CodingKeys: String, CodingKey {
5 | case name, enabled, payload
:
34 |
35 | extension Variant {
36 | static let defaultDisabled = Variant(
| |- warning: static property 'defaultDisabled' is not concurrency-safe because non-'Sendable' type 'Variant' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaultDisabled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
37 | name: "disabled",
38 | enabled: false,
[24/32] Compiling UnleashProxyClientSwift Metrics.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:148:42: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | func createRequest(payload: Data) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
150 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:149:23: error: cannot find 'URLRequest' in scope
147 |
148 | func createRequest(payload: Data) -> URLRequest {
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
| `- error: cannot find 'URLRequest' in scope
150 | request.httpMethod = "POST"
151 | request.httpBody = payload
[25/32] Compiling UnleashProxyClientSwift MetricsPayload.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:148:42: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | func createRequest(payload: Data) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
150 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:149:23: error: cannot find 'URLRequest' in scope
147 |
148 | func createRequest(payload: Data) -> URLRequest {
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
| `- error: cannot find 'URLRequest' in scope
150 | request.httpMethod = "POST"
151 | request.httpBody = payload
[26/32] Compiling UnleashProxyClientSwift ToggleMetrics.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:148:42: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | func createRequest(payload: Data) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
150 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:149:23: error: cannot find 'URLRequest' in scope
147 |
148 | func createRequest(payload: Data) -> URLRequest {
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
| `- error: cannot find 'URLRequest' in scope
150 | request.httpMethod = "POST"
151 | request.httpBody = payload
[27/32] Compiling UnleashProxyClientSwift Payload.swift
[28/32] Compiling UnleashProxyClientSwift Toggle.swift
[29/32] Compiling UnleashProxyClientSwift UnleashEvent.swift
[30/32] Compiling UnleashProxyClientSwift URLSession+Extensions.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:3:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
1 | import Foundation
2 |
3 | extension URLSession: PollerSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:4:36: error: cannot find type 'URLRequest' in scope
2 |
3 | extension URLSession: PollerSession {
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
5 | let task = dataTask(with: request) { data, response, error in
6 | completionHandler(data, response, error)
[31/32] Compiling UnleashProxyClientSwift utils.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:3:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
1 | import Foundation
2 |
3 | extension URLSession: PollerSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:4:36: error: cannot find type 'URLRequest' in scope
2 |
3 | extension URLSession: PollerSession {
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
5 | let task = dataTask(with: request) { data, response, error in
6 | completionHandler(data, response, error)
[32/32] Compiling UnleashProxyClientSwift Version.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:3:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
1 | import Foundation
2 |
3 | extension URLSession: PollerSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:4:36: error: cannot find type 'URLRequest' in scope
2 |
3 | extension URLSession: PollerSession {
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
5 | let task = dataTask(with: request) { data, response, error in
6 | completionHandler(data, response, error)
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-53886769-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:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:dff62030f4387a2d827d2b365d39a91716bd1d13650763ccbcbfe23419000563
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:basic-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/3] Emitting module SwiftEventBus
[3/3] Compiling SwiftEventBus SwiftEventBus.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/27] Emitting module UnleashProxyClientSwift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:148:42: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | func createRequest(payload: Data) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
150 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:27:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
25 | unleashUrl: URL,
26 | apiKey: String,
27 | session: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
28 | storageProvider: StorageProvider = DictionaryStorageProvider(),
29 | customHeaders: [String: String] = [:],
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:252:71: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | }
6 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:3:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
1 | import Foundation
2 |
3 | extension URLSession: PollerSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { data, response, error in
[6/30] Compiling UnleashProxyClientSwift Bootstrap.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
[7/30] Compiling UnleashProxyClientSwift UnleashProxyClientSwift.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
[8/30] Compiling UnleashProxyClientSwift Context.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
[9/30] Compiling UnleashProxyClientSwift FeatureResponse.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:37:51: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | environment: String? = "default",
36 | context: [String: String]? = nil,
37 | pollerSession: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | poller: Poller? = nil,
39 | metrics: Metrics? = nil,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:250:48: error: cannot find type 'ObservableObject' in scope
248 |
249 | @available(iOS 13, tvOS 13, *)
250 | public class UnleashClient: UnleashClientBase, ObservableObject {
| `- error: cannot find type 'ObservableObject' in scope
251 | @MainActor
252 | public func start(
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
[10/30] Compiling UnleashProxyClientSwift CustomHeadersProvider.swift
[11/30] Compiling UnleashProxyClientSwift DefaultCustomHeadersProvider.swift
[12/30] Compiling UnleashProxyClientSwift DictionaryStorageProvider.swift
[13/30] Compiling UnleashProxyClientSwift Variant.swift
[14/30] Compiling UnleashProxyClientSwift ImpressionEvent.swift
[15/30] Compiling UnleashProxyClientSwift Bucket.swift
[16/30] Compiling UnleashProxyClientSwift Payload.swift
[17/30] Compiling UnleashProxyClientSwift Toggle.swift
[18/30] Compiling UnleashProxyClientSwift UnleashEvent.swift
[19/30] Compiling UnleashProxyClientSwift Metrics.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:148:42: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | func createRequest(payload: Data) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
150 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:149:23: error: cannot find 'URLRequest' in scope
147 |
148 | func createRequest(payload: Data) -> URLRequest {
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
| `- error: cannot find 'URLRequest' in scope
150 | request.httpMethod = "POST"
151 | request.httpBody = payload
[20/30] Compiling UnleashProxyClientSwift MetricsPayload.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:148:42: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | func createRequest(payload: Data) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
150 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:149:23: error: cannot find 'URLRequest' in scope
147 |
148 | func createRequest(payload: Data) -> URLRequest {
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
| `- error: cannot find 'URLRequest' in scope
150 | request.httpMethod = "POST"
151 | request.httpBody = payload
[21/30] Compiling UnleashProxyClientSwift ToggleMetrics.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:8:32: error: cannot find type 'URLRequest' in scope
6 | let metricsInterval: TimeInterval
7 | let clientKey: String
8 | typealias PosterHandler = (URLRequest, @escaping (Result<(Data, URLResponse), Error>) -> Void) -> Void
| `- error: cannot find type 'URLRequest' in scope
9 | let poster: PosterHandler
10 | let clock: () -> Date
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:27:17: error: @escaping attribute only applies to function types
25 | clock: @escaping () -> Date,
26 | disableMetrics: Bool = false,
27 | poster: @escaping PosterHandler,
| `- error: @escaping attribute only applies to function types
28 | url: URL,
29 | clientKey: String,
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:148:42: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | func createRequest(payload: Data) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
150 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:149:23: error: cannot find 'URLRequest' in scope
147 |
148 | func createRequest(payload: Data) -> URLRequest {
149 | var request = URLRequest(url: url.appendingPathComponent("client/metrics"))
| `- error: cannot find 'URLRequest' in scope
150 | request.httpMethod = "POST"
151 | request.httpBody = payload
[22/30] Compiling UnleashProxyClientSwift StorageProvider.swift
[23/30] Compiling UnleashProxyClientSwift Date+iso8601String.swift
[24/30] Compiling UnleashProxyClientSwift Printer.swift
[25/30] Compiling UnleashProxyClientSwift Poller.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:27:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
25 | unleashUrl: URL,
26 | apiKey: String,
27 | session: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
28 | storageProvider: StorageProvider = DictionaryStorageProvider(),
29 | customHeaders: [String: String] = [:],
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:252:71: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:140:23: error: cannot find 'URLRequest' in scope
138 | }
139 |
140 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
141 | request.httpMethod = "GET"
142 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:171:32: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
169 | }
170 | }
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
172 |
173 | session.perform(request) { [self] data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:43: error: cannot infer type of closure parameter 'data' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'data' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:49: error: cannot infer type of closure parameter 'response' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'response' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:59: error: cannot infer type of closure parameter 'error' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:180:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
178 | }
179 |
180 | if httpResponse.statusCode == 304 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
181 | completionHandler?(nil)
182 | Printer.printMessage("No changes in feature toggles.")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:254:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
255 | guard let header = key as? String else { return false }
256 | return header.caseInsensitiveCompare(field) == .orderedSame
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | }
6 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
[26/30] Compiling UnleashProxyClientSwift PollerError.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:27:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
25 | unleashUrl: URL,
26 | apiKey: String,
27 | session: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
28 | storageProvider: StorageProvider = DictionaryStorageProvider(),
29 | customHeaders: [String: String] = [:],
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:252:71: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:140:23: error: cannot find 'URLRequest' in scope
138 | }
139 |
140 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
141 | request.httpMethod = "GET"
142 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:171:32: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
169 | }
170 | }
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
172 |
173 | session.perform(request) { [self] data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:43: error: cannot infer type of closure parameter 'data' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'data' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:49: error: cannot infer type of closure parameter 'response' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'response' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:59: error: cannot infer type of closure parameter 'error' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:180:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
178 | }
179 |
180 | if httpResponse.statusCode == 304 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
181 | completionHandler?(nil)
182 | Printer.printMessage("No changes in feature toggles.")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:254:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
255 | guard let header = key as? String else { return false }
256 | return header.caseInsensitiveCompare(field) == .orderedSame
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | }
6 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
[27/30] Compiling UnleashProxyClientSwift PollerSession.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:29: error: cannot find type 'URLRequest' in scope
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: cannot find type 'URLRequest' in scope
5 | }
6 |
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:27:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
25 | unleashUrl: URL,
26 | apiKey: String,
27 | session: PollerSession = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
28 | storageProvider: StorageProvider = DictionaryStorageProvider(),
29 | customHeaders: [String: String] = [:],
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:252:71: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:140:23: error: cannot find 'URLRequest' in scope
138 | }
139 |
140 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
141 | request.httpMethod = "GET"
142 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:171:32: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
169 | }
170 | }
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
172 |
173 | session.perform(request) { [self] data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:43: error: cannot infer type of closure parameter 'data' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'data' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:49: error: cannot infer type of closure parameter 'response' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'response' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:173:59: error: cannot infer type of closure parameter 'error' without a type annotation
171 | request.cachePolicy = .reloadIgnoringLocalCacheData
172 |
173 | session.perform(request) { [self] data, response, error in
| `- error: cannot infer type of closure parameter 'error' without a type annotation
174 | guard let httpResponse = response as? HTTPURLResponse else {
175 | Printer.printMessage("No response")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:180:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
178 | }
179 |
180 | if httpResponse.statusCode == 304 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
181 | completionHandler?(nil)
182 | Printer.printMessage("No changes in feature toggles.")
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:254:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
252 | private func value(forHTTPHeaderField field: String, in response: HTTPURLResponse) -> String? {
253 | // Once iOS 12 support is dropped, replace this with HTTPURLResponse.value(forHTTPHeaderField:).
254 | return response.allHeaderFields.first { key, _ in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
255 | guard let header = key as? String else { return false }
256 | return header.caseInsensitiveCompare(field) == .orderedSame
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/PollerSession.swift:4:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
2 |
3 | public protocol PollerSession {
4 | func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | }
6 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
[28/30] Compiling UnleashProxyClientSwift URLSession+Extensions.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:3:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
1 | import Foundation
2 |
3 | extension URLSession: PollerSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:4:36: error: cannot find type 'URLRequest' in scope
2 |
3 | extension URLSession: PollerSession {
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
5 | let task = dataTask(with: request) { data, response, error in
6 | completionHandler(data, response, error)
[29/30] Compiling UnleashProxyClientSwift utils.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:3:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
1 | import Foundation
2 |
3 | extension URLSession: PollerSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:4:36: error: cannot find type 'URLRequest' in scope
2 |
3 | extension URLSession: PollerSession {
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
5 | let task = dataTask(with: request) { data, response, error in
6 | completionHandler(data, response, error)
[30/30] Compiling UnleashProxyClientSwift Version.swift
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:3:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
1 | import Foundation
2 |
3 | extension URLSession: PollerSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { data, response, error in
/host/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:4:36: error: cannot find type 'URLRequest' in scope
2 |
3 | extension URLSession: PollerSession {
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
5 | let task = dataTask(with: request) { data, response, error in
6 | completionHandler(data, response, error)
BUILD FAILURE 6.1 linux