This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

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 SwiftySound with Swift 6.0 for macOS (SPM).

Swift 6 data race errors: 6

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/adamcichy/SwiftySound.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/adamcichy/SwiftySound
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 929742f Update changelog
Cloned https://github.com/adamcichy/SwiftySound.git
Revision (git rev-parse @):
929742f4314ca7261791f969f667df71147e897f
SUCCESS checkout https://github.com/adamcichy/SwiftySound.git at master
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/adamcichy/SwiftySound.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/2] Write sources
[1/2] Write swift-version-6F35C1178C84523A.txt
[3/4] Emitting module SwiftySound
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:66:23: warning: static property 'playersPerSound' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 64 |
 65 |     /// Number of AVAudioPlayer instances created for every sound. SwiftySound creates 5 players for every sound to make sure that it will be able to play the same sound more than once. If your app doesn't need this functionality, you can reduce the number of players to 1 and reduce memory usage. You can increase the number if your app plays the sound more than 5 times at the same time.
 66 |     public static var playersPerSound: Int = 5 {
    |                       |- warning: static property 'playersPerSound' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'playersPerSound' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'playersPerSound' 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
 67 |         didSet {
 68 |             stopAll()
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:89:24: warning: static property 'sounds' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 87 |     #endif
 88 |
 89 |     private static var sounds = [URL: Sound]()
    |                        |- warning: static property 'sounds' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'sounds' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'sounds' 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
 90 |
 91 |     private static let defaultsKey = "com.moonlightapps.SwiftySound.enabled"
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:94:23: warning: static property 'enabled' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 92 |
 93 |     /// Globally enable or disable sound. This setting value is stored in UserDefaults and will be loaded on app launch.
 94 |     public static var enabled: Bool = !UserDefaults.standard.bool(forKey: defaultsKey) { didSet {
    |                       |- warning: static property 'enabled' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'enabled' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'enabled' 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
 95 |         let value = !enabled
 96 |         UserDefaults.standard.set(value, forKey: defaultsKey)
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:108:23: warning: static property 'playerClass' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
106 |
107 |     /// The class that is used to create `Player` instances. Defaults to `AVAudioPlayer`.
108 |     public static var playerClass: Player.Type = AVAudioPlayer.self
    |                       |- warning: static property 'playerClass' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'playerClass' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'playerClass' 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
109 |
110 |     /// The bundle used to load sounds from filenames. The default value of this property is Bunde.main. It can be changed to load sounds from another bundle.
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:111:23: warning: static property 'soundsBundle' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
109 |
110 |     /// The bundle used to load sounds from filenames. The default value of this property is Bunde.main. It can be changed to load sounds from another bundle.
111 |     public static var soundsBundle: Bundle = .main
    |                       |- warning: static property 'soundsBundle' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'soundsBundle' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'soundsBundle' 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
112 |
113 |     // MARK: - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:331:13: warning: var 'associatedCallbackKey' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
329 | }
330 |
331 | private var associatedCallbackKey = "com.moonlightapps.SwiftySound.associatedCallbackKey"
    |             |- warning: var 'associatedCallbackKey' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'associatedCallbackKey' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'associatedCallbackKey' 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
332 |
333 | public typealias PlayerCompletion = (Bool) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:335:1: warning: extension declares a conformance of imported type 'AVAudioPlayer' to imported protocol 'AVAudioPlayerDelegate'; this will not behave correctly if the owners of 'AVFAudio' introduce this conformance in the future
333 | public typealias PlayerCompletion = (Bool) -> Void
334 |
335 | extension AVAudioPlayer: Player, AVAudioPlayerDelegate {
    | |- warning: extension declares a conformance of imported type 'AVAudioPlayer' to imported protocol 'AVAudioPlayerDelegate'; this will not behave correctly if the owners of 'AVFAudio' introduce this conformance in the future
    | `- note: add '@retroactive' to silence this warning
336 |     public func play(numberOfLoops: Int, completion: PlayerCompletion?) -> Bool {
337 |         if let cmpl = completion {
[4/4] Compiling SwiftySound Sound.swift
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:66:23: warning: static property 'playersPerSound' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 64 |
 65 |     /// Number of AVAudioPlayer instances created for every sound. SwiftySound creates 5 players for every sound to make sure that it will be able to play the same sound more than once. If your app doesn't need this functionality, you can reduce the number of players to 1 and reduce memory usage. You can increase the number if your app plays the sound more than 5 times at the same time.
 66 |     public static var playersPerSound: Int = 5 {
    |                       |- warning: static property 'playersPerSound' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'playersPerSound' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'playersPerSound' 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
 67 |         didSet {
 68 |             stopAll()
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:89:24: warning: static property 'sounds' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 87 |     #endif
 88 |
 89 |     private static var sounds = [URL: Sound]()
    |                        |- warning: static property 'sounds' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'sounds' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'sounds' 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
 90 |
 91 |     private static let defaultsKey = "com.moonlightapps.SwiftySound.enabled"
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:94:23: warning: static property 'enabled' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
 92 |
 93 |     /// Globally enable or disable sound. This setting value is stored in UserDefaults and will be loaded on app launch.
 94 |     public static var enabled: Bool = !UserDefaults.standard.bool(forKey: defaultsKey) { didSet {
    |                       |- warning: static property 'enabled' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'enabled' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'enabled' 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
 95 |         let value = !enabled
 96 |         UserDefaults.standard.set(value, forKey: defaultsKey)
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:108:23: warning: static property 'playerClass' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
106 |
107 |     /// The class that is used to create `Player` instances. Defaults to `AVAudioPlayer`.
108 |     public static var playerClass: Player.Type = AVAudioPlayer.self
    |                       |- warning: static property 'playerClass' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'playerClass' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'playerClass' 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
109 |
110 |     /// The bundle used to load sounds from filenames. The default value of this property is Bunde.main. It can be changed to load sounds from another bundle.
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:111:23: warning: static property 'soundsBundle' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
109 |
110 |     /// The bundle used to load sounds from filenames. The default value of this property is Bunde.main. It can be changed to load sounds from another bundle.
111 |     public static var soundsBundle: Bundle = .main
    |                       |- warning: static property 'soundsBundle' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'soundsBundle' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'soundsBundle' 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
112 |
113 |     // MARK: - Initialization
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:331:13: warning: var 'associatedCallbackKey' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
329 | }
330 |
331 | private var associatedCallbackKey = "com.moonlightapps.SwiftySound.associatedCallbackKey"
    |             |- warning: var 'associatedCallbackKey' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'associatedCallbackKey' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'associatedCallbackKey' 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
332 |
333 | public typealias PlayerCompletion = (Bool) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/Sound.swift:335:1: warning: extension declares a conformance of imported type 'AVAudioPlayer' to imported protocol 'AVAudioPlayerDelegate'; this will not behave correctly if the owners of 'AVFAudio' introduce this conformance in the future
333 | public typealias PlayerCompletion = (Bool) -> Void
334 |
335 | extension AVAudioPlayer: Player, AVAudioPlayerDelegate {
    | |- warning: extension declares a conformance of imported type 'AVAudioPlayer' to imported protocol 'AVAudioPlayerDelegate'; this will not behave correctly if the owners of 'AVFAudio' introduce this conformance in the future
    | `- note: add '@retroactive' to silence this warning
336 |     public func play(numberOfLoops: Int, completion: PlayerCompletion?) -> Bool {
337 |         if let cmpl = completion {
Build complete! (26.35s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftySound",
  "name" : "SwiftySound",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "SwiftySound",
      "targets" : [
        "SwiftySound"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "SwiftySound",
      "module_type" : "SwiftTarget",
      "name" : "SwiftySound",
      "path" : "Sources",
      "product_memberships" : [
        "SwiftySound"
      ],
      "sources" : [
        "Sound.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.