Build Information
Successful build of Mixpanel, reference master (7459dd
), with Swift 6.1 for macOS (SPM) on 6 Aug 2025 23:33:35 UTC.
Swift 6 data race errors: 11
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.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
99 | return
/Users/admin/builder/spi-builder-workspace/Sources/Network.swift:102:7: warning: capture of 'success' with non-sendable type '(A, URLResponse?) -> Void' in a '@Sendable' closure
100 | }
101 |
102 | success(result, response)
| |- warning: capture of 'success' with non-sendable type '(A, URLResponse?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
103 | }.resume()
104 | }
[9/29] Compiling Mixpanel FileLogging.swift
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:120:9: warning: sending 'timer' risks causing data races; this is an error in the Swift 6 language mode
118 | if let timer = timer {
119 | DispatchQueue.main.async { [weak self, timer] in
120 | timer.invalidate()
| |- warning: sending 'timer' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'timer' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
121 | self?.timer = nil
122 | }
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:121:9: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
119 | DispatchQueue.main.async { [weak self, timer] in
120 | timer.invalidate()
121 | self?.timer = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
122 | }
123 | }
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:97:24: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
95 | stopFlushTimer()
96 | DispatchQueue.main.async { [weak self] in
97 | guard let self = self else {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
98 | return
99 | }
[10/29] Compiling Mixpanel Flush.swift
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:120:9: warning: sending 'timer' risks causing data races; this is an error in the Swift 6 language mode
118 | if let timer = timer {
119 | DispatchQueue.main.async { [weak self, timer] in
120 | timer.invalidate()
| |- warning: sending 'timer' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'timer' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
121 | self?.timer = nil
122 | }
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:121:9: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
119 | DispatchQueue.main.async { [weak self, timer] in
120 | timer.invalidate()
121 | self?.timer = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
122 | }
123 | }
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:97:24: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
95 | stopFlushTimer()
96 | DispatchQueue.main.async { [weak self] in
97 | guard let self = self else {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
98 | return
99 | }
[11/29] Compiling Mixpanel FlushRequest.swift
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:120:9: warning: sending 'timer' risks causing data races; this is an error in the Swift 6 language mode
118 | if let timer = timer {
119 | DispatchQueue.main.async { [weak self, timer] in
120 | timer.invalidate()
| |- warning: sending 'timer' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'timer' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
121 | self?.timer = nil
122 | }
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:121:9: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
119 | DispatchQueue.main.async { [weak self, timer] in
120 | timer.invalidate()
121 | self?.timer = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
122 | }
123 | }
/Users/admin/builder/spi-builder-workspace/Sources/Flush.swift:97:24: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
95 | stopFlushTimer()
96 | DispatchQueue.main.async { [weak self] in
97 | guard let self = self else {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
98 | return
99 | }
[12/29] Compiling Mixpanel Data+Compression.swift
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:12:8: warning: associated value 'invalidType(type:)' of 'Sendable'-conforming enum 'PropertyError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
10 |
11 | enum PropertyError: Error {
12 | case invalidType(type: Any)
| `- warning: associated value 'invalidType(type:)' of 'Sendable'-conforming enum 'PropertyError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:16:14: warning: static property 'assertClosure' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | class Assertions {
16 | static var assertClosure = swiftAssertClosure
| |- warning: static property 'assertClosure' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'assertClosure' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'assertClosure' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | static let swiftAssertClosure = { Swift.assert($0, $1, file: $2, line: $3) }
18 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:17:14: warning: static property 'swiftAssertClosure' is not concurrency-safe because non-'Sendable' type '(Bool, String, StaticString, UInt) -> ()' may have shared mutable state; this is an error in the Swift 6 language mode
15 | class Assertions {
16 | static var assertClosure = swiftAssertClosure
17 | static let swiftAssertClosure = { Swift.assert($0, $1, file: $2, line: $3) }
| |- warning: static property 'swiftAssertClosure' is not concurrency-safe because non-'Sendable' type '(Bool, String, StaticString, UInt) -> ()' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'swiftAssertClosure' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | }
19 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:225:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
223 | // Using the serial queue itself for this background task is fine
224 | accessQueue.async { [weak self] in
225 | self?._fetchFlagsIfNeeded(completion: nil)
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
226 | }
227 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:288:24: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
286 | ) {
287 | accessQueue.async { [weak self] in // Block A runs serially on accessQueue
288 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
289 |
290 | var flagVariant: MixpanelFlagVariant?
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:307:37: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
305 |
306 | if flagsAreCurrentlyReady {
307 | let result = flagVariant ?? fallback
| `- warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
308 | if flagVariant != nil, needsTrackingCheck {
309 | // Perform atomic check-and-track. _trackFeatureIfNeeded uses its
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:313:36: warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in a '@Sendable' closure
311 | self._trackFlagIfNeeded(flagName: flagName, variant: result)
312 | }
313 | DispatchQueue.main.async { completion(result) }
| |- warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
314 |
315 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:307:37: warning: implicit capture of 'fallback' requires that 'MixpanelFlagVariant' conforms to 'Sendable'; this is an error in the Swift 6 language mode
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
305 |
306 | if flagsAreCurrentlyReady {
307 | let result = flagVariant ?? fallback
| `- warning: implicit capture of 'fallback' requires that 'MixpanelFlagVariant' conforms to 'Sendable'; this is an error in the Swift 6 language mode
308 | if flagVariant != nil, needsTrackingCheck {
309 | // Perform atomic check-and-track. _trackFeatureIfNeeded uses its
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:324:62: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in an isolated closure; this is an error in the Swift 6 language mode
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
322 | if success {
323 | // Fetch succeeded, get the flag SYNCHRONOUSLY
324 | result = self.getVariantSync(flagName, fallback: fallback)
| `- warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in an isolated closure; this is an error in the Swift 6 language mode
325 | } else {
326 | print("Warning: Failed to fetch flags, returning fallback for \(flagName).")
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:38: warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:409:9: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
407 | // Dispatch the network request initiation to a global queue.
408 | DispatchQueue.global(qos: .utility).async { [weak self] in
409 | self?._performFetchRequest()
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
410 | }
411 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:421:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
419 | let startTime = Date()
420 | accessQueue.async { [weak self] in
421 | self?.fetchStartTime = startTime
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
422 | }
423 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:474:11: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
472 | // Update state and call completions via _completeFetch on the serial queue
473 | self?.accessQueue.async { // Dispatch completion handling to serial queue
474 | self?._completeFetch(success: false)
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
475 | }
476 | },
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:474:11: warning: reference to captured var 'self' in concurrently-executing code
472 | // Update state and call completions via _completeFetch on the serial queue
473 | self?.accessQueue.async { // Dispatch completion handling to serial queue
474 | self?._completeFetch(success: false)
| `- warning: reference to captured var 'self' in concurrently-executing code
475 | }
476 | },
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:483:28: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
481 | // Update state and call completions via _completeFetch on the serial queue
482 | self.accessQueue.async { [weak self] in
483 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
484 | // already on accessQueue – write directly
485 | self.flags = flagsResponse.flags ?? [:]
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:485:24: warning: capture of 'flagsResponse' with non-sendable type 'FlagsResponse' in a '@Sendable' closure
64 |
65 | // Response structure for the /flags endpoint
66 | struct FlagsResponse: Decodable {
| `- note: consider making struct 'FlagsResponse' conform to the 'Sendable' protocol
67 | let flags: [String: MixpanelFlagVariant]? // Dictionary where key is flag name
68 | }
:
483 | guard let self = self else { return }
484 | // already on accessQueue – write directly
485 | self.flags = flagsResponse.flags ?? [:]
| `- warning: capture of 'flagsResponse' with non-sendable type 'FlagsResponse' in a '@Sendable' closure
486 |
487 | // Calculate timing metrics
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:383:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
381 | // Dispatch completion to main queue to avoid potential deadlock
382 | DispatchQueue.main.async {
383 | completion?(false)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
384 | }
385 | return // Exit method
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:566:7: warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
564 | // Dispatch delegate call asynchronously to main thread for safety
565 | DispatchQueue.main.async {
566 | delegate.track(event: "$experiment_started", properties: properties)
| |- warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'delegate' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
567 | print("Tracked $experiment_started for \(flagName) (dispatched to main)")
568 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:49: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'result' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:508:7: warning: sending 'handlers' risks causing data races; this is an error in the Swift 6 language mode
506 |
507 | DispatchQueue.main.async {
508 | handlers.forEach { $0(success) }
| |- warning: sending 'handlers' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'handlers' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
509 | }
510 | }
[13/29] Compiling Mixpanel Error.swift
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:12:8: warning: associated value 'invalidType(type:)' of 'Sendable'-conforming enum 'PropertyError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
10 |
11 | enum PropertyError: Error {
12 | case invalidType(type: Any)
| `- warning: associated value 'invalidType(type:)' of 'Sendable'-conforming enum 'PropertyError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:16:14: warning: static property 'assertClosure' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | class Assertions {
16 | static var assertClosure = swiftAssertClosure
| |- warning: static property 'assertClosure' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'assertClosure' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'assertClosure' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | static let swiftAssertClosure = { Swift.assert($0, $1, file: $2, line: $3) }
18 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:17:14: warning: static property 'swiftAssertClosure' is not concurrency-safe because non-'Sendable' type '(Bool, String, StaticString, UInt) -> ()' may have shared mutable state; this is an error in the Swift 6 language mode
15 | class Assertions {
16 | static var assertClosure = swiftAssertClosure
17 | static let swiftAssertClosure = { Swift.assert($0, $1, file: $2, line: $3) }
| |- warning: static property 'swiftAssertClosure' is not concurrency-safe because non-'Sendable' type '(Bool, String, StaticString, UInt) -> ()' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'swiftAssertClosure' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | }
19 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:225:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
223 | // Using the serial queue itself for this background task is fine
224 | accessQueue.async { [weak self] in
225 | self?._fetchFlagsIfNeeded(completion: nil)
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
226 | }
227 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:288:24: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
286 | ) {
287 | accessQueue.async { [weak self] in // Block A runs serially on accessQueue
288 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
289 |
290 | var flagVariant: MixpanelFlagVariant?
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:307:37: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
305 |
306 | if flagsAreCurrentlyReady {
307 | let result = flagVariant ?? fallback
| `- warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
308 | if flagVariant != nil, needsTrackingCheck {
309 | // Perform atomic check-and-track. _trackFeatureIfNeeded uses its
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:313:36: warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in a '@Sendable' closure
311 | self._trackFlagIfNeeded(flagName: flagName, variant: result)
312 | }
313 | DispatchQueue.main.async { completion(result) }
| |- warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
314 |
315 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:307:37: warning: implicit capture of 'fallback' requires that 'MixpanelFlagVariant' conforms to 'Sendable'; this is an error in the Swift 6 language mode
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
305 |
306 | if flagsAreCurrentlyReady {
307 | let result = flagVariant ?? fallback
| `- warning: implicit capture of 'fallback' requires that 'MixpanelFlagVariant' conforms to 'Sendable'; this is an error in the Swift 6 language mode
308 | if flagVariant != nil, needsTrackingCheck {
309 | // Perform atomic check-and-track. _trackFeatureIfNeeded uses its
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:324:62: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in an isolated closure; this is an error in the Swift 6 language mode
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
322 | if success {
323 | // Fetch succeeded, get the flag SYNCHRONOUSLY
324 | result = self.getVariantSync(flagName, fallback: fallback)
| `- warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in an isolated closure; this is an error in the Swift 6 language mode
325 | } else {
326 | print("Warning: Failed to fetch flags, returning fallback for \(flagName).")
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:38: warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:409:9: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
407 | // Dispatch the network request initiation to a global queue.
408 | DispatchQueue.global(qos: .utility).async { [weak self] in
409 | self?._performFetchRequest()
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
410 | }
411 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:421:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
419 | let startTime = Date()
420 | accessQueue.async { [weak self] in
421 | self?.fetchStartTime = startTime
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
422 | }
423 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:474:11: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
472 | // Update state and call completions via _completeFetch on the serial queue
473 | self?.accessQueue.async { // Dispatch completion handling to serial queue
474 | self?._completeFetch(success: false)
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
475 | }
476 | },
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:474:11: warning: reference to captured var 'self' in concurrently-executing code
472 | // Update state and call completions via _completeFetch on the serial queue
473 | self?.accessQueue.async { // Dispatch completion handling to serial queue
474 | self?._completeFetch(success: false)
| `- warning: reference to captured var 'self' in concurrently-executing code
475 | }
476 | },
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:483:28: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
481 | // Update state and call completions via _completeFetch on the serial queue
482 | self.accessQueue.async { [weak self] in
483 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
484 | // already on accessQueue – write directly
485 | self.flags = flagsResponse.flags ?? [:]
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:485:24: warning: capture of 'flagsResponse' with non-sendable type 'FlagsResponse' in a '@Sendable' closure
64 |
65 | // Response structure for the /flags endpoint
66 | struct FlagsResponse: Decodable {
| `- note: consider making struct 'FlagsResponse' conform to the 'Sendable' protocol
67 | let flags: [String: MixpanelFlagVariant]? // Dictionary where key is flag name
68 | }
:
483 | guard let self = self else { return }
484 | // already on accessQueue – write directly
485 | self.flags = flagsResponse.flags ?? [:]
| `- warning: capture of 'flagsResponse' with non-sendable type 'FlagsResponse' in a '@Sendable' closure
486 |
487 | // Calculate timing metrics
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:383:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
381 | // Dispatch completion to main queue to avoid potential deadlock
382 | DispatchQueue.main.async {
383 | completion?(false)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
384 | }
385 | return // Exit method
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:566:7: warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
564 | // Dispatch delegate call asynchronously to main thread for safety
565 | DispatchQueue.main.async {
566 | delegate.track(event: "$experiment_started", properties: properties)
| |- warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'delegate' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
567 | print("Tracked $experiment_started for \(flagName) (dispatched to main)")
568 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:49: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'result' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:508:7: warning: sending 'handlers' risks causing data races; this is an error in the Swift 6 language mode
506 |
507 | DispatchQueue.main.async {
508 | handlers.forEach { $0(success) }
| |- warning: sending 'handlers' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'handlers' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
509 | }
510 | }
[14/29] Compiling Mixpanel FeatureFlags.swift
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:12:8: warning: associated value 'invalidType(type:)' of 'Sendable'-conforming enum 'PropertyError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
10 |
11 | enum PropertyError: Error {
12 | case invalidType(type: Any)
| `- warning: associated value 'invalidType(type:)' of 'Sendable'-conforming enum 'PropertyError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:16:14: warning: static property 'assertClosure' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | class Assertions {
16 | static var assertClosure = swiftAssertClosure
| |- warning: static property 'assertClosure' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'assertClosure' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'assertClosure' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | static let swiftAssertClosure = { Swift.assert($0, $1, file: $2, line: $3) }
18 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/Sources/Error.swift:17:14: warning: static property 'swiftAssertClosure' is not concurrency-safe because non-'Sendable' type '(Bool, String, StaticString, UInt) -> ()' may have shared mutable state; this is an error in the Swift 6 language mode
15 | class Assertions {
16 | static var assertClosure = swiftAssertClosure
17 | static let swiftAssertClosure = { Swift.assert($0, $1, file: $2, line: $3) }
| |- warning: static property 'swiftAssertClosure' is not concurrency-safe because non-'Sendable' type '(Bool, String, StaticString, UInt) -> ()' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'swiftAssertClosure' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | }
19 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:225:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
223 | // Using the serial queue itself for this background task is fine
224 | accessQueue.async { [weak self] in
225 | self?._fetchFlagsIfNeeded(completion: nil)
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
226 | }
227 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:288:24: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
286 | ) {
287 | accessQueue.async { [weak self] in // Block A runs serially on accessQueue
288 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
289 |
290 | var flagVariant: MixpanelFlagVariant?
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:307:37: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
305 |
306 | if flagsAreCurrentlyReady {
307 | let result = flagVariant ?? fallback
| `- warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
308 | if flagVariant != nil, needsTrackingCheck {
309 | // Perform atomic check-and-track. _trackFeatureIfNeeded uses its
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:313:36: warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in a '@Sendable' closure
311 | self._trackFlagIfNeeded(flagName: flagName, variant: result)
312 | }
313 | DispatchQueue.main.async { completion(result) }
| |- warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
314 |
315 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:307:37: warning: implicit capture of 'fallback' requires that 'MixpanelFlagVariant' conforms to 'Sendable'; this is an error in the Swift 6 language mode
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
305 |
306 | if flagsAreCurrentlyReady {
307 | let result = flagVariant ?? fallback
| `- warning: implicit capture of 'fallback' requires that 'MixpanelFlagVariant' conforms to 'Sendable'; this is an error in the Swift 6 language mode
308 | if flagVariant != nil, needsTrackingCheck {
309 | // Perform atomic check-and-track. _trackFeatureIfNeeded uses its
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:324:62: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in an isolated closure; this is an error in the Swift 6 language mode
31 |
32 | // Represents the variant associated with a feature flag
33 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
34 | public let key: String // Corresponds to 'variant_key' from API
35 | public let value: Any? // Corresponds to 'variant_value' from API
:
322 | if success {
323 | // Fetch succeeded, get the flag SYNCHRONOUSLY
324 | result = self.getVariantSync(flagName, fallback: fallback)
| `- warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in an isolated closure; this is an error in the Swift 6 language mode
325 | } else {
326 | print("Warning: Failed to fetch flags, returning fallback for \(flagName).")
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:38: warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:409:9: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
407 | // Dispatch the network request initiation to a global queue.
408 | DispatchQueue.global(qos: .utility).async { [weak self] in
409 | self?._performFetchRequest()
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
410 | }
411 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:421:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
419 | let startTime = Date()
420 | accessQueue.async { [weak self] in
421 | self?.fetchStartTime = startTime
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
422 | }
423 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:474:11: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
472 | // Update state and call completions via _completeFetch on the serial queue
473 | self?.accessQueue.async { // Dispatch completion handling to serial queue
474 | self?._completeFetch(success: false)
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
475 | }
476 | },
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:474:11: warning: reference to captured var 'self' in concurrently-executing code
472 | // Update state and call completions via _completeFetch on the serial queue
473 | self?.accessQueue.async { // Dispatch completion handling to serial queue
474 | self?._completeFetch(success: false)
| `- warning: reference to captured var 'self' in concurrently-executing code
475 | }
476 | },
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:483:28: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
180 | // --- FeatureFlagManager Class ---
181 |
182 | class FeatureFlagManager: Network, MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
183 |
184 | weak var delegate: MixpanelFlagDelegate?
:
481 | // Update state and call completions via _completeFetch on the serial queue
482 | self.accessQueue.async { [weak self] in
483 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
484 | // already on accessQueue – write directly
485 | self.flags = flagsResponse.flags ?? [:]
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:485:24: warning: capture of 'flagsResponse' with non-sendable type 'FlagsResponse' in a '@Sendable' closure
64 |
65 | // Response structure for the /flags endpoint
66 | struct FlagsResponse: Decodable {
| `- note: consider making struct 'FlagsResponse' conform to the 'Sendable' protocol
67 | let flags: [String: MixpanelFlagVariant]? // Dictionary where key is flag name
68 | }
:
483 | guard let self = self else { return }
484 | // already on accessQueue – write directly
485 | self.flags = flagsResponse.flags ?? [:]
| `- warning: capture of 'flagsResponse' with non-sendable type 'FlagsResponse' in a '@Sendable' closure
486 |
487 | // Calculate timing metrics
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:383:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
381 | // Dispatch completion to main queue to avoid potential deadlock
382 | DispatchQueue.main.async {
383 | completion?(false)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
384 | }
385 | return // Exit method
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:566:7: warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
564 | // Dispatch delegate call asynchronously to main thread for safety
565 | DispatchQueue.main.async {
566 | delegate.track(event: "$experiment_started", properties: properties)
| |- warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'delegate' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
567 | print("Tracked $experiment_started for \(flagName) (dispatched to main)")
568 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:330:49: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
328 | }
329 | // Call original completion (on main thread)
330 | DispatchQueue.main.async { completion(result) }
| |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'result' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
331 | }
332 |
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:508:7: warning: sending 'handlers' risks causing data races; this is an error in the Swift 6 language mode
506 |
507 | DispatchQueue.main.async {
508 | handlers.forEach { $0(success) }
| |- warning: sending 'handlers' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'handlers' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
509 | }
510 | }
[15/29] Compiling Mixpanel Group.swift
/Users/admin/builder/spi-builder-workspace/Sources/Group.swift:54:21: warning: capture of 'self' with non-sendable type 'Group' in a '@Sendable' closure
11 | /// Access to the Mixpanel Groups API, available through the getGroup function from
12 | /// the main Mixpanel instance.
13 | open class Group {
| `- note: class 'Group' does not conform to the 'Sendable' protocol
14 |
15 | let apiToken: String
:
52 | var r = InternalProperties()
53 | var p = InternalProperties()
54 | r["$token"] = self.apiToken
| `- warning: capture of 'self' with non-sendable type 'Group' in a '@Sendable' closure
55 | r["$time"] = epochMilliseconds
56 | if action == "$unset" {
/Users/admin/builder/spi-builder-workspace/Sources/Group.swift:59:21: warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
57 | // $unset takes an array of property names which is supplied to this method
58 | // in the properties parameter under the key "$properties"
59 | r[action] = properties["$properties"]
| `- warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
60 | } else {
61 | p += properties
[16/29] Compiling Mixpanel JSONHandler.swift
/Users/admin/builder/spi-builder-workspace/Sources/Group.swift:54:21: warning: capture of 'self' with non-sendable type 'Group' in a '@Sendable' closure
11 | /// Access to the Mixpanel Groups API, available through the getGroup function from
12 | /// the main Mixpanel instance.
13 | open class Group {
| `- note: class 'Group' does not conform to the 'Sendable' protocol
14 |
15 | let apiToken: String
:
52 | var r = InternalProperties()
53 | var p = InternalProperties()
54 | r["$token"] = self.apiToken
| `- warning: capture of 'self' with non-sendable type 'Group' in a '@Sendable' closure
55 | r["$time"] = epochMilliseconds
56 | if action == "$unset" {
/Users/admin/builder/spi-builder-workspace/Sources/Group.swift:59:21: warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
57 | // $unset takes an array of property names which is supplied to this method
58 | // in the properties parameter under the key "$properties"
59 | r[action] = properties["$properties"]
| `- warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
60 | } else {
61 | p += properties
[17/29] Compiling Mixpanel MPDB.swift
/Users/admin/builder/spi-builder-workspace/Sources/Group.swift:54:21: warning: capture of 'self' with non-sendable type 'Group' in a '@Sendable' closure
11 | /// Access to the Mixpanel Groups API, available through the getGroup function from
12 | /// the main Mixpanel instance.
13 | open class Group {
| `- note: class 'Group' does not conform to the 'Sendable' protocol
14 |
15 | let apiToken: String
:
52 | var r = InternalProperties()
53 | var p = InternalProperties()
54 | r["$token"] = self.apiToken
| `- warning: capture of 'self' with non-sendable type 'Group' in a '@Sendable' closure
55 | r["$time"] = epochMilliseconds
56 | if action == "$unset" {
/Users/admin/builder/spi-builder-workspace/Sources/Group.swift:59:21: warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
57 | // $unset takes an array of property names which is supplied to this method
58 | // in the properties parameter under the key "$properties"
59 | r[action] = properties["$properties"]
| `- warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
60 | } else {
61 | p += properties
[18/29] Compiling Mixpanel People.swift
/Users/admin/builder/spi-builder-workspace/Sources/People.swift:53:24: warning: capture of 'self' with non-sendable type 'People?' in a '@Sendable' closure
11 | /// Access to the Mixpanel People API, available as an accessible variable from
12 | /// the main Mixpanel instance.
13 | open class People {
| `- note: class 'People' does not conform to the 'Sendable' protocol
14 |
15 | /// controls the $ignore_time property in any subsequent MixpanelPeople operation.
:
51 |
52 | serialQueue.async { [weak self, action, properties] in
53 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'People?' in a '@Sendable' closure
54 |
55 | var r = InternalProperties()
/Users/admin/builder/spi-builder-workspace/Sources/People.swift:65:21: warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
63 | // $unset takes an array of property names which is supplied to this method
64 | // in the properties parameter under the key "$properties"
65 | r[action] = properties["$properties"]
| `- warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
66 | } else {
67 | if action == "$set" || action == "$set_once" {
[19/29] Compiling Mixpanel PrintLogging.swift
/Users/admin/builder/spi-builder-workspace/Sources/People.swift:53:24: warning: capture of 'self' with non-sendable type 'People?' in a '@Sendable' closure
11 | /// Access to the Mixpanel People API, available as an accessible variable from
12 | /// the main Mixpanel instance.
13 | open class People {
| `- note: class 'People' does not conform to the 'Sendable' protocol
14 |
15 | /// controls the $ignore_time property in any subsequent MixpanelPeople operation.
:
51 |
52 | serialQueue.async { [weak self, action, properties] in
53 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'People?' in a '@Sendable' closure
54 |
55 | var r = InternalProperties()
/Users/admin/builder/spi-builder-workspace/Sources/People.swift:65:21: warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
63 | // $unset takes an array of property names which is supplied to this method
64 | // in the properties parameter under the key "$properties"
65 | r[action] = properties["$properties"]
| `- warning: capture of 'properties' with non-sendable type 'InternalProperties' (aka 'Dictionary<String, Any>') in a '@Sendable' closure
66 | } else {
67 | if action == "$set" || action == "$set_once" {
[20/29] Compiling Mixpanel AutomaticEvents.swift
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:20:14: warning: static property 'automaticPropertiesLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
18 |
19 | class AutomaticProperties {
20 | static let automaticPropertiesLock = ReadWriteLock(label: "automaticPropertiesLock")
| |- warning: static property 'automaticPropertiesLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'automaticPropertiesLock' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | static var properties: InternalProperties = {
/Users/admin/builder/spi-builder-workspace/Sources/ReadWriteLock.swift:10:7: note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class ReadWriteLock {
| `- note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
11 | private let concurrentQueue: DispatchQueue
12 |
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:22:14: warning: static property 'properties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
20 | static let automaticPropertiesLock = ReadWriteLock(label: "automaticPropertiesLock")
21 |
22 | static var properties: InternalProperties = {
| |- warning: static property 'properties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'properties' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'properties' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | var p = InternalProperties()
24 |
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:78:14: warning: static property 'peopleProperties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
76 | }()
77 |
78 | static var peopleProperties: InternalProperties = {
| |- warning: static property 'peopleProperties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'peopleProperties' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'peopleProperties' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
79 | var p = InternalProperties()
80 | let infoDict = Bundle.main.infoDictionary
/Users/admin/builder/spi-builder-workspace/Sources/Constants.swift:16:14: warning: static property 'queueSize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | struct QueueConstants {
16 | static var queueSize = 5000
| |- warning: static property 'queueSize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'queueSize' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'queueSize' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | }
18 |
[21/29] Compiling Mixpanel AutomaticProperties.swift
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:20:14: warning: static property 'automaticPropertiesLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
18 |
19 | class AutomaticProperties {
20 | static let automaticPropertiesLock = ReadWriteLock(label: "automaticPropertiesLock")
| |- warning: static property 'automaticPropertiesLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'automaticPropertiesLock' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | static var properties: InternalProperties = {
/Users/admin/builder/spi-builder-workspace/Sources/ReadWriteLock.swift:10:7: note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class ReadWriteLock {
| `- note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
11 | private let concurrentQueue: DispatchQueue
12 |
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:22:14: warning: static property 'properties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
20 | static let automaticPropertiesLock = ReadWriteLock(label: "automaticPropertiesLock")
21 |
22 | static var properties: InternalProperties = {
| |- warning: static property 'properties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'properties' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'properties' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | var p = InternalProperties()
24 |
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:78:14: warning: static property 'peopleProperties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
76 | }()
77 |
78 | static var peopleProperties: InternalProperties = {
| |- warning: static property 'peopleProperties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'peopleProperties' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'peopleProperties' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
79 | var p = InternalProperties()
80 | let infoDict = Bundle.main.infoDictionary
/Users/admin/builder/spi-builder-workspace/Sources/Constants.swift:16:14: warning: static property 'queueSize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | struct QueueConstants {
16 | static var queueSize = 5000
| |- warning: static property 'queueSize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'queueSize' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'queueSize' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | }
18 |
[22/29] Compiling Mixpanel Constants.swift
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:20:14: warning: static property 'automaticPropertiesLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
18 |
19 | class AutomaticProperties {
20 | static let automaticPropertiesLock = ReadWriteLock(label: "automaticPropertiesLock")
| |- warning: static property 'automaticPropertiesLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'automaticPropertiesLock' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | static var properties: InternalProperties = {
/Users/admin/builder/spi-builder-workspace/Sources/ReadWriteLock.swift:10:7: note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class ReadWriteLock {
| `- note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
11 | private let concurrentQueue: DispatchQueue
12 |
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:22:14: warning: static property 'properties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
20 | static let automaticPropertiesLock = ReadWriteLock(label: "automaticPropertiesLock")
21 |
22 | static var properties: InternalProperties = {
| |- warning: static property 'properties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'properties' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'properties' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | var p = InternalProperties()
24 |
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticProperties.swift:78:14: warning: static property 'peopleProperties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
76 | }()
77 |
78 | static var peopleProperties: InternalProperties = {
| |- warning: static property 'peopleProperties' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'peopleProperties' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'peopleProperties' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
79 | var p = InternalProperties()
80 | let infoDict = Bundle.main.infoDictionary
/Users/admin/builder/spi-builder-workspace/Sources/Constants.swift:16:14: warning: static property 'queueSize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 | struct QueueConstants {
16 | static var queueSize = 5000
| |- warning: static property 'queueSize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'queueSize' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'queueSize' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | }
18 |
[23/29] Compiling Mixpanel MixpanelOptions.swift
[24/29] Compiling Mixpanel MixpanelPersistence.swift
[25/29] Compiling Mixpanel ReadWriteLock.swift
/Users/admin/builder/spi-builder-workspace/Sources/SessionMetadata.swift:24:24: warning: capture of 'self' with non-sendable type 'SessionMetadata?' in a '@Sendable' closure
9 | import Foundation
10 |
11 | class SessionMetadata {
| `- note: class 'SessionMetadata' does not conform to the 'Sendable' protocol
12 | var eventsCounter: UInt64 = 0
13 | var peopleCounter: UInt64 = 0
:
22 | func applicationWillEnterForeground() {
23 | trackingQueue.async { [weak self] in
24 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'SessionMetadata?' in a '@Sendable' closure
25 |
26 | self.eventsCounter = 0
[26/29] Compiling Mixpanel SessionMetadata.swift
/Users/admin/builder/spi-builder-workspace/Sources/SessionMetadata.swift:24:24: warning: capture of 'self' with non-sendable type 'SessionMetadata?' in a '@Sendable' closure
9 | import Foundation
10 |
11 | class SessionMetadata {
| `- note: class 'SessionMetadata' does not conform to the 'Sendable' protocol
12 | var eventsCounter: UInt64 = 0
13 | var peopleCounter: UInt64 = 0
:
22 | func applicationWillEnterForeground() {
23 | trackingQueue.async { [weak self] in
24 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'SessionMetadata?' in a '@Sendable' closure
25 |
26 | self.eventsCounter = 0
[27/29] Compiling Mixpanel Mixpanel.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mixpanel.swift:289:14: warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'MixpanelManager' may have shared mutable state; this is an error in the Swift 6 language mode
285 | }
286 |
287 | final class MixpanelManager {
| `- note: class 'MixpanelManager' does not conform to the 'Sendable' protocol
288 |
289 | static let sharedInstance = MixpanelManager()
| |- warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'MixpanelManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'sharedInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
290 | private var instances: [String: MixpanelInstance]
291 | private var mainInstance: MixpanelInstance?
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:790:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
788 | if hasOptedOutTracking() {
789 | if let completion = completion {
790 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
791 | }
792 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:797:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
795 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
796 | if let completion = completion {
797 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
798 | }
799 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:846:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
844 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
845 | if let completion = completion {
846 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
847 | }
848 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:802:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
800 | }
801 | trackingQueue.async { [weak self, distinctId, usePeople] in
802 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
803 |
804 | // If there's no anonymousId assigned yet, that means distinctId is stored in the storage. Assigning already stored
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:845:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
843 | alias: self.alias,
844 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
845 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
846 | DispatchQueue.main.async(execute: completion)
847 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:884:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
882 | if hasOptedOutTracking() {
883 | if let completion = completion {
884 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
885 | }
886 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:892:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
890 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
891 | if let completion = completion {
892 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
893 | }
894 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:900:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
898 | MixpanelLogger.error(message: "\(self) create alias called with empty alias")
899 | if let completion = completion {
900 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
901 | }
902 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:909:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
907 | guard let self = self else {
908 | if let completion = completion {
909 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
910 | }
911 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:953:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
951 | message: "alias: \(alias) matches distinctId: \(distinctId) - skipping api call.")
952 | if let completion = completion {
953 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
954 | }
955 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:907:26: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
905 | if alias != distinctId {
906 | trackingQueue.async { [weak self, alias] in
907 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
908 | if let completion = completion {
909 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:908:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
906 | trackingQueue.async { [weak self, alias] in
907 | guard let self = self else {
908 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
909 | DispatchQueue.main.async(execute: completion)
910 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:986:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
984 | self.archive()
985 | if let completion = completion {
986 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
987 | }
988 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:967:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
965 | flush()
966 | trackingQueue.async { [weak self] in
967 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
968 | return
969 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:985:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
983 | self.mixpanelPersistence.resetEntities()
984 | self.archive()
985 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
986 | DispatchQueue.main.async(execute: completion)
987 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1068:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1066 | if hasOptedOutTracking() {
1067 | if let completion = completion {
1068 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1069 | }
1070 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1075:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1073 | guard let self = self else {
1074 | if let completion = completion {
1075 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1076 | }
1077 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1082:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1080 | if let shouldFlush = self.delegate?.mixpanelWillFlush(self), !shouldFlush {
1081 | if let completion = completion {
1082 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1083 | }
1084 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1105:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1103 | guard let self = self else {
1104 | if let completion = completion {
1105 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1106 | }
1107 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1114:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1112 |
1113 | if let completion = completion {
1114 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1115 | }
1116 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1073:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1071 | }
1072 | trackingQueue.async { [weak self, completion] in
1073 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1074 | if let completion = completion {
1075 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1074:29: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1072 | trackingQueue.async { [weak self, completion] in
1073 | guard let self = self else {
1074 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1075 | DispatchQueue.main.async(execute: completion)
1076 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1103:26: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1101 |
1102 | self.networkQueue.async { [weak self, completion] in
1103 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1104 | if let completion = completion {
1105 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1104:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1102 | self.networkQueue.async { [weak self, completion] in
1103 | guard let self = self else {
1104 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1105 | DispatchQueue.main.async(execute: completion)
1106 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1109:25: warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1107 | return
1108 | }
1109 | self.flushQueue(eventQueue, type: .events)
| `- warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1110 | self.flushQueue(peopleQueue, type: .people)
1111 | self.flushQueue(groupsQueue, type: .groups)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1110:25: warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1108 | }
1109 | self.flushQueue(eventQueue, type: .events)
1110 | self.flushQueue(peopleQueue, type: .people)
| `- warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1111 | self.flushQueue(groupsQueue, type: .groups)
1112 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1111:25: warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1109 | self.flushQueue(eventQueue, type: .events)
1110 | self.flushQueue(peopleQueue, type: .people)
1111 | self.flushQueue(groupsQueue, type: .groups)
| `- warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1112 |
1113 | if let completion = completion {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1144:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1142 | func flushSuccess(type: FlushType, ids: [Int32]) {
1143 | trackingQueue.async { [weak self] in
1144 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1145 | return
1146 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1173:17: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1171 |
1172 | trackingQueue.async { [weak self, event, properties, epochInterval] in
1173 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1174 | return
1175 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1196:21: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1194 | let timedEventsSnapshot = self.trackInstance.track(
1195 | event: event,
1196 | properties: properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1197 | timedEvents: shadowTimedEvents,
1198 | superProperties: shadowSuperProperties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1294:19: warning: result of call to 'write(closure:)' is unused
1292 |
1293 | func removeCachedGroup(groupKey: String, groupID: MixpanelType) {
1294 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
1295 | groups.removeValue(forKey: makeMapKey(groupKey: groupKey, groupID: groupID))
1296 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1328:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1326 | let startTime = Date().timeIntervalSince1970
1327 | trackingQueue.async { [weak self, startTime, event] in
1328 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1329 | let timedEvents = self.trackInstance.time(
1330 | event: event, timedEvents: self.timedEvents, startTime: startTime)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1360:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1358 | public func clearTimedEvents() {
1359 | trackingQueue.async { [weak self] in
1360 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1361 | self.readWriteLock.write {
1362 | self.timedEvents = InternalProperties()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1376:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1374 | public func clearTimedEvent(event: String) {
1375 | trackingQueue.async { [weak self, event] in
1376 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1377 |
1378 | let updatedTimedEvents = self.trackInstance.clearTimedEvent(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1402:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1400 | public func clearSuperProperties() {
1401 | trackingQueue.async { [weak self] in
1402 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1403 | self.superProperties = self.trackInstance.clearSuperProperties(self.superProperties)
1404 | MixpanelPersistence.saveSuperProperties(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1422:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1420 | public func registerSuperProperties(_ properties: Properties) {
1421 | trackingQueue.async { [weak self] in
1422 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1423 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1424 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1424:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1422 | guard let self = self else { return }
1423 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1424 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1425 | superProperties: self.superProperties)
1426 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1451:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1449 | ) {
1450 | trackingQueue.async { [weak self] in
1451 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1452 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1453 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1453:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1451 | guard let self = self else { return }
1452 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1453 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1454 | superProperties: self.superProperties,
1455 | defaultValue: defaultValue)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1455:23: warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1453 | properties,
1454 | superProperties: self.superProperties,
1455 | defaultValue: defaultValue)
| `- warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1456 | self.readWriteLock.write {
1457 | self.superProperties = updatedSuperProperties
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1481:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1479 | public func unregisterSuperProperty(_ propertyName: String) {
1480 | trackingQueue.async { [weak self] in
1481 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1482 | let updatedSuperProperties = self.trackInstance.unregisterSuperProperty(
1483 | propertyName,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1504:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1502 | ) {
1503 | trackingQueue.async { [weak self] in
1504 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1505 | var superPropertiesShadow = self.superProperties
1506 | self.trackInstance.updateSuperProperty(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1507:9: warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
1505 | var superPropertiesShadow = self.superProperties
1506 | self.trackInstance.updateSuperProperty(
1507 | update,
| |- warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1508 | superProperties: &superPropertiesShadow)
1509 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1623:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1621 | public func optOutTracking() {
1622 | trackingQueue.async { [weak self] in
1623 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1624 | if self.people.distinctId != nil {
1625 | self.people.deleteUser()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1669:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1667 | public func optInTracking(distinctId: String? = nil, properties: Properties? = nil) {
1668 | trackingQueue.async { [weak self] in
1669 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1670 | self.readWriteLock.write {
1671 | self.optOutStatus = false
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1679:48: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1677 | self.identify(distinctId: distinctId)
1678 | }
1679 | self.track(event: "$opt_in", properties: properties)
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1680 | }
1681 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:60:22: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
58 |
59 | public class MixpanelLogger {
60 | private static var loggers = [MixpanelLogging]()
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:61:22: warning: static property 'enabledLevels' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
59 | public class MixpanelLogger {
60 | private static var loggers = [MixpanelLogging]()
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
| |- warning: static property 'enabledLevels' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'enabledLevels' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'enabledLevels' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
63 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:62:22: warning: static property 'readWriteLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
60 | private static var loggers = [MixpanelLogging]()
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
| |- warning: static property 'readWriteLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'readWriteLock' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
63 |
64 | /// Add a `MixpanelLogging` object to receive all log messages
/Users/admin/builder/spi-builder-workspace/Sources/ReadWriteLock.swift:10:7: note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class ReadWriteLock {
| `- note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
11 | private let concurrentQueue: DispatchQueue
12 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:73:19: warning: result of call to 'write(closure:)' is unused
71 | /// Enable log messages of a specific `LogLevel` to be added to the log
72 | class func enableLevel(_ level: MixpanelLogLevel) {
73 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
74 | enabledLevels.insert(level)
75 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:80:19: warning: result of call to 'write(closure:)' is unused
78 | /// Disable log messages of a specific `LogLevel` to prevent them from being logged
79 | class func disableLevel(_ level: MixpanelLogLevel) {
80 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
81 | enabledLevels.remove(level)
82 | }
[28/29] Compiling Mixpanel MixpanelInstance.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mixpanel.swift:289:14: warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'MixpanelManager' may have shared mutable state; this is an error in the Swift 6 language mode
285 | }
286 |
287 | final class MixpanelManager {
| `- note: class 'MixpanelManager' does not conform to the 'Sendable' protocol
288 |
289 | static let sharedInstance = MixpanelManager()
| |- warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'MixpanelManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'sharedInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
290 | private var instances: [String: MixpanelInstance]
291 | private var mainInstance: MixpanelInstance?
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:790:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
788 | if hasOptedOutTracking() {
789 | if let completion = completion {
790 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
791 | }
792 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:797:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
795 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
796 | if let completion = completion {
797 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
798 | }
799 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:846:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
844 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
845 | if let completion = completion {
846 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
847 | }
848 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:802:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
800 | }
801 | trackingQueue.async { [weak self, distinctId, usePeople] in
802 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
803 |
804 | // If there's no anonymousId assigned yet, that means distinctId is stored in the storage. Assigning already stored
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:845:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
843 | alias: self.alias,
844 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
845 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
846 | DispatchQueue.main.async(execute: completion)
847 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:884:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
882 | if hasOptedOutTracking() {
883 | if let completion = completion {
884 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
885 | }
886 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:892:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
890 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
891 | if let completion = completion {
892 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
893 | }
894 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:900:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
898 | MixpanelLogger.error(message: "\(self) create alias called with empty alias")
899 | if let completion = completion {
900 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
901 | }
902 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:909:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
907 | guard let self = self else {
908 | if let completion = completion {
909 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
910 | }
911 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:953:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
951 | message: "alias: \(alias) matches distinctId: \(distinctId) - skipping api call.")
952 | if let completion = completion {
953 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
954 | }
955 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:907:26: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
905 | if alias != distinctId {
906 | trackingQueue.async { [weak self, alias] in
907 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
908 | if let completion = completion {
909 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:908:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
906 | trackingQueue.async { [weak self, alias] in
907 | guard let self = self else {
908 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
909 | DispatchQueue.main.async(execute: completion)
910 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:986:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
984 | self.archive()
985 | if let completion = completion {
986 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
987 | }
988 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:967:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
965 | flush()
966 | trackingQueue.async { [weak self] in
967 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
968 | return
969 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:985:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
983 | self.mixpanelPersistence.resetEntities()
984 | self.archive()
985 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
986 | DispatchQueue.main.async(execute: completion)
987 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1068:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1066 | if hasOptedOutTracking() {
1067 | if let completion = completion {
1068 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1069 | }
1070 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1075:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1073 | guard let self = self else {
1074 | if let completion = completion {
1075 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1076 | }
1077 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1082:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1080 | if let shouldFlush = self.delegate?.mixpanelWillFlush(self), !shouldFlush {
1081 | if let completion = completion {
1082 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1083 | }
1084 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1105:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1103 | guard let self = self else {
1104 | if let completion = completion {
1105 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1106 | }
1107 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1114:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1112 |
1113 | if let completion = completion {
1114 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1115 | }
1116 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1073:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1071 | }
1072 | trackingQueue.async { [weak self, completion] in
1073 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1074 | if let completion = completion {
1075 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1074:29: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1072 | trackingQueue.async { [weak self, completion] in
1073 | guard let self = self else {
1074 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1075 | DispatchQueue.main.async(execute: completion)
1076 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1103:26: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1101 |
1102 | self.networkQueue.async { [weak self, completion] in
1103 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1104 | if let completion = completion {
1105 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1104:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1102 | self.networkQueue.async { [weak self, completion] in
1103 | guard let self = self else {
1104 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1105 | DispatchQueue.main.async(execute: completion)
1106 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1109:25: warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1107 | return
1108 | }
1109 | self.flushQueue(eventQueue, type: .events)
| `- warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1110 | self.flushQueue(peopleQueue, type: .people)
1111 | self.flushQueue(groupsQueue, type: .groups)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1110:25: warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1108 | }
1109 | self.flushQueue(eventQueue, type: .events)
1110 | self.flushQueue(peopleQueue, type: .people)
| `- warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1111 | self.flushQueue(groupsQueue, type: .groups)
1112 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1111:25: warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1109 | self.flushQueue(eventQueue, type: .events)
1110 | self.flushQueue(peopleQueue, type: .people)
1111 | self.flushQueue(groupsQueue, type: .groups)
| `- warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1112 |
1113 | if let completion = completion {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1144:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1142 | func flushSuccess(type: FlushType, ids: [Int32]) {
1143 | trackingQueue.async { [weak self] in
1144 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1145 | return
1146 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1173:17: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1171 |
1172 | trackingQueue.async { [weak self, event, properties, epochInterval] in
1173 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1174 | return
1175 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1196:21: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1194 | let timedEventsSnapshot = self.trackInstance.track(
1195 | event: event,
1196 | properties: properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1197 | timedEvents: shadowTimedEvents,
1198 | superProperties: shadowSuperProperties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1294:19: warning: result of call to 'write(closure:)' is unused
1292 |
1293 | func removeCachedGroup(groupKey: String, groupID: MixpanelType) {
1294 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
1295 | groups.removeValue(forKey: makeMapKey(groupKey: groupKey, groupID: groupID))
1296 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1328:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1326 | let startTime = Date().timeIntervalSince1970
1327 | trackingQueue.async { [weak self, startTime, event] in
1328 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1329 | let timedEvents = self.trackInstance.time(
1330 | event: event, timedEvents: self.timedEvents, startTime: startTime)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1360:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1358 | public func clearTimedEvents() {
1359 | trackingQueue.async { [weak self] in
1360 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1361 | self.readWriteLock.write {
1362 | self.timedEvents = InternalProperties()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1376:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1374 | public func clearTimedEvent(event: String) {
1375 | trackingQueue.async { [weak self, event] in
1376 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1377 |
1378 | let updatedTimedEvents = self.trackInstance.clearTimedEvent(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1402:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1400 | public func clearSuperProperties() {
1401 | trackingQueue.async { [weak self] in
1402 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1403 | self.superProperties = self.trackInstance.clearSuperProperties(self.superProperties)
1404 | MixpanelPersistence.saveSuperProperties(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1422:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1420 | public func registerSuperProperties(_ properties: Properties) {
1421 | trackingQueue.async { [weak self] in
1422 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1423 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1424 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1424:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1422 | guard let self = self else { return }
1423 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1424 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1425 | superProperties: self.superProperties)
1426 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1451:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1449 | ) {
1450 | trackingQueue.async { [weak self] in
1451 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1452 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1453 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1453:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1451 | guard let self = self else { return }
1452 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1453 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1454 | superProperties: self.superProperties,
1455 | defaultValue: defaultValue)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1455:23: warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1453 | properties,
1454 | superProperties: self.superProperties,
1455 | defaultValue: defaultValue)
| `- warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1456 | self.readWriteLock.write {
1457 | self.superProperties = updatedSuperProperties
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1481:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1479 | public func unregisterSuperProperty(_ propertyName: String) {
1480 | trackingQueue.async { [weak self] in
1481 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1482 | let updatedSuperProperties = self.trackInstance.unregisterSuperProperty(
1483 | propertyName,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1504:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1502 | ) {
1503 | trackingQueue.async { [weak self] in
1504 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1505 | var superPropertiesShadow = self.superProperties
1506 | self.trackInstance.updateSuperProperty(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1507:9: warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
1505 | var superPropertiesShadow = self.superProperties
1506 | self.trackInstance.updateSuperProperty(
1507 | update,
| |- warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1508 | superProperties: &superPropertiesShadow)
1509 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1623:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1621 | public func optOutTracking() {
1622 | trackingQueue.async { [weak self] in
1623 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1624 | if self.people.distinctId != nil {
1625 | self.people.deleteUser()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1669:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1667 | public func optInTracking(distinctId: String? = nil, properties: Properties? = nil) {
1668 | trackingQueue.async { [weak self] in
1669 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1670 | self.readWriteLock.write {
1671 | self.optOutStatus = false
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1679:48: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1677 | self.identify(distinctId: distinctId)
1678 | }
1679 | self.track(event: "$opt_in", properties: properties)
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1680 | }
1681 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:60:22: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
58 |
59 | public class MixpanelLogger {
60 | private static var loggers = [MixpanelLogging]()
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:61:22: warning: static property 'enabledLevels' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
59 | public class MixpanelLogger {
60 | private static var loggers = [MixpanelLogging]()
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
| |- warning: static property 'enabledLevels' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'enabledLevels' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'enabledLevels' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
63 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:62:22: warning: static property 'readWriteLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
60 | private static var loggers = [MixpanelLogging]()
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
| |- warning: static property 'readWriteLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'readWriteLock' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
63 |
64 | /// Add a `MixpanelLogging` object to receive all log messages
/Users/admin/builder/spi-builder-workspace/Sources/ReadWriteLock.swift:10:7: note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class ReadWriteLock {
| `- note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
11 | private let concurrentQueue: DispatchQueue
12 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:73:19: warning: result of call to 'write(closure:)' is unused
71 | /// Enable log messages of a specific `LogLevel` to be added to the log
72 | class func enableLevel(_ level: MixpanelLogLevel) {
73 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
74 | enabledLevels.insert(level)
75 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:80:19: warning: result of call to 'write(closure:)' is unused
78 | /// Disable log messages of a specific `LogLevel` to prevent them from being logged
79 | class func disableLevel(_ level: MixpanelLogLevel) {
80 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
81 | enabledLevels.remove(level)
82 | }
[29/29] Compiling Mixpanel MixpanelLogger.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mixpanel.swift:289:14: warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'MixpanelManager' may have shared mutable state; this is an error in the Swift 6 language mode
285 | }
286 |
287 | final class MixpanelManager {
| `- note: class 'MixpanelManager' does not conform to the 'Sendable' protocol
288 |
289 | static let sharedInstance = MixpanelManager()
| |- warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'MixpanelManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'sharedInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
290 | private var instances: [String: MixpanelInstance]
291 | private var mainInstance: MixpanelInstance?
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:790:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
788 | if hasOptedOutTracking() {
789 | if let completion = completion {
790 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
791 | }
792 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:797:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
795 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
796 | if let completion = completion {
797 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
798 | }
799 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:846:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
844 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
845 | if let completion = completion {
846 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
847 | }
848 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:802:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
800 | }
801 | trackingQueue.async { [weak self, distinctId, usePeople] in
802 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
803 |
804 | // If there's no anonymousId assigned yet, that means distinctId is stored in the storage. Assigning already stored
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:845:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
843 | alias: self.alias,
844 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
845 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
846 | DispatchQueue.main.async(execute: completion)
847 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:884:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
882 | if hasOptedOutTracking() {
883 | if let completion = completion {
884 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
885 | }
886 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:892:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
890 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
891 | if let completion = completion {
892 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
893 | }
894 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:900:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
898 | MixpanelLogger.error(message: "\(self) create alias called with empty alias")
899 | if let completion = completion {
900 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
901 | }
902 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:909:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
907 | guard let self = self else {
908 | if let completion = completion {
909 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
910 | }
911 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:953:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
951 | message: "alias: \(alias) matches distinctId: \(distinctId) - skipping api call.")
952 | if let completion = completion {
953 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
954 | }
955 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:907:26: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
905 | if alias != distinctId {
906 | trackingQueue.async { [weak self, alias] in
907 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
908 | if let completion = completion {
909 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:908:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
906 | trackingQueue.async { [weak self, alias] in
907 | guard let self = self else {
908 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
909 | DispatchQueue.main.async(execute: completion)
910 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:986:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
984 | self.archive()
985 | if let completion = completion {
986 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
987 | }
988 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:967:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
965 | flush()
966 | trackingQueue.async { [weak self] in
967 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
968 | return
969 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:985:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
983 | self.mixpanelPersistence.resetEntities()
984 | self.archive()
985 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
986 | DispatchQueue.main.async(execute: completion)
987 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1068:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1066 | if hasOptedOutTracking() {
1067 | if let completion = completion {
1068 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1069 | }
1070 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1075:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1073 | guard let self = self else {
1074 | if let completion = completion {
1075 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1076 | }
1077 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1082:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1080 | if let shouldFlush = self.delegate?.mixpanelWillFlush(self), !shouldFlush {
1081 | if let completion = completion {
1082 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1083 | }
1084 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1105:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1103 | guard let self = self else {
1104 | if let completion = completion {
1105 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1106 | }
1107 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1114:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1112 |
1113 | if let completion = completion {
1114 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1115 | }
1116 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1073:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1071 | }
1072 | trackingQueue.async { [weak self, completion] in
1073 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1074 | if let completion = completion {
1075 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1074:29: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1072 | trackingQueue.async { [weak self, completion] in
1073 | guard let self = self else {
1074 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1075 | DispatchQueue.main.async(execute: completion)
1076 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1103:26: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1101 |
1102 | self.networkQueue.async { [weak self, completion] in
1103 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1104 | if let completion = completion {
1105 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1104:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1102 | self.networkQueue.async { [weak self, completion] in
1103 | guard let self = self else {
1104 | if let completion = completion {
| |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1105 | DispatchQueue.main.async(execute: completion)
1106 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1109:25: warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1107 | return
1108 | }
1109 | self.flushQueue(eventQueue, type: .events)
| `- warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1110 | self.flushQueue(peopleQueue, type: .people)
1111 | self.flushQueue(groupsQueue, type: .groups)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1110:25: warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1108 | }
1109 | self.flushQueue(eventQueue, type: .events)
1110 | self.flushQueue(peopleQueue, type: .people)
| `- warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1111 | self.flushQueue(groupsQueue, type: .groups)
1112 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1111:25: warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1109 | self.flushQueue(eventQueue, type: .events)
1110 | self.flushQueue(peopleQueue, type: .people)
1111 | self.flushQueue(groupsQueue, type: .groups)
| `- warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1112 |
1113 | if let completion = completion {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1144:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1142 | func flushSuccess(type: FlushType, ids: [Int32]) {
1143 | trackingQueue.async { [weak self] in
1144 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1145 | return
1146 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1173:17: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1171 |
1172 | trackingQueue.async { [weak self, event, properties, epochInterval] in
1173 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1174 | return
1175 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1196:21: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1194 | let timedEventsSnapshot = self.trackInstance.track(
1195 | event: event,
1196 | properties: properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1197 | timedEvents: shadowTimedEvents,
1198 | superProperties: shadowSuperProperties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1294:19: warning: result of call to 'write(closure:)' is unused
1292 |
1293 | func removeCachedGroup(groupKey: String, groupID: MixpanelType) {
1294 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
1295 | groups.removeValue(forKey: makeMapKey(groupKey: groupKey, groupID: groupID))
1296 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1328:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1326 | let startTime = Date().timeIntervalSince1970
1327 | trackingQueue.async { [weak self, startTime, event] in
1328 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1329 | let timedEvents = self.trackInstance.time(
1330 | event: event, timedEvents: self.timedEvents, startTime: startTime)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1360:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1358 | public func clearTimedEvents() {
1359 | trackingQueue.async { [weak self] in
1360 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1361 | self.readWriteLock.write {
1362 | self.timedEvents = InternalProperties()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1376:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1374 | public func clearTimedEvent(event: String) {
1375 | trackingQueue.async { [weak self, event] in
1376 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1377 |
1378 | let updatedTimedEvents = self.trackInstance.clearTimedEvent(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1402:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1400 | public func clearSuperProperties() {
1401 | trackingQueue.async { [weak self] in
1402 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1403 | self.superProperties = self.trackInstance.clearSuperProperties(self.superProperties)
1404 | MixpanelPersistence.saveSuperProperties(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1422:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1420 | public func registerSuperProperties(_ properties: Properties) {
1421 | trackingQueue.async { [weak self] in
1422 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1423 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1424 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1424:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1422 | guard let self = self else { return }
1423 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1424 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1425 | superProperties: self.superProperties)
1426 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1451:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1449 | ) {
1450 | trackingQueue.async { [weak self] in
1451 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1452 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1453 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1453:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1451 | guard let self = self else { return }
1452 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1453 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1454 | superProperties: self.superProperties,
1455 | defaultValue: defaultValue)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1455:23: warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1453 | properties,
1454 | superProperties: self.superProperties,
1455 | defaultValue: defaultValue)
| `- warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1456 | self.readWriteLock.write {
1457 | self.superProperties = updatedSuperProperties
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1481:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1479 | public func unregisterSuperProperty(_ propertyName: String) {
1480 | trackingQueue.async { [weak self] in
1481 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1482 | let updatedSuperProperties = self.trackInstance.unregisterSuperProperty(
1483 | propertyName,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1504:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1502 | ) {
1503 | trackingQueue.async { [weak self] in
1504 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1505 | var superPropertiesShadow = self.superProperties
1506 | self.trackInstance.updateSuperProperty(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1507:9: warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
1505 | var superPropertiesShadow = self.superProperties
1506 | self.trackInstance.updateSuperProperty(
1507 | update,
| |- warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1508 | superProperties: &superPropertiesShadow)
1509 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1623:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1621 | public func optOutTracking() {
1622 | trackingQueue.async { [weak self] in
1623 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1624 | if self.people.distinctId != nil {
1625 | self.people.deleteUser()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1669:24: warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
73 |
74 | /// The class that represents the Mixpanel Instance
75 | open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDelegate,
| `- note: class 'MixpanelInstance' does not conform to the 'Sendable' protocol
76 | MixpanelFlagDelegate
77 | {
:
1667 | public func optInTracking(distinctId: String? = nil, properties: Properties? = nil) {
1668 | trackingQueue.async { [weak self] in
1669 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1670 | self.readWriteLock.write {
1671 | self.optOutStatus = false
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1679:48: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1677 | self.identify(distinctId: distinctId)
1678 | }
1679 | self.track(event: "$opt_in", properties: properties)
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1680 | }
1681 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelType.swift:14:17: note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
12 | /// MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
13 | /// Numbers are not NaN or infinity
14 | public protocol MixpanelType: Any {
| `- note: protocol 'MixpanelType' does not conform to the 'Sendable' protocol
15 | /**
16 | Checks if this object has nested object types that Mixpanel supports.
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:60:22: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
58 |
59 | public class MixpanelLogger {
60 | private static var loggers = [MixpanelLogging]()
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:61:22: warning: static property 'enabledLevels' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
59 | public class MixpanelLogger {
60 | private static var loggers = [MixpanelLogging]()
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
| |- warning: static property 'enabledLevels' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'enabledLevels' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'enabledLevels' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
63 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:62:22: warning: static property 'readWriteLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
60 | private static var loggers = [MixpanelLogging]()
61 | private static var enabledLevels = Set<MixpanelLogLevel>()
62 | private static let readWriteLock: ReadWriteLock = ReadWriteLock(label: "loggerLock")
| |- warning: static property 'readWriteLock' is not concurrency-safe because non-'Sendable' type 'ReadWriteLock' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'readWriteLock' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
63 |
64 | /// Add a `MixpanelLogging` object to receive all log messages
/Users/admin/builder/spi-builder-workspace/Sources/ReadWriteLock.swift:10:7: note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class ReadWriteLock {
| `- note: class 'ReadWriteLock' does not conform to the 'Sendable' protocol
11 | private let concurrentQueue: DispatchQueue
12 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:73:19: warning: result of call to 'write(closure:)' is unused
71 | /// Enable log messages of a specific `LogLevel` to be added to the log
72 | class func enableLevel(_ level: MixpanelLogLevel) {
73 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
74 | enabledLevels.insert(level)
75 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelLogger.swift:80:19: warning: result of call to 'write(closure:)' is unused
78 | /// Disable log messages of a specific `LogLevel` to prevent them from being logged
79 | class func disableLevel(_ level: MixpanelLogLevel) {
80 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
81 | enabledLevels.remove(level)
82 | }
Build complete! (7.95s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "Mixpanel",
"name" : "Mixpanel",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "12.0"
},
{
"name" : "tvos",
"version" : "11.0"
},
{
"name" : "macos",
"version" : "10.13"
},
{
"name" : "watchos",
"version" : "4.0"
}
],
"products" : [
{
"name" : "Mixpanel",
"targets" : [
"Mixpanel"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "Mixpanel",
"module_type" : "SwiftTarget",
"name" : "Mixpanel",
"path" : "Sources",
"product_memberships" : [
"Mixpanel"
],
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Sources/Mixpanel/PrivacyInfo.xcprivacy",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"AutomaticEvents.swift",
"AutomaticProperties.swift",
"Constants.swift",
"Data+Compression.swift",
"Error.swift",
"FeatureFlags.swift",
"FileLogging.swift",
"Flush.swift",
"FlushRequest.swift",
"Group.swift",
"JSONHandler.swift",
"MPDB.swift",
"Mixpanel.swift",
"MixpanelInstance.swift",
"MixpanelLogger.swift",
"MixpanelOptions.swift",
"MixpanelPersistence.swift",
"MixpanelType.swift",
"Network.swift",
"People.swift",
"PrintLogging.swift",
"ReadWriteLock.swift",
"SessionMetadata.swift",
"Track.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Done.