The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of MapboxSpeech, reference main (a9ef28), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 07:16:28 UTC.

Swift 6 data race errors: 1

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.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
========================================
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 (0.85s)
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 main (a9ef284)
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/mapbox/mapbox-speech-swift.git
https://github.com/mapbox/mapbox-speech-swift.git
{
  "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"
}
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
Building for debugging...
[0/7] Write MapboxSpeechCLI-entitlement.plist
[0/7] Write sources
[3/7] Write swift-version-2F0A5646E1D333AE.txt
[5/10] Compiling MapboxSpeech MBSpeechOptions.swift
[6/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: 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
 89 |
 90 |     /// The API endpoint to request the audio from.
/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
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
    |                 `- 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
211 |             }
212 |
213 |             completionHandler(data)
    |             |- warning: capture of 'completionHandler' with non-sendable type '(Data) -> Void' in a '@Sendable' closure
    |             `- 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 |         }
[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: 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
 89 |
 90 |     /// The API endpoint to request the audio from.
[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! (7.69s)
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.