Build Information
Successful build of Aptabase, reference main (cfd67f
), with Swift 6.1 for macOS (SPM) on 29 Apr 2025 13:39:25 UTC.
Swift 6 data race errors: 4
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
========================================
RunAll
========================================
Builder version: 4.61.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/aptabase/aptabase-swift.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/aptabase/aptabase-swift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at cfd67fa Merge pull request #27 from aptabase/fix/debug-only-data
Cloned https://github.com/aptabase/aptabase-swift.git
Revision (git rev-parse @):
cfd67fac2a228d448d9d2ac92ffc71589cc3ef00
SUCCESS checkout https://github.com/aptabase/aptabase-swift.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/aptabase/aptabase-swift.git
https://github.com/aptabase/aptabase-swift.git
{
"dependencies" : [
{
"identity" : "swift-docc-plugin",
"requirement" : {
"range" : [
{
"lower_bound" : "1.3.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-docc-plugin"
}
],
"manifest_display_name" : "Aptabase",
"name" : "Aptabase",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "maccatalyst",
"version" : "13.0"
},
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "watchos",
"version" : "6.0"
},
{
"name" : "tvos",
"version" : "13.0"
}
],
"products" : [
{
"name" : "Aptabase",
"targets" : [
"Aptabase"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "AptabaseTests",
"module_type" : "SwiftTarget",
"name" : "AptabaseTests",
"path" : "Tests/AptabaseTests",
"sources" : [
"ConcurrentQueueTests.swift",
"EventDispatcherTests.swift"
],
"target_dependencies" : [
"Aptabase"
],
"type" : "test"
},
{
"c99name" : "Aptabase",
"module_type" : "SwiftTarget",
"name" : "Aptabase",
"path" : "Sources/Aptabase",
"product_memberships" : [
"Aptabase"
],
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/PrivacyInfo.xcprivacy",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"Aptabase.swift",
"AptabaseClient.swift",
"ConcurrentQueue.swift",
"EnvironmentInfo.swift",
"EventDispatcher.swift",
"InitOptions.swift",
"TrackingMode.swift",
"Value.swift"
],
"type" : "library"
}
],
"tools_version" : "5.7"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
[1/1] Compiling plugin Swift-DocC Preview
[2/2] Compiling plugin Swift-DocC
Building for debugging...
[2/5] Write sources
[2/5] Copying PrivacyInfo.xcprivacy
[4/5] Write swift-version-2F0A5646E1D333AE.txt
[6/15] Compiling Aptabase resource_bundle_accessor.swift
[7/15] Compiling Aptabase AptabaseClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/AptabaseClient.swift:57:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
55 | flushTimer = nil
56 |
57 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
58 | await flush()
| `- note: closure captures 'self' which is accessible to code in the current task
59 | }
60 |
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/AptabaseClient.swift:75:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
73 | @objc private func timerFlushSync() {
74 | if !pauseFlushTimer {
75 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
76 | self.pauseFlushTimer = true
| `- note: closure captures 'self' which is accessible to code in the current task
77 | await self.flush()
78 | self.pauseFlushTimer = false
[8/15] Compiling Aptabase EventDispatcher.swift
[9/15] Compiling Aptabase ConcurrentQueue.swift
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/ConcurrentQueue.swift:9:13: warning: capture of 'self' with non-sendable type 'ConcurrentQueue<T>' in a '@Sendable' closure
1 | import Foundation
2 |
3 | class ConcurrentQueue<T> {
| `- note: generic class 'ConcurrentQueue' does not conform to the 'Sendable' protocol
4 | private var queue = DispatchQueue(label: "com.aptabase.ConcurrentQueue", attributes: .concurrent)
5 | private var elements = [T]()
:
7 | func enqueue(_ element: T) {
8 | queue.async(flags: .barrier) {
9 | self.elements.append(element)
| `- warning: capture of 'self' with non-sendable type 'ConcurrentQueue<T>' in a '@Sendable' closure
10 | }
11 | }
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/ConcurrentQueue.swift:9:34: warning: capture of 'element' with non-sendable type 'T' in a '@Sendable' closure
1 | import Foundation
2 |
3 | class ConcurrentQueue<T> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
4 | private var queue = DispatchQueue(label: "com.aptabase.ConcurrentQueue", attributes: .concurrent)
5 | private var elements = [T]()
:
7 | func enqueue(_ element: T) {
8 | queue.async(flags: .barrier) {
9 | self.elements.append(element)
| `- warning: capture of 'element' with non-sendable type 'T' in a '@Sendable' closure
10 | }
11 | }
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/ConcurrentQueue.swift:15:13: warning: capture of 'self' with non-sendable type 'ConcurrentQueue<T>' in a '@Sendable' closure
1 | import Foundation
2 |
3 | class ConcurrentQueue<T> {
| `- note: generic class 'ConcurrentQueue' does not conform to the 'Sendable' protocol
4 | private var queue = DispatchQueue(label: "com.aptabase.ConcurrentQueue", attributes: .concurrent)
5 | private var elements = [T]()
:
13 | func enqueue(contentsOf newElements: [T]) {
14 | queue.async(flags: .barrier) {
15 | self.elements.append(contentsOf: newElements)
| `- warning: capture of 'self' with non-sendable type 'ConcurrentQueue<T>' in a '@Sendable' closure
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/ConcurrentQueue.swift:15:46: warning: capture of 'newElements' with non-sendable type '[T]' in a '@Sendable' closure
1 | import Foundation
2 |
3 | class ConcurrentQueue<T> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
4 | private var queue = DispatchQueue(label: "com.aptabase.ConcurrentQueue", attributes: .concurrent)
5 | private var elements = [T]()
:
13 | func enqueue(contentsOf newElements: [T]) {
14 | queue.async(flags: .barrier) {
15 | self.elements.append(contentsOf: newElements)
| `- warning: capture of 'newElements' with non-sendable type '[T]' in a '@Sendable' closure
16 | }
17 | }
[10/15] Compiling Aptabase TrackingMode.swift
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/TrackingMode.swift:5:29: warning: static property 'asDebug' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Represents the tracking mode (release/debug) for the client.
4 | @objc public class TrackingMode: NSObject {
| `- note: class 'TrackingMode' does not conform to the 'Sendable' protocol
5 | @objc public static let asDebug = TrackingMode(rawValue: 0)
| |- warning: static property 'asDebug' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'asDebug' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 | @objc public static let asRelease = TrackingMode(rawValue: 1)
7 | @objc public static let readFromEnvironment = TrackingMode(rawValue: 2)
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/TrackingMode.swift:6:29: warning: static property 'asRelease' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Represents the tracking mode (release/debug) for the client.
4 | @objc public class TrackingMode: NSObject {
| `- note: class 'TrackingMode' does not conform to the 'Sendable' protocol
5 | @objc public static let asDebug = TrackingMode(rawValue: 0)
6 | @objc public static let asRelease = TrackingMode(rawValue: 1)
| |- warning: static property 'asRelease' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'asRelease' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | @objc public static let readFromEnvironment = TrackingMode(rawValue: 2)
8 |
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/TrackingMode.swift:7:29: warning: static property 'readFromEnvironment' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Represents the tracking mode (release/debug) for the client.
4 | @objc public class TrackingMode: NSObject {
| `- note: class 'TrackingMode' does not conform to the 'Sendable' protocol
5 | @objc public static let asDebug = TrackingMode(rawValue: 0)
6 | @objc public static let asRelease = TrackingMode(rawValue: 1)
7 | @objc public static let readFromEnvironment = TrackingMode(rawValue: 2)
| |- warning: static property 'readFromEnvironment' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'readFromEnvironment' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 |
9 | private let rawValue: Int
[11/15] Compiling Aptabase EnvironmentInfo.swift
[12/15] Compiling Aptabase Value.swift
[13/15] Compiling Aptabase InitOptions.swift
[14/15] Compiling Aptabase Aptabase.swift
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/Aptabase.swift:19:29: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Aptabase' may have shared mutable state; this is an error in the Swift 6 language mode
12 |
13 | /// The Aptabase client used to track events.
14 | public class Aptabase: NSObject {
| `- note: class 'Aptabase' does not conform to the 'Sendable' protocol
15 | private var env = EnvironmentInfo.current()
16 | private var client: AptabaseClient?
17 |
18 | /// The shared client instance.
19 | @objc public static let shared = Aptabase()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Aptabase' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 |
21 | /// Initializes the client with given App Key.
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/Aptabase.swift:97:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
95 | /// Forces all queued events to be sent to the server
96 | @objc public func flush() {
97 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
98 | await self.client?.flush()
| `- note: closure captures 'self' which is accessible to code in the current task
99 | }
100 | }
[15/15] Emitting module Aptabase
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/Aptabase.swift:19:29: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Aptabase' may have shared mutable state; this is an error in the Swift 6 language mode
12 |
13 | /// The Aptabase client used to track events.
14 | public class Aptabase: NSObject {
| `- note: class 'Aptabase' does not conform to the 'Sendable' protocol
15 | private var env = EnvironmentInfo.current()
16 | private var client: AptabaseClient?
17 |
18 | /// The shared client instance.
19 | @objc public static let shared = Aptabase()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Aptabase' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 |
21 | /// Initializes the client with given App Key.
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/TrackingMode.swift:5:29: warning: static property 'asDebug' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Represents the tracking mode (release/debug) for the client.
4 | @objc public class TrackingMode: NSObject {
| `- note: class 'TrackingMode' does not conform to the 'Sendable' protocol
5 | @objc public static let asDebug = TrackingMode(rawValue: 0)
| |- warning: static property 'asDebug' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'asDebug' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 | @objc public static let asRelease = TrackingMode(rawValue: 1)
7 | @objc public static let readFromEnvironment = TrackingMode(rawValue: 2)
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/TrackingMode.swift:6:29: warning: static property 'asRelease' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Represents the tracking mode (release/debug) for the client.
4 | @objc public class TrackingMode: NSObject {
| `- note: class 'TrackingMode' does not conform to the 'Sendable' protocol
5 | @objc public static let asDebug = TrackingMode(rawValue: 0)
6 | @objc public static let asRelease = TrackingMode(rawValue: 1)
| |- warning: static property 'asRelease' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'asRelease' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
7 | @objc public static let readFromEnvironment = TrackingMode(rawValue: 2)
8 |
/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/TrackingMode.swift:7:29: warning: static property 'readFromEnvironment' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Represents the tracking mode (release/debug) for the client.
4 | @objc public class TrackingMode: NSObject {
| `- note: class 'TrackingMode' does not conform to the 'Sendable' protocol
5 | @objc public static let asDebug = TrackingMode(rawValue: 0)
6 | @objc public static let asRelease = TrackingMode(rawValue: 1)
7 | @objc public static let readFromEnvironment = TrackingMode(rawValue: 2)
| |- warning: static property 'readFromEnvironment' is not concurrency-safe because non-'Sendable' type 'TrackingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'readFromEnvironment' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 |
9 | private let rawValue: Int
Build complete! (20.86s)
Fetching https://github.com/apple/swift-docc-plugin
[1/2049] Fetching swift-docc-plugin
Fetched https://github.com/apple/swift-docc-plugin from cache (1.13s)
Computing version for https://github.com/apple/swift-docc-plugin
Computed https://github.com/apple/swift-docc-plugin at 1.4.3 (1.73s)
Fetching https://github.com/swiftlang/swift-docc-symbolkit from cache
Fetched https://github.com/swiftlang/swift-docc-symbolkit from cache (0.76s)
Computing version for https://github.com/swiftlang/swift-docc-symbolkit
Computed https://github.com/swiftlang/swift-docc-symbolkit at 1.0.0 (1.47s)
Creating working copy for https://github.com/swiftlang/swift-docc-symbolkit
Working copy of https://github.com/swiftlang/swift-docc-symbolkit resolved at 1.0.0
Creating working copy for https://github.com/apple/swift-docc-plugin
Working copy of https://github.com/apple/swift-docc-plugin resolved at 1.4.3
Build complete.
{
"dependencies" : [
{
"identity" : "swift-docc-plugin",
"requirement" : {
"range" : [
{
"lower_bound" : "1.3.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-docc-plugin"
}
],
"manifest_display_name" : "Aptabase",
"name" : "Aptabase",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "maccatalyst",
"version" : "13.0"
},
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "watchos",
"version" : "6.0"
},
{
"name" : "tvos",
"version" : "13.0"
}
],
"products" : [
{
"name" : "Aptabase",
"targets" : [
"Aptabase"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "AptabaseTests",
"module_type" : "SwiftTarget",
"name" : "AptabaseTests",
"path" : "Tests/AptabaseTests",
"sources" : [
"ConcurrentQueueTests.swift",
"EventDispatcherTests.swift"
],
"target_dependencies" : [
"Aptabase"
],
"type" : "test"
},
{
"c99name" : "Aptabase",
"module_type" : "SwiftTarget",
"name" : "Aptabase",
"path" : "Sources/Aptabase",
"product_memberships" : [
"Aptabase"
],
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Sources/Aptabase/PrivacyInfo.xcprivacy",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"Aptabase.swift",
"AptabaseClient.swift",
"ConcurrentQueue.swift",
"EnvironmentInfo.swift",
"EventDispatcher.swift",
"InitOptions.swift",
"TrackingMode.swift",
"Value.swift"
],
"type" : "library"
}
],
"tools_version" : "5.7"
}
Done.