Build Information
Successful build of MapboxSpeech, reference v2.1.1 (a9ef28
), with Swift 6.0 for macOS (SPM) on 2 Nov 2024 20:44:46 UTC.
Swift 6 data race errors: 1
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mapbox/mapbox-speech-swift.git
Reference: v2.1.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/mapbox/mapbox-speech-swift
* tag v2.1.1 -> FETCH_HEAD
HEAD is now at a9ef284 Merge pull request #60 from mapbox/kried/2.1.1
Cloned https://github.com/mapbox/mapbox-speech-swift.git
Revision (git rev-parse @):
a9ef284deae227c6111c27a3535098c1e9a9d8e3
SUCCESS checkout https://github.com/mapbox/mapbox-speech-swift.git at v2.1.1
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "mapbox-speech-swift",
"name": "MapboxSpeech",
"url": "https://github.com/mapbox/mapbox-speech-swift.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/mapbox-speech-swift",
"dependencies": [
]
}
]
}
Fetching https://github.com/mapbox/mapbox-speech-swift.git
[1/1138] Fetching mapbox-speech-swift
Fetched https://github.com/mapbox/mapbox-speech-swift.git from cache (1.02s)
Creating working copy for https://github.com/mapbox/mapbox-speech-swift.git
Working copy of https://github.com/mapbox/mapbox-speech-swift.git resolved at v2.1.1 (a9ef284)
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/mapbox/mapbox-speech-swift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/7] Write sources
[2/7] Write MapboxSpeechCLI-entitlement.plist
[3/7] Write swift-version--7754E27361AE5C74.txt
[5/10] Compiling MapboxSpeech MapboxSpeech.swift
/Users/admin/builder/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:88:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SpeechSynthesizer' may have shared mutable state; this is an error in the Swift 6 language mode
76 | Use `AVAudioPlayer` to play the audio that a speech synthesizer object produces.
77 | */
78 | open class SpeechSynthesizer {
| `- note: class 'SpeechSynthesizer' does not conform to the 'Sendable' protocol
79 | public typealias CompletionHandler = (_ data: Data?, _ error: SpeechError?) -> Void
80 |
:
86 | To use this object, specify a Mapbox [access token](https://www.mapbox.com/help/define-access-token/) in the `MBXAccessToken` key in the main application bundle’s Info.plist.
87 | */
88 | public static let shared = SpeechSynthesizer(accessToken: nil)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SpeechSynthesizer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
89 |
90 | /// The API endpoint to request the audio from.
/Users/admin/builder/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:154:17: warning: capture of 'completionHandler' with non-sendable type 'SpeechSynthesizer.CompletionHandler' (aka '(Optional<Data>, Optional<SpeechError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
152 | let task = dataTask(with: url, completionHandler: { (data) in
153 | DispatchQueue.main.async {
154 | completionHandler(data, nil)
| |- warning: capture of 'completionHandler' with non-sendable type 'SpeechSynthesizer.CompletionHandler' (aka '(Optional<Data>, Optional<SpeechError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
155 | }
156 | }) { (error) in
/Users/admin/builder/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:158:17: warning: capture of 'completionHandler' with non-sendable type 'SpeechSynthesizer.CompletionHandler' (aka '(Optional<Data>, Optional<SpeechError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
156 | }) { (error) in
157 | DispatchQueue.main.async {
158 | completionHandler(nil, error)
| |- warning: capture of 'completionHandler' with non-sendable type 'SpeechSynthesizer.CompletionHandler' (aka '(Optional<Data>, Optional<SpeechError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
159 | }
160 | }
/Users/admin/builder/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:180:17: warning: capture of 'errorHandler' with non-sendable type '(SpeechError) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
178 | let task = URLSession.shared.dataTask(with: request as URLRequest) { (possibleData, possibleResponse, possibleError) in
179 | if let error = possibleError {
180 | errorHandler(.unknown(response: possibleResponse, underlying: error, code: nil, message: nil))
| |- warning: capture of 'errorHandler' with non-sendable type '(SpeechError) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
181 | return
182 | }
/Users/admin/builder/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:213:13: warning: capture of 'completionHandler' with non-sendable type '(Data) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
211 | }
212 |
213 | completionHandler(data)
| |- warning: capture of 'completionHandler' with non-sendable type '(Data) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
214 | }
215 | task.resume()
/Users/admin/builder/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:154:17: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
152 | let task = dataTask(with: url, completionHandler: { (data) in
153 | DispatchQueue.main.async {
154 | completionHandler(data, nil)
| |- warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completionHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
155 | }
156 | }) { (error) in
/Users/admin/builder/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:158:17: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
156 | }) { (error) in
157 | DispatchQueue.main.async {
158 | completionHandler(nil, error)
| |- warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completionHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
159 | }
160 | }
[6/10] Compiling MapboxSpeech MBSpeechOptions.swift
[7/10] Emitting module MapboxSpeech
/Users/admin/builder/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:88:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SpeechSynthesizer' may have shared mutable state; this is an error in the Swift 6 language mode
76 | Use `AVAudioPlayer` to play the audio that a speech synthesizer object produces.
77 | */
78 | open class SpeechSynthesizer {
| `- note: class 'SpeechSynthesizer' does not conform to the 'Sendable' protocol
79 | public typealias CompletionHandler = (_ data: Data?, _ error: SpeechError?) -> Void
80 |
:
86 | To use this object, specify a Mapbox [access token](https://www.mapbox.com/help/define-access-token/) in the `MBXAccessToken` key in the main application bundle’s Info.plist.
87 | */
88 | public static let shared = SpeechSynthesizer(accessToken: nil)
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SpeechSynthesizer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
89 |
90 | /// The API endpoint to request the audio from.
[8/12] Emitting module MapboxSpeechCLI
[9/12] Compiling MapboxSpeechCLI main.swift
[9/12] Write Objects.LinkFileList
[10/12] Linking MapboxSpeechCLI
[11/12] Applying MapboxSpeechCLI
Build complete! (10.42s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "MapboxSpeech",
"name" : "MapboxSpeech",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "MapboxSpeech",
"targets" : [
"MapboxSpeech"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "MapboxSpeechCLI",
"targets" : [
"MapboxSpeechCLI"
],
"type" : {
"executable" : null
}
}
],
"targets" : [
{
"c99name" : "MapboxSpeechTests",
"module_type" : "SwiftTarget",
"name" : "MapboxSpeechTests",
"path" : "Tests/MapboxSpeechTests",
"sources" : [
"MapboxVoiceTests.swift"
],
"target_dependencies" : [
"MapboxSpeech"
],
"type" : "test"
},
{
"c99name" : "MapboxSpeechCLI",
"module_type" : "SwiftTarget",
"name" : "MapboxSpeechCLI",
"path" : "Sources/MapboxSpeechCLI",
"product_memberships" : [
"MapboxSpeechCLI"
],
"sources" : [
"main.swift"
],
"target_dependencies" : [
"MapboxSpeech"
],
"type" : "executable"
},
{
"c99name" : "MapboxSpeech",
"module_type" : "SwiftTarget",
"name" : "MapboxSpeech",
"path" : "Sources/MapboxSpeech",
"product_memberships" : [
"MapboxSpeech",
"MapboxSpeechCLI"
],
"sources" : [
"MBSpeechOptions.swift",
"MapboxSpeech.swift"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
Done.