Build Information
Successful build of MapboxSpeech with Swift 6.0 (beta) for macOS (SPM).
Swift 6 data race errors: 1
Build Command
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mapbox/mapbox-speech-swift.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/mapbox/mapbox-speech-swift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
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 main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/mapbox/mapbox-speech-swift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a 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
[1/7] Write MapboxSpeechCLI-entitlement.plist
[3/7] Write swift-version-6F35C1178C84523A.txt
[5/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.
[6/10] Compiling MapboxSpeech MBSpeechOptions.swift
[7/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 | }
[8/12] Compiling MapboxSpeechCLI main.swift
[9/12] Emitting module MapboxSpeechCLI
[9/12] Write Objects.LinkFileList
[10/12] Linking MapboxSpeechCLI
[11/12] Applying MapboxSpeechCLI
Build complete! (29.91s)
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.