Build Information
Successful build of UnleashProxyClientSwift, reference 2.2.0 (c747f7
), with Swift 6.0 for macOS (SPM) on 23 Apr 2025 14:06:52 UTC.
Swift 6 data race errors: 2
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64 -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
Build Log
========================================
RunAll
========================================
Builder version: 4.60.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Unleash/unleash-proxy-client-swift.git
Reference: 2.2.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Unleash/unleash-proxy-client-swift
* tag 2.2.0 -> FETCH_HEAD
HEAD is now at c747f79 feat: default session id (#122)
Cloned https://github.com/Unleash/unleash-proxy-client-swift.git
Revision (git rev-parse @):
c747f7927adb0cee67b9e39e32b6a17376e1f923
SUCCESS checkout https://github.com/Unleash/unleash-proxy-client-swift.git at 2.2.0
Fetching https://github.com/cesarferreira/SwiftEventBus.git
[1/529] Fetching swifteventbus
Fetched https://github.com/cesarferreira/SwiftEventBus.git from cache (0.73s)
Computing version for https://github.com/cesarferreira/SwiftEventBus.git
Computed https://github.com/cesarferreira/SwiftEventBus.git at 5.1.0 (0.55s)
Creating working copy for https://github.com/cesarferreira/SwiftEventBus.git
Working copy of https://github.com/cesarferreira/SwiftEventBus.git resolved at 5.1.0
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "unleash-proxy-client-swift",
"name": "UnleashProxyClientSwift",
"url": "https://github.com/Unleash/unleash-proxy-client-swift.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/unleash-proxy-client-swift",
"dependencies": [
{
"identity": "swifteventbus",
"name": "SwiftEventBus",
"url": "https://github.com/cesarferreira/SwiftEventBus.git",
"version": "5.1.0",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/SwiftEventBus",
"dependencies": [
]
}
]
}
]
}
Fetching https://github.com/Unleash/unleash-proxy-client-swift.git
[1/1388] Fetching unleash-proxy-client-swift
Fetched https://github.com/Unleash/unleash-proxy-client-swift.git from cache (0.77s)
Fetching https://github.com/cesarferreira/SwiftEventBus.git from cache
Fetched https://github.com/cesarferreira/SwiftEventBus.git from cache (0.42s)
Computing version for https://github.com/cesarferreira/SwiftEventBus.git
Computed https://github.com/cesarferreira/SwiftEventBus.git at 5.1.0 (0.03s)
Creating working copy for https://github.com/cesarferreira/SwiftEventBus.git
Working copy of https://github.com/cesarferreira/SwiftEventBus.git resolved at 5.1.0
Creating working copy for https://github.com/Unleash/unleash-proxy-client-swift.git
Working copy of https://github.com/Unleash/unleash-proxy-client-swift.git resolved at 2.2.0 (c747f79)
warning: '.resolve-product-dependencies': dependency 'unleash-proxy-client-swift' is not used by any target
Found 1 product dependencies
- SwiftEventBus
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/Unleash/unleash-proxy-client-swift.git
https://github.com/Unleash/unleash-proxy-client-swift.git
{
"dependencies" : [
{
"identity" : "swifteventbus",
"requirement" : {
"range" : [
{
"lower_bound" : "5.1.0",
"upper_bound" : "6.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/cesarferreira/SwiftEventBus.git"
}
],
"manifest_display_name" : "UnleashProxyClientSwift",
"name" : "UnleashProxyClientSwift",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "ios",
"version" : "12.0"
}
],
"products" : [
{
"name" : "UnleashProxyClientSwift",
"targets" : [
"UnleashProxyClientSwift"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "UnleashProxyClientSwiftTests",
"module_type" : "SwiftTarget",
"name" : "UnleashProxyClientSwiftTests",
"path" : "Tests/UnleashProxyClientSwiftTests",
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Tests/UnleashProxyClientSwiftTests/FeatureResponseStub.json",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"BootstrapTests.swift",
"ImpressionEventsTests.swift",
"MetricsTests.swift",
"MockMetrics.swift",
"MockPoller.swift",
"PollerTests.swift",
"UnleashClientIntegrationTest.swift",
"UnleashProxyClientSwiftTests.swift",
"testUtils.swift"
],
"target_dependencies" : [
"UnleashProxyClientSwift"
],
"type" : "test"
},
{
"c99name" : "UnleashProxyClientSwift",
"module_type" : "SwiftTarget",
"name" : "UnleashProxyClientSwift",
"path" : "Sources/UnleashProxyClientSwift",
"product_dependencies" : [
"SwiftEventBus"
],
"product_memberships" : [
"UnleashProxyClientSwift"
],
"sources" : [
"Client/Bootstrap.swift",
"Client/UnleashProxyClientSwift.swift",
"DTO/Context.swift",
"DTO/FeatureResponse.swift",
"DTO/Payload.swift",
"DTO/Toggle.swift",
"DTO/UnleashEvent.swift",
"DTO/Variant.swift",
"Events/ImpressionEvent.swift",
"Metrics/Bucket.swift",
"Metrics/Metrics.swift",
"Metrics/MetricsPayload.swift",
"Metrics/ToggleMetrics.swift",
"Poller/CustomHeadersProvider.swift",
"Poller/DefaultCustomHeadersProvider.swift",
"Poller/DictionaryStorageProvider.swift",
"Poller/Poller.swift",
"Poller/PollerError.swift",
"Poller/PollerSession.swift",
"Poller/StorageProvider.swift",
"Utils/Date+iso8601String.swift",
"Utils/Printer.swift",
"Utils/URLSession+Extensions.swift",
"Utils/utils.swift",
"Version/Version.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64 -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
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-5BDAB9E9C0126B9D.txt
[4/5] Emitting module SwiftEventBus
[5/5] Compiling SwiftEventBus SwiftEventBus.swift
[6/29] Emitting module UnleashProxyClientSwift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:35: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 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
3 | enum CodingKeys: String, CodingKey {
4 | case name, enabled, payload
:
33 |
34 | extension Variant {
35 | 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: annotate 'defaultDisabled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | name: "disabled",
37 | enabled: false,
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:11:16: 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
9 |
10 | class Printer {
11 | 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: annotate 'showPrintStatements' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | static func printMessage(_ items: Any..., separator: String = " ", terminator: String = "\n") {
13 | if showPrintStatements {
[7/31] Compiling UnleashProxyClientSwift UnleashEvent.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:35: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 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
3 | enum CodingKeys: String, CodingKey {
4 | case name, enabled, payload
:
33 |
34 | extension Variant {
35 | 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: annotate 'defaultDisabled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | name: "disabled",
37 | enabled: false,
[8/31] Compiling UnleashProxyClientSwift Variant.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:35: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 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
3 | enum CodingKeys: String, CodingKey {
4 | case name, enabled, payload
:
33 |
34 | extension Variant {
35 | 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: annotate 'defaultDisabled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | name: "disabled",
37 | enabled: false,
[9/31] Compiling UnleashProxyClientSwift ImpressionEvent.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:35: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 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
3 | enum CodingKeys: String, CodingKey {
4 | case name, enabled, payload
:
33 |
34 | extension Variant {
35 | 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: annotate 'defaultDisabled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | name: "disabled",
37 | enabled: false,
[10/31] Compiling UnleashProxyClientSwift Printer.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:11:16: 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
9 |
10 | class Printer {
11 | 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: annotate 'showPrintStatements' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | static func printMessage(_ items: Any..., separator: String = " ", terminator: String = "\n") {
13 | if showPrintStatements {
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:6:13: warning: capture of 'completionHandler' with non-sendable type '(Data?, URLResponse?, (any Error)?) -> Void' in a `@Sendable` closure
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { (data, response, error) in
6 | completionHandler(data, response, error)
| |- warning: capture of 'completionHandler' with non-sendable type '(Data?, URLResponse?, (any Error)?) -> Void' in a `@Sendable` closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
7 | }
8 | task.resume()
[11/31] Compiling UnleashProxyClientSwift URLSession+Extensions.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:11:16: 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
9 |
10 | class Printer {
11 | 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: annotate 'showPrintStatements' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | static func printMessage(_ items: Any..., separator: String = " ", terminator: String = "\n") {
13 | if showPrintStatements {
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/URLSession+Extensions.swift:6:13: warning: capture of 'completionHandler' with non-sendable type '(Data?, URLResponse?, (any Error)?) -> Void' in a `@Sendable` closure
4 | public func perform(_ request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
5 | let task = dataTask(with: request) { (data, response, error) in
6 | completionHandler(data, response, error)
| |- warning: capture of 'completionHandler' with non-sendable type '(Data?, URLResponse?, (any Error)?) -> Void' in a `@Sendable` closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
7 | }
8 | task.resume()
[12/31] Compiling UnleashProxyClientSwift FeatureResponse.swift
[13/31] Compiling UnleashProxyClientSwift Payload.swift
[14/31] Compiling UnleashProxyClientSwift Toggle.swift
[15/31] Compiling UnleashProxyClientSwift utils.swift
[16/31] Compiling UnleashProxyClientSwift Version.swift
[17/31] Compiling UnleashProxyClientSwift PollerError.swift
[18/31] Compiling UnleashProxyClientSwift PollerSession.swift
[19/31] Compiling UnleashProxyClientSwift StorageProvider.swift
[20/31] Compiling UnleashProxyClientSwift Date+iso8601String.swift
[21/31] Compiling UnleashProxyClientSwift Bucket.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:43:13: warning: capture of 'self' with non-sendable type 'Metrics' in a `@Sendable` closure
2 | import SwiftEventBus
3 |
4 | public class Metrics {
| `- note: class 'Metrics' does not conform to the 'Sendable' protocol
5 | let appName: String
6 | let metricsInterval: TimeInterval
:
41 |
42 | self.timer = Timer.scheduledTimer(withTimeInterval: metricsInterval, repeats: true) { _ in
43 | self.sendMetrics()
| `- warning: capture of 'self' with non-sendable type 'Metrics' in a `@Sendable` closure
44 | }
45 | }
[22/31] Compiling UnleashProxyClientSwift Metrics.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:43:13: warning: capture of 'self' with non-sendable type 'Metrics' in a `@Sendable` closure
2 | import SwiftEventBus
3 |
4 | public class Metrics {
| `- note: class 'Metrics' does not conform to the 'Sendable' protocol
5 | let appName: String
6 | let metricsInterval: TimeInterval
:
41 |
42 | self.timer = Timer.scheduledTimer(withTimeInterval: metricsInterval, repeats: true) { _ in
43 | self.sendMetrics()
| `- warning: capture of 'self' with non-sendable type 'Metrics' in a `@Sendable` closure
44 | }
45 | }
[23/31] Compiling UnleashProxyClientSwift MetricsPayload.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Metrics/Metrics.swift:43:13: warning: capture of 'self' with non-sendable type 'Metrics' in a `@Sendable` closure
2 | import SwiftEventBus
3 |
4 | public class Metrics {
| `- note: class 'Metrics' does not conform to the 'Sendable' protocol
5 | let appName: String
6 | let metricsInterval: TimeInterval
:
41 |
42 | self.timer = Timer.scheduledTimer(withTimeInterval: metricsInterval, repeats: true) { _ in
43 | self.sendMetrics()
| `- warning: capture of 'self' with non-sendable type 'Metrics' in a `@Sendable` closure
44 | }
45 | }
[24/31] Compiling UnleashProxyClientSwift DictionaryStorageProvider.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/DictionaryStorageProvider.swift:11:13: warning: capture of 'self' with non-sendable type 'DictionaryStorageProvider' in a `@Sendable` closure
1 | import Foundation
2 |
3 | public class DictionaryStorageProvider: StorageProvider {
| `- note: class 'DictionaryStorageProvider' does not conform to the 'Sendable' protocol
4 | private var storage: [String: Toggle] = [:]
5 | private let queue = DispatchQueue(label: "com.unleash.storageprovider")
:
9 | public func set(values: [String: Toggle]) {
10 | queue.async {
11 | self.storage = values
| `- warning: capture of 'self' with non-sendable type 'DictionaryStorageProvider' in a `@Sendable` closure
12 | }
13 | }
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/DictionaryStorageProvider.swift:11:28: warning: capture of 'values' with non-sendable type '[String : Toggle]' in a `@Sendable` closure
9 | public func set(values: [String: Toggle]) {
10 | queue.async {
11 | self.storage = values
| `- warning: capture of 'values' with non-sendable type '[String : Toggle]' in a `@Sendable` closure
12 | }
13 | }
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Toggle.swift:2:15: note: consider making struct 'Toggle' conform to the 'Sendable' protocol
1 | // MARK: - Toggle
2 | public struct Toggle: Codable, Equatable {
| `- note: consider making struct 'Toggle' conform to the 'Sendable' protocol
3 | public let name: String
4 | public let enabled: Bool
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:70:13: warning: capture of 'self' with non-sendable type 'Poller' in a `@Sendable` closure
3 | import SwiftEventBus
4 |
5 | public class Poller {
| `- note: class 'Poller' does not conform to the 'Sendable' protocol
6 | var refreshInterval: Int?
7 | var unleashUrl: URL
:
68 |
69 | let timer = Timer.scheduledTimer(withTimeInterval: Double(self.refreshInterval ?? 15), repeats: true) { timer in
70 | self.getFeatures(context: context)
| `- warning: capture of 'self' with non-sendable type 'Poller' in a `@Sendable` closure
71 | }
72 | self.timer = timer
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:70:39: warning: capture of 'context' with non-sendable type 'Context' in a `@Sendable` closure
68 |
69 | let timer = Timer.scheduledTimer(withTimeInterval: Double(self.refreshInterval ?? 15), repeats: true) { timer in
70 | self.getFeatures(context: context)
| `- warning: capture of 'context' with non-sendable type 'Context' in a `@Sendable` closure
71 | }
72 | self.timer = timer
/Users/admin/builder/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?
[25/31] Compiling UnleashProxyClientSwift Poller.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/DictionaryStorageProvider.swift:11:13: warning: capture of 'self' with non-sendable type 'DictionaryStorageProvider' in a `@Sendable` closure
1 | import Foundation
2 |
3 | public class DictionaryStorageProvider: StorageProvider {
| `- note: class 'DictionaryStorageProvider' does not conform to the 'Sendable' protocol
4 | private var storage: [String: Toggle] = [:]
5 | private let queue = DispatchQueue(label: "com.unleash.storageprovider")
:
9 | public func set(values: [String: Toggle]) {
10 | queue.async {
11 | self.storage = values
| `- warning: capture of 'self' with non-sendable type 'DictionaryStorageProvider' in a `@Sendable` closure
12 | }
13 | }
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/DictionaryStorageProvider.swift:11:28: warning: capture of 'values' with non-sendable type '[String : Toggle]' in a `@Sendable` closure
9 | public func set(values: [String: Toggle]) {
10 | queue.async {
11 | self.storage = values
| `- warning: capture of 'values' with non-sendable type '[String : Toggle]' in a `@Sendable` closure
12 | }
13 | }
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Toggle.swift:2:15: note: consider making struct 'Toggle' conform to the 'Sendable' protocol
1 | // MARK: - Toggle
2 | public struct Toggle: Codable, Equatable {
| `- note: consider making struct 'Toggle' conform to the 'Sendable' protocol
3 | public let name: String
4 | public let enabled: Bool
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:70:13: warning: capture of 'self' with non-sendable type 'Poller' in a `@Sendable` closure
3 | import SwiftEventBus
4 |
5 | public class Poller {
| `- note: class 'Poller' does not conform to the 'Sendable' protocol
6 | var refreshInterval: Int?
7 | var unleashUrl: URL
:
68 |
69 | let timer = Timer.scheduledTimer(withTimeInterval: Double(self.refreshInterval ?? 15), repeats: true) { timer in
70 | self.getFeatures(context: context)
| `- warning: capture of 'self' with non-sendable type 'Poller' in a `@Sendable` closure
71 | }
72 | self.timer = timer
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Poller/Poller.swift:70:39: warning: capture of 'context' with non-sendable type 'Context' in a `@Sendable` closure
68 |
69 | let timer = Timer.scheduledTimer(withTimeInterval: Double(self.refreshInterval ?? 15), repeats: true) { timer in
70 | self.getFeatures(context: context)
| `- warning: capture of 'context' with non-sendable type 'Context' in a `@Sendable` closure
71 | }
72 | self.timer = timer
/Users/admin/builder/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?
[26/31] Compiling UnleashProxyClientSwift ToggleMetrics.swift
[27/31] Compiling UnleashProxyClientSwift CustomHeadersProvider.swift
[28/31] Compiling UnleashProxyClientSwift DefaultCustomHeadersProvider.swift
[29/31] Compiling UnleashProxyClientSwift Bootstrap.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:55:25: warning: capture of 'completionHandler' with non-sendable type '(Result<(Data, URLResponse), any Error>) -> Void' in a `@Sendable` closure
53 | let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
54 | if let error = error {
55 | completionHandler(.failure(error))
| |- warning: capture of 'completionHandler' with non-sendable type '(Result<(Data, URLResponse), any Error>) -> Void' in a `@Sendable` closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
56 | } else if let data = data, let response = response {
57 | completionHandler(.success((data, response)))
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:11:16: 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
9 |
10 | class Printer {
11 | 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: annotate 'showPrintStatements' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | static func printMessage(_ items: Any..., separator: String = " ", terminator: String = "\n") {
13 | if showPrintStatements {
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:35: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 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
3 | enum CodingKeys: String, CodingKey {
4 | case name, enabled, payload
:
33 |
34 | extension Variant {
35 | 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: annotate 'defaultDisabled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | name: "disabled",
37 | enabled: false,
[30/31] Compiling UnleashProxyClientSwift UnleashProxyClientSwift.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:55:25: warning: capture of 'completionHandler' with non-sendable type '(Result<(Data, URLResponse), any Error>) -> Void' in a `@Sendable` closure
53 | let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
54 | if let error = error {
55 | completionHandler(.failure(error))
| |- warning: capture of 'completionHandler' with non-sendable type '(Result<(Data, URLResponse), any Error>) -> Void' in a `@Sendable` closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
56 | } else if let data = data, let response = response {
57 | completionHandler(.success((data, response)))
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:11:16: 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
9 |
10 | class Printer {
11 | 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: annotate 'showPrintStatements' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | static func printMessage(_ items: Any..., separator: String = " ", terminator: String = "\n") {
13 | if showPrintStatements {
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:35: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 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
3 | enum CodingKeys: String, CodingKey {
4 | case name, enabled, payload
:
33 |
34 | extension Variant {
35 | 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: annotate 'defaultDisabled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | name: "disabled",
37 | enabled: false,
[31/31] Compiling UnleashProxyClientSwift Context.swift
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Client/UnleashProxyClientSwift.swift:55:25: warning: capture of 'completionHandler' with non-sendable type '(Result<(Data, URLResponse), any Error>) -> Void' in a `@Sendable` closure
53 | let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
54 | if let error = error {
55 | completionHandler(.failure(error))
| |- warning: capture of 'completionHandler' with non-sendable type '(Result<(Data, URLResponse), any Error>) -> Void' in a `@Sendable` closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
56 | } else if let data = data, let response = response {
57 | completionHandler(.success((data, response)))
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/Utils/Printer.swift:11:16: 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
9 |
10 | class Printer {
11 | 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: annotate 'showPrintStatements' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | static func printMessage(_ items: Any..., separator: String = " ", terminator: String = "\n") {
13 | if showPrintStatements {
/Users/admin/builder/spi-builder-workspace/Sources/UnleashProxyClientSwift/DTO/Variant.swift:35: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 | public struct Variant: Codable, Equatable {
| `- note: consider making struct 'Variant' conform to the 'Sendable' protocol
3 | enum CodingKeys: String, CodingKey {
4 | case name, enabled, payload
:
33 |
34 | extension Variant {
35 | 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: annotate 'defaultDisabled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | name: "disabled",
37 | enabled: false,
Build complete! (8.45s)
Build complete.
{
"dependencies" : [
{
"identity" : "swifteventbus",
"requirement" : {
"range" : [
{
"lower_bound" : "5.1.0",
"upper_bound" : "6.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/cesarferreira/SwiftEventBus.git"
}
],
"manifest_display_name" : "UnleashProxyClientSwift",
"name" : "UnleashProxyClientSwift",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "ios",
"version" : "12.0"
}
],
"products" : [
{
"name" : "UnleashProxyClientSwift",
"targets" : [
"UnleashProxyClientSwift"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "UnleashProxyClientSwiftTests",
"module_type" : "SwiftTarget",
"name" : "UnleashProxyClientSwiftTests",
"path" : "Tests/UnleashProxyClientSwiftTests",
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Tests/UnleashProxyClientSwiftTests/FeatureResponseStub.json",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"BootstrapTests.swift",
"ImpressionEventsTests.swift",
"MetricsTests.swift",
"MockMetrics.swift",
"MockPoller.swift",
"PollerTests.swift",
"UnleashClientIntegrationTest.swift",
"UnleashProxyClientSwiftTests.swift",
"testUtils.swift"
],
"target_dependencies" : [
"UnleashProxyClientSwift"
],
"type" : "test"
},
{
"c99name" : "UnleashProxyClientSwift",
"module_type" : "SwiftTarget",
"name" : "UnleashProxyClientSwift",
"path" : "Sources/UnleashProxyClientSwift",
"product_dependencies" : [
"SwiftEventBus"
],
"product_memberships" : [
"UnleashProxyClientSwift"
],
"sources" : [
"Client/Bootstrap.swift",
"Client/UnleashProxyClientSwift.swift",
"DTO/Context.swift",
"DTO/FeatureResponse.swift",
"DTO/Payload.swift",
"DTO/Toggle.swift",
"DTO/UnleashEvent.swift",
"DTO/Variant.swift",
"Events/ImpressionEvent.swift",
"Metrics/Bucket.swift",
"Metrics/Metrics.swift",
"Metrics/MetricsPayload.swift",
"Metrics/ToggleMetrics.swift",
"Poller/CustomHeadersProvider.swift",
"Poller/DefaultCustomHeadersProvider.swift",
"Poller/DictionaryStorageProvider.swift",
"Poller/Poller.swift",
"Poller/PollerError.swift",
"Poller/PollerSession.swift",
"Poller/StorageProvider.swift",
"Utils/Date+iso8601String.swift",
"Utils/Printer.swift",
"Utils/URLSession+Extensions.swift",
"Utils/utils.swift",
"Version/Version.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Done.