Build Information
Successful build of Mixpanel, reference 6.3.0 (44b215), with Swift 6.1 for macOS (SPM) on 30 Apr 2026 22:14:53 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 InferSendableFromCapturesBuild Log
583 | result = [:]
584 | }
585 | 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
586 | }
587 | }
[31/40] 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:380:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
378 | // Dispatch fetch trigger to allow caller to continue
379 | trackingQueue.async { [weak self] in
380 | self?._fetchFlagsIfNeeded(completion: completion)
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
381 | }
382 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:380:45: warning: capture of 'completion' with non-sendable type '((Bool) -> Void)?' in a '@Sendable' closure
378 | // Dispatch fetch trigger to allow caller to continue
379 | trackingQueue.async { [weak self] in
380 | self?._fetchFlagsIfNeeded(completion: completion)
| |- warning: capture of 'completion' with non-sendable type '((Bool) -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
381 | }
382 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:389:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
387 | }
388 | trackingQueue.async { [weak self] in
389 | self?._fetchFlagsIfNeeded { _ in
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
390 | completion()
391 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:390:9: warning: capture of 'completion' with non-sendable type '() -> Void' in a '@Sendable' closure
388 | trackingQueue.async { [weak self] in
389 | self?._fetchFlagsIfNeeded { _ in
390 | 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'
391 | }
392 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:390:9: warning: capture of 'completion' with non-sendable type '() -> Void' in an isolated closure; this is an error in the Swift 6 language mode
388 | trackingQueue.async { [weak self] in
389 | self?._fetchFlagsIfNeeded { _ in
390 | completion()
| |- warning: capture of 'completion' with non-sendable type '() -> 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'
391 | }
392 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:465:24: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
463 | ) {
464 | trackingQueue.async { [weak self] in
465 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
466 |
467 | var flagVariant: MixpanelFlagVariant?
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:483:37: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
34 |
35 | // Represents the variant associated with a feature flag
36 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
37 | public let key: String // Corresponds to 'variant_key' from API
38 | public let value: Any? // Corresponds to 'variant_value' from API
:
481 |
482 | if flagsAreCurrentlyReady {
483 | let result = flagVariant ?? fallback
| `- warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
484 | if flagVariant != nil, needsTrackingCheck {
485 | // Perform atomic check-and-track
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:488:36: warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in a '@Sendable' closure
486 | self._trackFlagIfNeeded(flagName: flagName, variant: result)
487 | }
488 | 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'
489 |
490 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:483:37: warning: implicit capture of 'fallback' requires that 'MixpanelFlagVariant' conforms to 'Sendable'; this is an error in the Swift 6 language mode
34 |
35 | // Represents the variant associated with a feature flag
36 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
37 | public let key: String // Corresponds to 'variant_key' from API
38 | public let value: Any? // Corresponds to 'variant_value' from API
:
481 |
482 | if flagsAreCurrentlyReady {
483 | 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
484 | if flagVariant != nil, needsTrackingCheck {
485 | // Perform atomic check-and-track
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:499:67: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in an isolated closure; this is an error in the Swift 6 language mode
34 |
35 | // Represents the variant associated with a feature flag
36 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
37 | public let key: String // Corresponds to 'variant_key' from API
38 | public let value: Any? // Corresponds to 'variant_value' from API
:
497 | if success {
498 | // Fetch succeeded – call the private impl directly to avoid false positive DEBUG warning
499 | result = self._getVariantSyncImpl(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
500 | } else {
501 | MixpanelLogger.warn(message: "Failed to fetch flags, returning fallback for \(flagName).")
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:505: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
503 | }
504 | // Call original completion (on main thread)
505 | 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'
506 | }
507 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:564:24: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
562 | func getAllVariants(completion: @escaping ([String: MixpanelFlagVariant]) -> Void) {
563 | trackingQueue.async { [weak self] in
564 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
565 | DispatchQueue.main.async { completion([:]) }
566 | return
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:565:36: warning: capture of 'completion' with non-sendable type '([String : MixpanelFlagVariant]) -> Void' in a '@Sendable' closure
563 | trackingQueue.async { [weak self] in
564 | guard let self = self else {
565 | DispatchQueue.main.async { completion([:]) }
| |- warning: capture of 'completion' with non-sendable type '([String : MixpanelFlagVariant]) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
566 | return
567 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:585:38: warning: capture of 'completion' with non-sendable type '([String : MixpanelFlagVariant]) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
583 | result = [:]
584 | }
585 | DispatchQueue.main.async { completion(result) }
| |- warning: capture of 'completion' with non-sendable type '([String : 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'
586 | }
587 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:1010:21: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
1008 | DispatchQueue.global(qos: .userInitiated).async { [weak self] in
1009 | // Record to backend (fire-and-forget)
1010 | self?.recordFirstTimeEvent(
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
1011 | flagId: pendingEvent.flagId,
1012 | projectId: pendingEvent.projectId,
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:1011:33: warning: capture of 'pendingEvent' with non-sendable type 'PendingFirstTimeEvent' in a '@Sendable' closure
83 |
84 | /// Represents a pending first-time event definition from the flags endpoint
85 | struct PendingFirstTimeEvent: Decodable {
| `- note: consider making struct 'PendingFirstTimeEvent' conform to the 'Sendable' protocol
86 | let flagKey: String
87 | let flagId: String
:
1009 | // Record to backend (fire-and-forget)
1010 | self?.recordFirstTimeEvent(
1011 | flagId: pendingEvent.flagId,
| `- warning: capture of 'pendingEvent' with non-sendable type 'PendingFirstTimeEvent' in a '@Sendable' closure
1012 | projectId: pendingEvent.projectId,
1013 | firstTimeEventHash: pendingEvent.firstTimeEventHash,
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:738:7: warning: sending 'handlers' risks causing data races; this is an error in the Swift 6 language mode
736 |
737 | DispatchQueue.main.async {
738 | 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
739 | }
740 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:601:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
599 | // Dispatch completion to main queue to avoid potential deadlock
600 | DispatchQueue.main.async {
601 | 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
602 | }
603 | return // Exit method
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:872:7: warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
870 | // Dispatch delegate call asynchronously to main thread for safety
871 | DispatchQueue.main.async {
872 | 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
873 | MixpanelLogger.debug(message: "Tracked $experiment_started for \(flagName) (dispatched to main)")
874 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:505:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
503 | }
504 | // Call original completion (on main thread)
505 | 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
506 | }
507 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:505:49: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
503 | }
504 | // Call original completion (on main thread)
505 | 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
506 | }
507 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:585:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
583 | result = [:]
584 | }
585 | 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
586 | }
587 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:585:49: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
583 | result = [:]
584 | }
585 | 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
586 | }
587 | }
[32/40] 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:380:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
378 | // Dispatch fetch trigger to allow caller to continue
379 | trackingQueue.async { [weak self] in
380 | self?._fetchFlagsIfNeeded(completion: completion)
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
381 | }
382 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:380:45: warning: capture of 'completion' with non-sendable type '((Bool) -> Void)?' in a '@Sendable' closure
378 | // Dispatch fetch trigger to allow caller to continue
379 | trackingQueue.async { [weak self] in
380 | self?._fetchFlagsIfNeeded(completion: completion)
| |- warning: capture of 'completion' with non-sendable type '((Bool) -> Void)?' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
381 | }
382 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:389:7: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
387 | }
388 | trackingQueue.async { [weak self] in
389 | self?._fetchFlagsIfNeeded { _ in
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
390 | completion()
391 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:390:9: warning: capture of 'completion' with non-sendable type '() -> Void' in a '@Sendable' closure
388 | trackingQueue.async { [weak self] in
389 | self?._fetchFlagsIfNeeded { _ in
390 | 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'
391 | }
392 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:390:9: warning: capture of 'completion' with non-sendable type '() -> Void' in an isolated closure; this is an error in the Swift 6 language mode
388 | trackingQueue.async { [weak self] in
389 | self?._fetchFlagsIfNeeded { _ in
390 | completion()
| |- warning: capture of 'completion' with non-sendable type '() -> 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'
391 | }
392 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:465:24: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
463 | ) {
464 | trackingQueue.async { [weak self] in
465 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
466 |
467 | var flagVariant: MixpanelFlagVariant?
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:483:37: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
34 |
35 | // Represents the variant associated with a feature flag
36 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
37 | public let key: String // Corresponds to 'variant_key' from API
38 | public let value: Any? // Corresponds to 'variant_value' from API
:
481 |
482 | if flagsAreCurrentlyReady {
483 | let result = flagVariant ?? fallback
| `- warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in a '@Sendable' closure
484 | if flagVariant != nil, needsTrackingCheck {
485 | // Perform atomic check-and-track
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:488:36: warning: capture of 'completion' with non-sendable type '(MixpanelFlagVariant) -> Void' in a '@Sendable' closure
486 | self._trackFlagIfNeeded(flagName: flagName, variant: result)
487 | }
488 | 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'
489 |
490 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:483:37: warning: implicit capture of 'fallback' requires that 'MixpanelFlagVariant' conforms to 'Sendable'; this is an error in the Swift 6 language mode
34 |
35 | // Represents the variant associated with a feature flag
36 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
37 | public let key: String // Corresponds to 'variant_key' from API
38 | public let value: Any? // Corresponds to 'variant_value' from API
:
481 |
482 | if flagsAreCurrentlyReady {
483 | 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
484 | if flagVariant != nil, needsTrackingCheck {
485 | // Perform atomic check-and-track
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:499:67: warning: capture of 'fallback' with non-sendable type 'MixpanelFlagVariant' in an isolated closure; this is an error in the Swift 6 language mode
34 |
35 | // Represents the variant associated with a feature flag
36 | public struct MixpanelFlagVariant: Decodable {
| `- note: consider making struct 'MixpanelFlagVariant' conform to the 'Sendable' protocol
37 | public let key: String // Corresponds to 'variant_key' from API
38 | public let value: Any? // Corresponds to 'variant_value' from API
:
497 | if success {
498 | // Fetch succeeded – call the private impl directly to avoid false positive DEBUG warning
499 | result = self._getVariantSyncImpl(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
500 | } else {
501 | MixpanelLogger.warn(message: "Failed to fetch flags, returning fallback for \(flagName).")
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:505: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
503 | }
504 | // Call original completion (on main thread)
505 | 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'
506 | }
507 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:564:24: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
562 | func getAllVariants(completion: @escaping ([String: MixpanelFlagVariant]) -> Void) {
563 | trackingQueue.async { [weak self] in
564 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
565 | DispatchQueue.main.async { completion([:]) }
566 | return
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:565:36: warning: capture of 'completion' with non-sendable type '([String : MixpanelFlagVariant]) -> Void' in a '@Sendable' closure
563 | trackingQueue.async { [weak self] in
564 | guard let self = self else {
565 | DispatchQueue.main.async { completion([:]) }
| |- warning: capture of 'completion' with non-sendable type '([String : MixpanelFlagVariant]) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
566 | return
567 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:585:38: warning: capture of 'completion' with non-sendable type '([String : MixpanelFlagVariant]) -> Void' in an isolated closure; this is an error in the Swift 6 language mode
583 | result = [:]
584 | }
585 | DispatchQueue.main.async { completion(result) }
| |- warning: capture of 'completion' with non-sendable type '([String : 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'
586 | }
587 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:1010:21: warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
309 | // --- FeatureFlagManager Class ---
310 |
311 | class FeatureFlagManager: MixpanelFlags {
| `- note: class 'FeatureFlagManager' does not conform to the 'Sendable' protocol
312 |
313 | weak var delegate: MixpanelFlagDelegate? {
:
1008 | DispatchQueue.global(qos: .userInitiated).async { [weak self] in
1009 | // Record to backend (fire-and-forget)
1010 | self?.recordFirstTimeEvent(
| `- warning: capture of 'self' with non-sendable type 'FeatureFlagManager?' in a '@Sendable' closure
1011 | flagId: pendingEvent.flagId,
1012 | projectId: pendingEvent.projectId,
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:1011:33: warning: capture of 'pendingEvent' with non-sendable type 'PendingFirstTimeEvent' in a '@Sendable' closure
83 |
84 | /// Represents a pending first-time event definition from the flags endpoint
85 | struct PendingFirstTimeEvent: Decodable {
| `- note: consider making struct 'PendingFirstTimeEvent' conform to the 'Sendable' protocol
86 | let flagKey: String
87 | let flagId: String
:
1009 | // Record to backend (fire-and-forget)
1010 | self?.recordFirstTimeEvent(
1011 | flagId: pendingEvent.flagId,
| `- warning: capture of 'pendingEvent' with non-sendable type 'PendingFirstTimeEvent' in a '@Sendable' closure
1012 | projectId: pendingEvent.projectId,
1013 | firstTimeEventHash: pendingEvent.firstTimeEventHash,
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:738:7: warning: sending 'handlers' risks causing data races; this is an error in the Swift 6 language mode
736 |
737 | DispatchQueue.main.async {
738 | 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
739 | }
740 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:601:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
599 | // Dispatch completion to main queue to avoid potential deadlock
600 | DispatchQueue.main.async {
601 | 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
602 | }
603 | return // Exit method
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:872:7: warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
870 | // Dispatch delegate call asynchronously to main thread for safety
871 | DispatchQueue.main.async {
872 | 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
873 | MixpanelLogger.debug(message: "Tracked $experiment_started for \(flagName) (dispatched to main)")
874 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:505:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
503 | }
504 | // Call original completion (on main thread)
505 | 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
506 | }
507 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:505:49: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
503 | }
504 | // Call original completion (on main thread)
505 | 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
506 | }
507 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:585:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
583 | result = [:]
584 | }
585 | 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
586 | }
587 | }
/Users/admin/builder/spi-builder-workspace/Sources/FeatureFlags.swift:585:49: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
583 | result = [:]
584 | }
585 | 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
586 | }
587 | }
[33/40] 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
[34/40] 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
[35/40] Compiling Mixpanel Mixpanel.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mixpanel.swift:293: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
289 | }
290 |
291 | final class MixpanelManager {
| `- note: class 'MixpanelManager' does not conform to the 'Sendable' protocol
292 |
293 | 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
294 | private var instances: [String: MixpanelInstance]
295 | private var mainInstance: MixpanelInstance?
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:817:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
815 | if hasOptedOutTracking() {
816 | if let completion = completion {
817 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
818 | }
819 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:824:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
822 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
823 | if let completion = completion {
824 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
825 | }
826 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:873:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
871 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
872 | if let completion = completion {
873 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
874 | }
875 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:829: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 | {
:
827 | }
828 | trackingQueue.async { [weak self, distinctId, usePeople] in
829 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
830 |
831 | // 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:872:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
870 | alias: self.alias,
871 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
872 | 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'
873 | DispatchQueue.main.async(execute: completion)
874 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:911:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
909 | if hasOptedOutTracking() {
910 | if let completion = completion {
911 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
912 | }
913 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:919:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
917 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
918 | if let completion = completion {
919 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
920 | }
921 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:927:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
925 | MixpanelLogger.error(message: "\(self) create alias called with empty alias")
926 | if let completion = completion {
927 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
928 | }
929 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:936:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
934 | guard let self = self else {
935 | if let completion = completion {
936 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
937 | }
938 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:980:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
978 | message: "alias: \(alias) matches distinctId: \(distinctId) - skipping api call.")
979 | if let completion = completion {
980 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
981 | }
982 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:934: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 | {
:
932 | if alias != distinctId {
933 | trackingQueue.async { [weak self, alias] in
934 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
935 | if let completion = completion {
936 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:935:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
933 | trackingQueue.async { [weak self, alias] in
934 | guard let self = self else {
935 | 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'
936 | DispatchQueue.main.async(execute: completion)
937 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1013:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1011 | self.archive()
1012 | if let completion = completion {
1013 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1014 | }
1015 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:994: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 | {
:
992 | flush()
993 | trackingQueue.async { [weak self] in
994 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
995 | return
996 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1012:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1010 | self.mixpanelPersistence.resetEntities()
1011 | self.archive()
1012 | 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'
1013 | DispatchQueue.main.async(execute: completion)
1014 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1111:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1109 | if hasOptedOutTracking() {
1110 | if let completion = completion {
1111 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1112 | }
1113 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1118:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1116 | guard let self = self else {
1117 | if let completion = completion {
1118 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1119 | }
1120 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1125:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1123 | if let shouldFlush = self.delegate?.mixpanelWillFlush(self), !shouldFlush {
1124 | if let completion = completion {
1125 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1126 | }
1127 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1148:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1146 | guard let self = self else {
1147 | if let completion = completion {
1148 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1149 | }
1150 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1157:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1155 |
1156 | if let completion = completion {
1157 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1158 | }
1159 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1116: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 | {
:
1114 | }
1115 | trackingQueue.async { [weak self, completion] in
1116 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1117 | if let completion = completion {
1118 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1117:29: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1115 | trackingQueue.async { [weak self, completion] in
1116 | guard let self = self else {
1117 | 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'
1118 | DispatchQueue.main.async(execute: completion)
1119 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1146: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 | {
:
1144 |
1145 | self.networkQueue.async { [weak self, completion] in
1146 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1147 | if let completion = completion {
1148 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1147:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1145 | self.networkQueue.async { [weak self, completion] in
1146 | guard let self = self else {
1147 | 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'
1148 | DispatchQueue.main.async(execute: completion)
1149 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1152:25: warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1150 | return
1151 | }
1152 | self.flushQueue(eventQueue, type: .events)
| `- warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1153 | self.flushQueue(peopleQueue, type: .people)
1154 | self.flushQueue(groupsQueue, type: .groups)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1153:25: warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1151 | }
1152 | self.flushQueue(eventQueue, type: .events)
1153 | self.flushQueue(peopleQueue, type: .people)
| `- warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1154 | self.flushQueue(groupsQueue, type: .groups)
1155 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1154:25: warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1152 | self.flushQueue(eventQueue, type: .events)
1153 | self.flushQueue(peopleQueue, type: .people)
1154 | self.flushQueue(groupsQueue, type: .groups)
| `- warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1155 |
1156 | if let completion = completion {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1187: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 | {
:
1185 | func flushSuccess(type: FlushType, ids: [Int32]) {
1186 | trackingQueue.async { [weak self] in
1187 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1188 | return
1189 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1216: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 | {
:
1214 |
1215 | trackingQueue.async { [weak self, event, properties, epochInterval] in
1216 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1217 | return
1218 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1239:21: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1237 | let timedEventsSnapshot = self.trackInstance.track(
1238 | event: event,
1239 | properties: properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1240 | timedEvents: shadowTimedEvents,
1241 | 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:1337:19: warning: result of call to 'write(closure:)' is unused
1335 |
1336 | func removeCachedGroup(groupKey: String, groupID: MixpanelType) {
1337 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
1338 | groups.removeValue(forKey: makeMapKey(groupKey: groupKey, groupID: groupID))
1339 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1371: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 | {
:
1369 | let startTime = Date().timeIntervalSince1970
1370 | trackingQueue.async { [weak self, startTime, event] in
1371 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1372 | let timedEvents = self.trackInstance.time(
1373 | event: event, timedEvents: self.timedEvents, startTime: startTime)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1403: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 | {
:
1401 | public func clearTimedEvents() {
1402 | trackingQueue.async { [weak self] in
1403 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1404 | self.readWriteLock.write {
1405 | self.timedEvents = InternalProperties()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1419: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 | {
:
1417 | public func clearTimedEvent(event: String) {
1418 | trackingQueue.async { [weak self, event] in
1419 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1420 |
1421 | let updatedTimedEvents = self.trackInstance.clearTimedEvent(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1445: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 | {
:
1443 | public func clearSuperProperties() {
1444 | trackingQueue.async { [weak self] in
1445 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1446 | self.superProperties = self.trackInstance.clearSuperProperties(self.superProperties)
1447 | MixpanelPersistence.saveSuperProperties(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1465: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 | {
:
1463 | public func registerSuperProperties(_ properties: Properties) {
1464 | trackingQueue.async { [weak self] in
1465 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1466 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1467 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1467:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1465 | guard let self = self else { return }
1466 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1467 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1468 | superProperties: self.superProperties)
1469 | 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:1494: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 | {
:
1492 | ) {
1493 | trackingQueue.async { [weak self] in
1494 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1495 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1496 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1496:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1494 | guard let self = self else { return }
1495 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1496 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1497 | superProperties: self.superProperties,
1498 | 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:1498:23: warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1496 | properties,
1497 | superProperties: self.superProperties,
1498 | defaultValue: defaultValue)
| `- warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1499 | self.readWriteLock.write {
1500 | 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:1524: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 | {
:
1522 | public func unregisterSuperProperty(_ propertyName: String) {
1523 | trackingQueue.async { [weak self] in
1524 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1525 | let updatedSuperProperties = self.trackInstance.unregisterSuperProperty(
1526 | propertyName,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1547: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 | {
:
1545 | ) {
1546 | trackingQueue.async { [weak self] in
1547 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1548 | var superPropertiesShadow = self.superProperties
1549 | self.trackInstance.updateSuperProperty(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1550:9: warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
1548 | var superPropertiesShadow = self.superProperties
1549 | self.trackInstance.updateSuperProperty(
1550 | 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'
1551 | superProperties: &superPropertiesShadow)
1552 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1666: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 | {
:
1664 | public func optOutTracking() {
1665 | trackingQueue.async { [weak self] in
1666 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1667 | if self.people.distinctId != nil {
1668 | self.people.deleteUser()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1712: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 | {
:
1710 | public func optInTracking(distinctId: String? = nil, properties: Properties? = nil) {
1711 | trackingQueue.async { [weak self] in
1712 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1713 | self.readWriteLock.write {
1714 | self.optOutStatus = false
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1722:48: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1720 | self.identify(distinctId: distinctId)
1721 | }
1722 | 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
1723 | }
1724 |
/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 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:461:28: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
459 | // See: https://github.com/mixpanel/mixpanel-swift/issues/522
460 | DispatchQueue.main.async { [weak self] in
461 | guard let self = self else { return }
| |- 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
462 | self.automaticEvents.initializeEvents(instanceName: self.name)
463 | }
[36/40] Compiling Mixpanel MixpanelInstance.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mixpanel.swift:293: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
289 | }
290 |
291 | final class MixpanelManager {
| `- note: class 'MixpanelManager' does not conform to the 'Sendable' protocol
292 |
293 | 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
294 | private var instances: [String: MixpanelInstance]
295 | private var mainInstance: MixpanelInstance?
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:817:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
815 | if hasOptedOutTracking() {
816 | if let completion = completion {
817 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
818 | }
819 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:824:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
822 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
823 | if let completion = completion {
824 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
825 | }
826 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:873:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
871 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
872 | if let completion = completion {
873 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
874 | }
875 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:829: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 | {
:
827 | }
828 | trackingQueue.async { [weak self, distinctId, usePeople] in
829 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
830 |
831 | // 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:872:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
870 | alias: self.alias,
871 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
872 | 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'
873 | DispatchQueue.main.async(execute: completion)
874 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:911:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
909 | if hasOptedOutTracking() {
910 | if let completion = completion {
911 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
912 | }
913 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:919:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
917 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
918 | if let completion = completion {
919 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
920 | }
921 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:927:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
925 | MixpanelLogger.error(message: "\(self) create alias called with empty alias")
926 | if let completion = completion {
927 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
928 | }
929 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:936:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
934 | guard let self = self else {
935 | if let completion = completion {
936 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
937 | }
938 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:980:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
978 | message: "alias: \(alias) matches distinctId: \(distinctId) - skipping api call.")
979 | if let completion = completion {
980 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
981 | }
982 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:934: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 | {
:
932 | if alias != distinctId {
933 | trackingQueue.async { [weak self, alias] in
934 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
935 | if let completion = completion {
936 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:935:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
933 | trackingQueue.async { [weak self, alias] in
934 | guard let self = self else {
935 | 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'
936 | DispatchQueue.main.async(execute: completion)
937 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1013:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1011 | self.archive()
1012 | if let completion = completion {
1013 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1014 | }
1015 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:994: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 | {
:
992 | flush()
993 | trackingQueue.async { [weak self] in
994 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
995 | return
996 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1012:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1010 | self.mixpanelPersistence.resetEntities()
1011 | self.archive()
1012 | 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'
1013 | DispatchQueue.main.async(execute: completion)
1014 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1111:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1109 | if hasOptedOutTracking() {
1110 | if let completion = completion {
1111 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1112 | }
1113 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1118:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1116 | guard let self = self else {
1117 | if let completion = completion {
1118 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1119 | }
1120 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1125:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1123 | if let shouldFlush = self.delegate?.mixpanelWillFlush(self), !shouldFlush {
1124 | if let completion = completion {
1125 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1126 | }
1127 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1148:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1146 | guard let self = self else {
1147 | if let completion = completion {
1148 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1149 | }
1150 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1157:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1155 |
1156 | if let completion = completion {
1157 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1158 | }
1159 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1116: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 | {
:
1114 | }
1115 | trackingQueue.async { [weak self, completion] in
1116 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1117 | if let completion = completion {
1118 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1117:29: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1115 | trackingQueue.async { [weak self, completion] in
1116 | guard let self = self else {
1117 | 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'
1118 | DispatchQueue.main.async(execute: completion)
1119 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1146: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 | {
:
1144 |
1145 | self.networkQueue.async { [weak self, completion] in
1146 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1147 | if let completion = completion {
1148 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1147:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1145 | self.networkQueue.async { [weak self, completion] in
1146 | guard let self = self else {
1147 | 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'
1148 | DispatchQueue.main.async(execute: completion)
1149 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1152:25: warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1150 | return
1151 | }
1152 | self.flushQueue(eventQueue, type: .events)
| `- warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1153 | self.flushQueue(peopleQueue, type: .people)
1154 | self.flushQueue(groupsQueue, type: .groups)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1153:25: warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1151 | }
1152 | self.flushQueue(eventQueue, type: .events)
1153 | self.flushQueue(peopleQueue, type: .people)
| `- warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1154 | self.flushQueue(groupsQueue, type: .groups)
1155 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1154:25: warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1152 | self.flushQueue(eventQueue, type: .events)
1153 | self.flushQueue(peopleQueue, type: .people)
1154 | self.flushQueue(groupsQueue, type: .groups)
| `- warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1155 |
1156 | if let completion = completion {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1187: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 | {
:
1185 | func flushSuccess(type: FlushType, ids: [Int32]) {
1186 | trackingQueue.async { [weak self] in
1187 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1188 | return
1189 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1216: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 | {
:
1214 |
1215 | trackingQueue.async { [weak self, event, properties, epochInterval] in
1216 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1217 | return
1218 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1239:21: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1237 | let timedEventsSnapshot = self.trackInstance.track(
1238 | event: event,
1239 | properties: properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1240 | timedEvents: shadowTimedEvents,
1241 | 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:1337:19: warning: result of call to 'write(closure:)' is unused
1335 |
1336 | func removeCachedGroup(groupKey: String, groupID: MixpanelType) {
1337 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
1338 | groups.removeValue(forKey: makeMapKey(groupKey: groupKey, groupID: groupID))
1339 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1371: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 | {
:
1369 | let startTime = Date().timeIntervalSince1970
1370 | trackingQueue.async { [weak self, startTime, event] in
1371 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1372 | let timedEvents = self.trackInstance.time(
1373 | event: event, timedEvents: self.timedEvents, startTime: startTime)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1403: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 | {
:
1401 | public func clearTimedEvents() {
1402 | trackingQueue.async { [weak self] in
1403 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1404 | self.readWriteLock.write {
1405 | self.timedEvents = InternalProperties()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1419: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 | {
:
1417 | public func clearTimedEvent(event: String) {
1418 | trackingQueue.async { [weak self, event] in
1419 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1420 |
1421 | let updatedTimedEvents = self.trackInstance.clearTimedEvent(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1445: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 | {
:
1443 | public func clearSuperProperties() {
1444 | trackingQueue.async { [weak self] in
1445 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1446 | self.superProperties = self.trackInstance.clearSuperProperties(self.superProperties)
1447 | MixpanelPersistence.saveSuperProperties(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1465: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 | {
:
1463 | public func registerSuperProperties(_ properties: Properties) {
1464 | trackingQueue.async { [weak self] in
1465 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1466 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1467 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1467:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1465 | guard let self = self else { return }
1466 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1467 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1468 | superProperties: self.superProperties)
1469 | 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:1494: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 | {
:
1492 | ) {
1493 | trackingQueue.async { [weak self] in
1494 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1495 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1496 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1496:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1494 | guard let self = self else { return }
1495 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1496 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1497 | superProperties: self.superProperties,
1498 | 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:1498:23: warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1496 | properties,
1497 | superProperties: self.superProperties,
1498 | defaultValue: defaultValue)
| `- warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1499 | self.readWriteLock.write {
1500 | 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:1524: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 | {
:
1522 | public func unregisterSuperProperty(_ propertyName: String) {
1523 | trackingQueue.async { [weak self] in
1524 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1525 | let updatedSuperProperties = self.trackInstance.unregisterSuperProperty(
1526 | propertyName,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1547: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 | {
:
1545 | ) {
1546 | trackingQueue.async { [weak self] in
1547 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1548 | var superPropertiesShadow = self.superProperties
1549 | self.trackInstance.updateSuperProperty(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1550:9: warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
1548 | var superPropertiesShadow = self.superProperties
1549 | self.trackInstance.updateSuperProperty(
1550 | 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'
1551 | superProperties: &superPropertiesShadow)
1552 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1666: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 | {
:
1664 | public func optOutTracking() {
1665 | trackingQueue.async { [weak self] in
1666 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1667 | if self.people.distinctId != nil {
1668 | self.people.deleteUser()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1712: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 | {
:
1710 | public func optInTracking(distinctId: String? = nil, properties: Properties? = nil) {
1711 | trackingQueue.async { [weak self] in
1712 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1713 | self.readWriteLock.write {
1714 | self.optOutStatus = false
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1722:48: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1720 | self.identify(distinctId: distinctId)
1721 | }
1722 | 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
1723 | }
1724 |
/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 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:461:28: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
459 | // See: https://github.com/mixpanel/mixpanel-swift/issues/522
460 | DispatchQueue.main.async { [weak self] in
461 | guard let self = self else { return }
| |- 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
462 | self.automaticEvents.initializeEvents(instanceName: self.name)
463 | }
[37/40] Compiling Mixpanel MixpanelLogger.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mixpanel.swift:293: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
289 | }
290 |
291 | final class MixpanelManager {
| `- note: class 'MixpanelManager' does not conform to the 'Sendable' protocol
292 |
293 | 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
294 | private var instances: [String: MixpanelInstance]
295 | private var mainInstance: MixpanelInstance?
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:817:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
815 | if hasOptedOutTracking() {
816 | if let completion = completion {
817 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
818 | }
819 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:824:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
822 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
823 | if let completion = completion {
824 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
825 | }
826 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:873:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
871 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
872 | if let completion = completion {
873 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
874 | }
875 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:829: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 | {
:
827 | }
828 | trackingQueue.async { [weak self, distinctId, usePeople] in
829 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
830 |
831 | // 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:872:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
870 | alias: self.alias,
871 | hadPersistedDistinctId: self.hadPersistedDistinctId), instanceName: self.name)
872 | 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'
873 | DispatchQueue.main.async(execute: completion)
874 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:911:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
909 | if hasOptedOutTracking() {
910 | if let completion = completion {
911 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
912 | }
913 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:919:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
917 | MixpanelLogger.error(message: "\(self) cannot identify blank distinct id")
918 | if let completion = completion {
919 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
920 | }
921 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:927:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
925 | MixpanelLogger.error(message: "\(self) create alias called with empty alias")
926 | if let completion = completion {
927 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
928 | }
929 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:936:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
934 | guard let self = self else {
935 | if let completion = completion {
936 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
937 | }
938 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:980:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
978 | message: "alias: \(alias) matches distinctId: \(distinctId) - skipping api call.")
979 | if let completion = completion {
980 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
981 | }
982 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:934: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 | {
:
932 | if alias != distinctId {
933 | trackingQueue.async { [weak self, alias] in
934 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
935 | if let completion = completion {
936 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:935:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
933 | trackingQueue.async { [weak self, alias] in
934 | guard let self = self else {
935 | 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'
936 | DispatchQueue.main.async(execute: completion)
937 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1013:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1011 | self.archive()
1012 | if let completion = completion {
1013 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1014 | }
1015 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:994: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 | {
:
992 | flush()
993 | trackingQueue.async { [weak self] in
994 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
995 | return
996 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1012:27: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1010 | self.mixpanelPersistence.resetEntities()
1011 | self.archive()
1012 | 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'
1013 | DispatchQueue.main.async(execute: completion)
1014 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1111:43: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1109 | if hasOptedOutTracking() {
1110 | if let completion = completion {
1111 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1112 | }
1113 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1118:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1116 | guard let self = self else {
1117 | if let completion = completion {
1118 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1119 | }
1120 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1125:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1123 | if let shouldFlush = self.delegate?.mixpanelWillFlush(self), !shouldFlush {
1124 | if let completion = completion {
1125 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1126 | }
1127 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1148:47: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1146 | guard let self = self else {
1147 | if let completion = completion {
1148 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1149 | }
1150 | return
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1157:45: warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1155 |
1156 | if let completion = completion {
1157 | DispatchQueue.main.async(execute: completion)
| `- warning: converting non-sendable function value to '@MainActor @Sendable @convention(block) () -> Void' may introduce data races
1158 | }
1159 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1116: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 | {
:
1114 | }
1115 | trackingQueue.async { [weak self, completion] in
1116 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1117 | if let completion = completion {
1118 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1117:29: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1115 | trackingQueue.async { [weak self, completion] in
1116 | guard let self = self else {
1117 | 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'
1118 | DispatchQueue.main.async(execute: completion)
1119 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1146: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 | {
:
1144 |
1145 | self.networkQueue.async { [weak self, completion] in
1146 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1147 | if let completion = completion {
1148 | DispatchQueue.main.async(execute: completion)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1147:31: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a '@Sendable' closure
1145 | self.networkQueue.async { [weak self, completion] in
1146 | guard let self = self else {
1147 | 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'
1148 | DispatchQueue.main.async(execute: completion)
1149 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1152:25: warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1150 | return
1151 | }
1152 | self.flushQueue(eventQueue, type: .events)
| `- warning: capture of 'eventQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1153 | self.flushQueue(peopleQueue, type: .people)
1154 | self.flushQueue(groupsQueue, type: .groups)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1153:25: warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1151 | }
1152 | self.flushQueue(eventQueue, type: .events)
1153 | self.flushQueue(peopleQueue, type: .people)
| `- warning: capture of 'peopleQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1154 | self.flushQueue(groupsQueue, type: .groups)
1155 |
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1154:25: warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1152 | self.flushQueue(eventQueue, type: .events)
1153 | self.flushQueue(peopleQueue, type: .people)
1154 | self.flushQueue(groupsQueue, type: .groups)
| `- warning: capture of 'groupsQueue' with non-sendable type '[InternalProperties]' (aka 'Array<Dictionary<String, Any>>') in a '@Sendable' closure
1155 |
1156 | if let completion = completion {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1187: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 | {
:
1185 | func flushSuccess(type: FlushType, ids: [Int32]) {
1186 | trackingQueue.async { [weak self] in
1187 | guard let self = self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1188 | return
1189 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1216: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 | {
:
1214 |
1215 | trackingQueue.async { [weak self, event, properties, epochInterval] in
1216 | guard let self else {
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1217 | return
1218 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1239:21: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1237 | let timedEventsSnapshot = self.trackInstance.track(
1238 | event: event,
1239 | properties: properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1240 | timedEvents: shadowTimedEvents,
1241 | 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:1337:19: warning: result of call to 'write(closure:)' is unused
1335 |
1336 | func removeCachedGroup(groupKey: String, groupID: MixpanelType) {
1337 | readWriteLock.write {
| `- warning: result of call to 'write(closure:)' is unused
1338 | groups.removeValue(forKey: makeMapKey(groupKey: groupKey, groupID: groupID))
1339 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1371: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 | {
:
1369 | let startTime = Date().timeIntervalSince1970
1370 | trackingQueue.async { [weak self, startTime, event] in
1371 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1372 | let timedEvents = self.trackInstance.time(
1373 | event: event, timedEvents: self.timedEvents, startTime: startTime)
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1403: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 | {
:
1401 | public func clearTimedEvents() {
1402 | trackingQueue.async { [weak self] in
1403 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1404 | self.readWriteLock.write {
1405 | self.timedEvents = InternalProperties()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1419: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 | {
:
1417 | public func clearTimedEvent(event: String) {
1418 | trackingQueue.async { [weak self, event] in
1419 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1420 |
1421 | let updatedTimedEvents = self.trackInstance.clearTimedEvent(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1445: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 | {
:
1443 | public func clearSuperProperties() {
1444 | trackingQueue.async { [weak self] in
1445 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1446 | self.superProperties = self.trackInstance.clearSuperProperties(self.superProperties)
1447 | MixpanelPersistence.saveSuperProperties(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1465: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 | {
:
1463 | public func registerSuperProperties(_ properties: Properties) {
1464 | trackingQueue.async { [weak self] in
1465 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1466 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1467 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1467:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1465 | guard let self = self else { return }
1466 | let updatedSuperProperties = self.trackInstance.registerSuperProperties(
1467 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1468 | superProperties: self.superProperties)
1469 | 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:1494: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 | {
:
1492 | ) {
1493 | trackingQueue.async { [weak self] in
1494 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1495 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1496 | properties,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1496:9: warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1494 | guard let self = self else { return }
1495 | let updatedSuperProperties = self.trackInstance.registerSuperPropertiesOnce(
1496 | properties,
| `- warning: capture of 'properties' with non-sendable type 'Properties' (aka 'Dictionary<String, any MixpanelType>') in a '@Sendable' closure
1497 | superProperties: self.superProperties,
1498 | 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:1498:23: warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1496 | properties,
1497 | superProperties: self.superProperties,
1498 | defaultValue: defaultValue)
| `- warning: capture of 'defaultValue' with non-sendable type '(any MixpanelType)?' in a '@Sendable' closure
1499 | self.readWriteLock.write {
1500 | 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:1524: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 | {
:
1522 | public func unregisterSuperProperty(_ propertyName: String) {
1523 | trackingQueue.async { [weak self] in
1524 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1525 | let updatedSuperProperties = self.trackInstance.unregisterSuperProperty(
1526 | propertyName,
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1547: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 | {
:
1545 | ) {
1546 | trackingQueue.async { [weak self] in
1547 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1548 | var superPropertiesShadow = self.superProperties
1549 | self.trackInstance.updateSuperProperty(
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1550:9: warning: capture of 'update' with non-sendable type '(inout InternalProperties) -> Void' (aka '(inout Dictionary<String, Any>) -> ()') in a '@Sendable' closure
1548 | var superPropertiesShadow = self.superProperties
1549 | self.trackInstance.updateSuperProperty(
1550 | 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'
1551 | superProperties: &superPropertiesShadow)
1552 | self.readWriteLock.write {
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1666: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 | {
:
1664 | public func optOutTracking() {
1665 | trackingQueue.async { [weak self] in
1666 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1667 | if self.people.distinctId != nil {
1668 | self.people.deleteUser()
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1712: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 | {
:
1710 | public func optInTracking(distinctId: String? = nil, properties: Properties? = nil) {
1711 | trackingQueue.async { [weak self] in
1712 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'MixpanelInstance?' in a '@Sendable' closure
1713 | self.readWriteLock.write {
1714 | self.optOutStatus = false
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:1722:48: warning: capture of 'properties' with non-sendable type 'Properties?' (aka 'Optional<Dictionary<String, any MixpanelType>>') in a '@Sendable' closure
1720 | self.identify(distinctId: distinctId)
1721 | }
1722 | 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
1723 | }
1724 |
/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 | }
/Users/admin/builder/spi-builder-workspace/Sources/MixpanelInstance.swift:461:28: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
459 | // See: https://github.com/mixpanel/mixpanel-swift/issues/522
460 | DispatchQueue.main.async { [weak self] in
461 | guard let self = self else { return }
| |- 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
462 | self.automaticEvents.initializeEvents(instanceName: self.name)
463 | }
[38/40] Compiling Mixpanel AutomaticEvents.swift
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:143:15: warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
22 | #endif
23 |
24 | class AutomaticEvents: NSObject, SKPaymentTransactionObserver, SKProductsRequestDelegate {
| `- note: class 'AutomaticEvents' does not conform to the 'Sendable' protocol
25 |
26 | var _minimumSessionDuration: UInt64 = 10000
:
141 | case .purchased:
142 | productIdentifiers.insert(trans.payment.productIdentifier)
143 | awaitingTransactions[trans.payment.productIdentifier] = trans
| `- warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
144 | case .failed: break
145 | case .restored: break
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:11: warning: capture of 'productsRequest' with non-sendable type 'SKProductsRequest' in a '@Sendable' closure
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: capture of 'productsRequest' with non-sendable type 'SKProductsRequest' in a '@Sendable' closure
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/StoreKit.framework/Headers/SKProductsRequest.h:28:12: note: class 'SKProductsRequest' does not conform to the 'Sendable' protocol
26 | API_DEPRECATED("Use Product.products(for:)", ios(3.0, 18.0), macos(10.7, 15.0), watchos(6.2, 11.0), visionos(1.0, 2.0))
27 | NS_SWIFT_NONSENDABLE
28 | @interface SKProductsRequest : SKRequest {
| `- note: class 'SKProductsRequest' does not conform to the 'Sendable' protocol
29 | @private
30 | id _productsRequestInternal;
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:142:15: warning: mutation of captured var 'productIdentifiers' in concurrently-executing code
140 | switch trans.transactionState {
141 | case .purchased:
142 | productIdentifiers.insert(trans.payment.productIdentifier)
| `- warning: mutation of captured var 'productIdentifiers' in concurrently-executing code
143 | awaitingTransactions[trans.payment.productIdentifier] = trans
144 | case .failed: break
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:150:13: warning: reference to captured var 'productIdentifiers' in concurrently-executing code
148 | }
149 | }
150 | if !productIdentifiers.isEmpty {
| `- warning: reference to captured var 'productIdentifiers' in concurrently-executing code
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:11: warning: mutation of captured var 'productsRequest' in concurrently-executing code
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: mutation of captured var 'productsRequest' in concurrently-executing code
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:67: warning: reference to captured var 'productIdentifiers' in concurrently-executing code
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: reference to captured var 'productIdentifiers' in concurrently-executing code
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:152:11: warning: reference to captured var 'productsRequest' in concurrently-executing code
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
| `- warning: reference to captured var 'productsRequest' in concurrently-executing code
153 | productsRequest.start()
154 | }
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:153:11: warning: reference to captured var 'productsRequest' in concurrently-executing code
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
153 | productsRequest.start()
| `- warning: reference to captured var 'productsRequest' in concurrently-executing code
154 | }
155 | }
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:166:26: warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
22 | #endif
23 |
24 | class AutomaticEvents: NSObject, SKPaymentTransactionObserver, SKProductsRequestDelegate {
| `- note: class 'AutomaticEvents' does not conform to the 'Sendable' protocol
25 |
26 | var _minimumSessionDuration: UInt64 = 10000
:
164 | awaitingTransactionsWriteLock.async { [self] in
165 | for product in response.products {
166 | if let trans = awaitingTransactions[product.productIdentifier] {
| `- warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
167 | delegate?.track(
168 | event: "$ae_iap",
/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 |
[39/40] Compiling Mixpanel AutomaticProperties.swift
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:143:15: warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
22 | #endif
23 |
24 | class AutomaticEvents: NSObject, SKPaymentTransactionObserver, SKProductsRequestDelegate {
| `- note: class 'AutomaticEvents' does not conform to the 'Sendable' protocol
25 |
26 | var _minimumSessionDuration: UInt64 = 10000
:
141 | case .purchased:
142 | productIdentifiers.insert(trans.payment.productIdentifier)
143 | awaitingTransactions[trans.payment.productIdentifier] = trans
| `- warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
144 | case .failed: break
145 | case .restored: break
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:11: warning: capture of 'productsRequest' with non-sendable type 'SKProductsRequest' in a '@Sendable' closure
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: capture of 'productsRequest' with non-sendable type 'SKProductsRequest' in a '@Sendable' closure
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/StoreKit.framework/Headers/SKProductsRequest.h:28:12: note: class 'SKProductsRequest' does not conform to the 'Sendable' protocol
26 | API_DEPRECATED("Use Product.products(for:)", ios(3.0, 18.0), macos(10.7, 15.0), watchos(6.2, 11.0), visionos(1.0, 2.0))
27 | NS_SWIFT_NONSENDABLE
28 | @interface SKProductsRequest : SKRequest {
| `- note: class 'SKProductsRequest' does not conform to the 'Sendable' protocol
29 | @private
30 | id _productsRequestInternal;
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:142:15: warning: mutation of captured var 'productIdentifiers' in concurrently-executing code
140 | switch trans.transactionState {
141 | case .purchased:
142 | productIdentifiers.insert(trans.payment.productIdentifier)
| `- warning: mutation of captured var 'productIdentifiers' in concurrently-executing code
143 | awaitingTransactions[trans.payment.productIdentifier] = trans
144 | case .failed: break
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:150:13: warning: reference to captured var 'productIdentifiers' in concurrently-executing code
148 | }
149 | }
150 | if !productIdentifiers.isEmpty {
| `- warning: reference to captured var 'productIdentifiers' in concurrently-executing code
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:11: warning: mutation of captured var 'productsRequest' in concurrently-executing code
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: mutation of captured var 'productsRequest' in concurrently-executing code
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:67: warning: reference to captured var 'productIdentifiers' in concurrently-executing code
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: reference to captured var 'productIdentifiers' in concurrently-executing code
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:152:11: warning: reference to captured var 'productsRequest' in concurrently-executing code
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
| `- warning: reference to captured var 'productsRequest' in concurrently-executing code
153 | productsRequest.start()
154 | }
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:153:11: warning: reference to captured var 'productsRequest' in concurrently-executing code
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
153 | productsRequest.start()
| `- warning: reference to captured var 'productsRequest' in concurrently-executing code
154 | }
155 | }
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:166:26: warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
22 | #endif
23 |
24 | class AutomaticEvents: NSObject, SKPaymentTransactionObserver, SKProductsRequestDelegate {
| `- note: class 'AutomaticEvents' does not conform to the 'Sendable' protocol
25 |
26 | var _minimumSessionDuration: UInt64 = 10000
:
164 | awaitingTransactionsWriteLock.async { [self] in
165 | for product in response.products {
166 | if let trans = awaitingTransactions[product.productIdentifier] {
| `- warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
167 | delegate?.track(
168 | event: "$ae_iap",
/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 |
[40/40] Compiling Mixpanel Constants.swift
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:143:15: warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
22 | #endif
23 |
24 | class AutomaticEvents: NSObject, SKPaymentTransactionObserver, SKProductsRequestDelegate {
| `- note: class 'AutomaticEvents' does not conform to the 'Sendable' protocol
25 |
26 | var _minimumSessionDuration: UInt64 = 10000
:
141 | case .purchased:
142 | productIdentifiers.insert(trans.payment.productIdentifier)
143 | awaitingTransactions[trans.payment.productIdentifier] = trans
| `- warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
144 | case .failed: break
145 | case .restored: break
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:11: warning: capture of 'productsRequest' with non-sendable type 'SKProductsRequest' in a '@Sendable' closure
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: capture of 'productsRequest' with non-sendable type 'SKProductsRequest' in a '@Sendable' closure
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/StoreKit.framework/Headers/SKProductsRequest.h:28:12: note: class 'SKProductsRequest' does not conform to the 'Sendable' protocol
26 | API_DEPRECATED("Use Product.products(for:)", ios(3.0, 18.0), macos(10.7, 15.0), watchos(6.2, 11.0), visionos(1.0, 2.0))
27 | NS_SWIFT_NONSENDABLE
28 | @interface SKProductsRequest : SKRequest {
| `- note: class 'SKProductsRequest' does not conform to the 'Sendable' protocol
29 | @private
30 | id _productsRequestInternal;
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:142:15: warning: mutation of captured var 'productIdentifiers' in concurrently-executing code
140 | switch trans.transactionState {
141 | case .purchased:
142 | productIdentifiers.insert(trans.payment.productIdentifier)
| `- warning: mutation of captured var 'productIdentifiers' in concurrently-executing code
143 | awaitingTransactions[trans.payment.productIdentifier] = trans
144 | case .failed: break
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:150:13: warning: reference to captured var 'productIdentifiers' in concurrently-executing code
148 | }
149 | }
150 | if !productIdentifiers.isEmpty {
| `- warning: reference to captured var 'productIdentifiers' in concurrently-executing code
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:11: warning: mutation of captured var 'productsRequest' in concurrently-executing code
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: mutation of captured var 'productsRequest' in concurrently-executing code
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:151:67: warning: reference to captured var 'productIdentifiers' in concurrently-executing code
149 | }
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
| `- warning: reference to captured var 'productIdentifiers' in concurrently-executing code
152 | productsRequest.delegate = self
153 | productsRequest.start()
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:152:11: warning: reference to captured var 'productsRequest' in concurrently-executing code
150 | if !productIdentifiers.isEmpty {
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
| `- warning: reference to captured var 'productsRequest' in concurrently-executing code
153 | productsRequest.start()
154 | }
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:153:11: warning: reference to captured var 'productsRequest' in concurrently-executing code
151 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
152 | productsRequest.delegate = self
153 | productsRequest.start()
| `- warning: reference to captured var 'productsRequest' in concurrently-executing code
154 | }
155 | }
/Users/admin/builder/spi-builder-workspace/Sources/AutomaticEvents.swift:166:26: warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
22 | #endif
23 |
24 | class AutomaticEvents: NSObject, SKPaymentTransactionObserver, SKProductsRequestDelegate {
| `- note: class 'AutomaticEvents' does not conform to the 'Sendable' protocol
25 |
26 | var _minimumSessionDuration: UInt64 = 10000
:
164 | awaitingTransactionsWriteLock.async { [self] in
165 | for product in response.products {
166 | if let trans = awaitingTransactions[product.productIdentifier] {
| `- warning: capture of 'self' with non-sendable type 'AutomaticEvents' in a '@Sendable' closure
167 | delegate?.track(
168 | event: "$ae_iap",
/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 |
Build complete! (11.38s)
Fetching https://github.com/mixpanel/mixpanel-swift-common.git
Fetching https://github.com/advantagefse/json-logic-swift
[1/1126] Fetching json-logic-swift
[114/1664] Fetching json-logic-swift, mixpanel-swift-common
Fetched https://github.com/mixpanel/mixpanel-swift-common.git from cache (0.81s)
Fetched https://github.com/advantagefse/json-logic-swift from cache (0.81s)
Computing version for https://github.com/mixpanel/mixpanel-swift-common.git
Computed https://github.com/mixpanel/mixpanel-swift-common.git at 1.0.1 (1.41s)
Computing version for https://github.com/advantagefse/json-logic-swift
Computed https://github.com/advantagefse/json-logic-swift at 1.2.4 (0.59s)
Creating working copy for https://github.com/advantagefse/json-logic-swift
Working copy of https://github.com/advantagefse/json-logic-swift resolved at 1.2.4
Creating working copy for https://github.com/mixpanel/mixpanel-swift-common.git
Working copy of https://github.com/mixpanel/mixpanel-swift-common.git resolved at 1.0.1
Build complete.
{
"dependencies" : [
{
"identity" : "json-logic-swift",
"requirement" : {
"range" : [
{
"lower_bound" : "1.2.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/advantagefse/json-logic-swift"
},
{
"identity" : "mixpanel-swift-common",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/mixpanel/mixpanel-swift-common.git"
}
],
"manifest_display_name" : "Mixpanel",
"name" : "Mixpanel",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "12.0"
},
{
"name" : "tvos",
"version" : "12.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_dependencies" : [
"MixpanelSwiftCommon",
"jsonlogic"
],
"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.