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 FRadioPlayer, reference master (34ac9e), with Swift 6.1 for macOS (SPM) on 26 Apr 2025 08:02:07 UTC.

Swift 6 data race errors: 2

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/fethica/FRadioPlayer.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/fethica/FRadioPlayer
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 34ac9e3 Merge pull request #79 from nicolassrod/master
Cloned https://github.com/fethica/FRadioPlayer.git
Revision (git rev-parse @):
34ac9e399ce1268a03a05f989148cca5084978d6
SUCCESS checkout https://github.com/fethica/FRadioPlayer.git at master
========================================
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": "fradioplayer",
      "name": "FRadioPlayer",
      "url": "https://github.com/fethica/FRadioPlayer.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/FRadioPlayer",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/fethica/FRadioPlayer.git
[1/1460] Fetching fradioplayer
Fetched https://github.com/fethica/FRadioPlayer.git from cache (1.03s)
Creating working copy for https://github.com/fethica/FRadioPlayer.git
Working copy of https://github.com/fethica/FRadioPlayer.git resolved at master (34ac9e3)
warning: '.resolve-product-dependencies': dependency 'fradioplayer' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/fethica/FRadioPlayer.git
https://github.com/fethica/FRadioPlayer.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "FRadioPlayer",
  "name" : "FRadioPlayer",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.12"
    },
    {
      "name" : "ios",
      "version" : "10.0"
    },
    {
      "name" : "tvos",
      "version" : "10.0"
    }
  ],
  "products" : [
    {
      "name" : "FRadioPlayer",
      "targets" : [
        "FRadioPlayer"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FRadioPlayerTests",
      "module_type" : "SwiftTarget",
      "name" : "FRadioPlayerTests",
      "path" : "Tests/FRadioPlayerTests",
      "sources" : [
        "FRadioPlayerTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "FRadioPlayer"
      ],
      "type" : "test"
    },
    {
      "c99name" : "FRadioPlayer",
      "module_type" : "SwiftTarget",
      "name" : "FRadioPlayer",
      "path" : "Sources/FRadioPlayer",
      "product_memberships" : [
        "FRadioPlayer"
      ],
      "sources" : [
        "FRadioAPI.swift",
        "FRadioPlayer.swift",
        "Reachability.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/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/6] Compiling FRadioPlayer Reachability.swift
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/Reachability.swift:241:30: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
239 |
240 |         DispatchQueue.main.async { [weak self] in
241 |             guard let self = self else { return }
    |                              |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                              `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
242 |             block?(self)
243 |             self.notificationCenter.post(name: .reachabilityChanged, object: self)
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/Reachability.swift:242:13: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
240 |         DispatchQueue.main.async { [weak self] in
241 |             guard let self = self else { return }
242 |             block?(self)
    |             |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
    |             `- note: task-isolated 'block' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
243 |             self.notificationCenter.post(name: .reachabilityChanged, object: self)
244 |         }
[4/6] Compiling FRadioPlayer FRadioAPI.swift
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioAPI.swift:27:17: warning: capture of 'completionHandler' with non-sendable type '(URL?) -> ()' in a '@Sendable' closure
25 |         URLSession.shared.dataTask(with: url, completionHandler: { (data, response, error) in
26 |             guard error == nil, let data = data else {
27 |                 completionHandler(nil)
   |                 |- warning: capture of 'completionHandler' with non-sendable type '(URL?) -> ()' in a '@Sendable' closure
   |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
28 |                 return
29 |             }
[5/6] Compiling FRadioPlayer FRadioPlayer.swift
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:136:12: warning: non-final class 'FRadioPlayer' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
134 |  */
135 |
136 | open class FRadioPlayer: NSObject {
    |            `- warning: non-final class 'FRadioPlayer' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
137 |
138 |     // MARK: - Properties
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:147:19: warning: stored property 'delegate' of 'Sendable'-conforming class 'FRadioPlayer' is mutable; this is an error in the Swift 6 language mode
145 |      Implement the methods declared by the `FRadioPlayerDelegate` object to respond to user interactions and the player output.
146 |      */
147 |     open weak var delegate: FRadioPlayerDelegate?
    |                   `- warning: stored property 'delegate' of 'Sendable'-conforming class 'FRadioPlayer' is mutable; this is an error in the Swift 6 language mode
148 |
149 |     /// The player current radio URL
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:170:24: warning: main actor-isolated property 'rate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
168 |     /// Read only property to get the current AVPlayer rate.
169 |     open var rate: Float? {
170 |         return player?.rate
    |                        `- warning: main actor-isolated property 'rate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
171 |     }
172 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayer.h:184:17: note: property declared here
 182 |  Before macOS 13, iOS 16, tvOS 16, and watchOS 9, this property must be accessed on the main thread/queue.
 183 |  */
 184 | @property float rate
     |                 `- note: property declared here
 185 | #if AVF_DEPLOYING_TO_2022_RELEASES_AND_LATER
 186 | NS_SWIFT_NONISOLATED
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:282:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
274 |
275 |      */
276 |     open func play() {
    |               `- note: add '@MainActor' to make instance method 'play()' part of global actor 'MainActor'
277 |         guard let player = player else { return }
278 |         if player.currentItem == nil, playerItem != nil {
    :
280 |         }
281 |
282 |         player.play()
    |                `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
283 |         playbackState = .playing
284 |     }
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
  |                      `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:292:16: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
288 |
289 |      */
290 |     open func pause() {
    |               `- note: add '@MainActor' to make instance method 'pause()' part of global actor 'MainActor'
291 |         guard let player = player else { return }
292 |         player.pause()
    |                `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
293 |         playbackState = .paused
294 |     }
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
  |                      `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:350:21: warning: call to main actor-isolated instance method 'add' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
337 |     }
338 |
339 |     private func setupPlayer(with asset: AVURLAsset) {
    |                  `- note: add '@MainActor' to make instance method 'setupPlayer(with:)' part of global actor 'MainActor'
340 |
341 |         if player == nil {
    :
348 |         let metadataOutput = AVPlayerItemMetadataOutput(identifiers: nil)
349 |         metadataOutput.setDelegate(self, queue: DispatchQueue.main)
350 |         playerItem?.add(metadataOutput)
    |                     `- warning: call to main actor-isolated instance method 'add' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
351 |     }
352 |
AVFoundation.AVPlayerItem.add:3:24: note: calls to instance method 'add' from outside of its actor context are implicitly asynchronous
1 | class AVPlayerItem {
2 | @available(macOS 10.8, *)
3 |   @MainActor open func add(_ output: AVPlayerItemOutput)}
  |                        `- note: calls to instance method 'add' from outside of its actor context are implicitly asynchronous
4 |
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:403:21: warning: capture of 'completionHandler' with non-sendable type '(Bool, AVURLAsset?) -> ()' in a '@Sendable' closure
401 |                 let keyStatus = asset.statusOfValue(forKey: "playable", error: &error)
402 |                 if keyStatus == AVKeyValueStatus.failed || !asset.isPlayable {
403 |                     completionHandler(false, nil)
    |                     |- warning: capture of 'completionHandler' with non-sendable type '(Bool, AVURLAsset?) -> ()' in a '@Sendable' closure
    |                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
404 |                     return
405 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:511:17: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
503 |
504 |     // Check if the playback could keep up after a network interruption
505 |     private func checkNetworkInterruption() {
    |                  `- note: add '@MainActor' to make instance method 'checkNetworkInterruption()' part of global actor 'MainActor'
506 |         guard
507 |             let item = playerItem,
    :
509 |             reachability.connection != .none else { return }
510 |
511 |         player?.pause()
    |                 `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
512 |
513 |         // Wait 1 sec to recheck and make sure the reload is needed
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
  |                      `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:429:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
427 |         FRadioAPI.getArtwork(for: rawValue as String, size: artworkSize, completionHandler: { [unowned self] artworlURL in
428 |             DispatchQueue.main.async {
429 |                 self.delegate?.radioPlayer?(self, artworkDidChange: artworlURL)
    |                 |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                 `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
430 |             }
431 |         })
[6/6] Emitting module FRadioPlayer
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:136:12: warning: non-final class 'FRadioPlayer' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
134 |  */
135 |
136 | open class FRadioPlayer: NSObject {
    |            `- warning: non-final class 'FRadioPlayer' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
137 |
138 |     // MARK: - Properties
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:147:19: warning: stored property 'delegate' of 'Sendable'-conforming class 'FRadioPlayer' is mutable; this is an error in the Swift 6 language mode
145 |      Implement the methods declared by the `FRadioPlayerDelegate` object to respond to user interactions and the player output.
146 |      */
147 |     open weak var delegate: FRadioPlayerDelegate?
    |                   `- warning: stored property 'delegate' of 'Sendable'-conforming class 'FRadioPlayer' is mutable; this is an error in the Swift 6 language mode
148 |
149 |     /// The player current radio URL
Build complete! (6.92s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "FRadioPlayer",
  "name" : "FRadioPlayer",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.12"
    },
    {
      "name" : "ios",
      "version" : "10.0"
    },
    {
      "name" : "tvos",
      "version" : "10.0"
    }
  ],
  "products" : [
    {
      "name" : "FRadioPlayer",
      "targets" : [
        "FRadioPlayer"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FRadioPlayerTests",
      "module_type" : "SwiftTarget",
      "name" : "FRadioPlayerTests",
      "path" : "Tests/FRadioPlayerTests",
      "sources" : [
        "FRadioPlayerTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "FRadioPlayer"
      ],
      "type" : "test"
    },
    {
      "c99name" : "FRadioPlayer",
      "module_type" : "SwiftTarget",
      "name" : "FRadioPlayer",
      "path" : "Sources/FRadioPlayer",
      "product_memberships" : [
        "FRadioPlayer"
      ],
      "sources" : [
        "FRadioAPI.swift",
        "FRadioPlayer.swift",
        "Reachability.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.