Build Information
Successful build of FRadioPlayer 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/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
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/fethica/FRadioPlayer.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/6] Compiling FRadioPlayer Reachability.swift
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/Reachability.swift:241:30: warning: capture of 'self' with non-sendable type 'Reachability?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
44 | }
45 |
46 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
47 |
48 | public typealias NetworkReachable = (Reachability) -> ()
:
239 |
240 | DispatchQueue.main.async { [weak self] in
241 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'Reachability?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
242 | block?(self)
243 | self.notificationCenter.post(name: .reachabilityChanged, object: self)
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/Reachability.swift:242:13: warning: capture of 'block' with non-sendable type 'Reachability.NetworkReachable?' (aka 'Optional<(Reachability) -> ()>') in a `@Sendable` closure; 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: capture of 'block' with non-sendable type 'Reachability.NetworkReachable?' (aka 'Optional<(Reachability) -> ()>') 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'
243 | self.notificationCenter.post(name: .reachabilityChanged, object: self)
244 | }
/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; this is an error in the Swift 6 language mode
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; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
28 | return
29 | }
[5/6] Emitting module FRadioPlayer
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:141:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'FRadioPlayer' may have shared mutable state; this is an error in the Swift 6 language mode
134 | */
135 |
136 | open class FRadioPlayer: NSObject {
| `- note: class 'FRadioPlayer' does not conform to the 'Sendable' protocol
137 |
138 | // MARK: - Properties
139 |
140 | /// Returns the singleton `FRadioPlayer` instance.
141 | public static let shared = FRadioPlayer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'FRadioPlayer' 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
142 |
143 | /**
[6/6] Compiling FRadioPlayer FRadioPlayer.swift
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:141:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'FRadioPlayer' may have shared mutable state; this is an error in the Swift 6 language mode
134 | */
135 |
136 | open class FRadioPlayer: NSObject {
| `- note: class 'FRadioPlayer' does not conform to the 'Sendable' protocol
137 |
138 | // MARK: - Properties
139 |
140 | /// Returns the singleton `FRadioPlayer` instance.
141 | public static let shared = FRadioPlayer()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'FRadioPlayer' 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
142 |
143 | /**
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:170:24: warning: main actor-isolated property 'rate' can not be referenced from a non-isolated 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 non-isolated context; this is an error in the Swift 6 language mode
171 | }
172 |
AVFoundation.AVPlayer:2:25: note: property declared here
1 | extension AVPlayer {
2 | @MainActor open var rate: Float { get set }
| `- note: property declared here
3 | @available(macOS 13.0, *)
4 | open var defaultRate: Float { get set }
/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:5:26: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 | @available(macOS 13.0, *)
4 | open var defaultRate: Float { get set }
5 | @MainActor open func play()
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
6 | @MainActor open func pause()
7 | @available(macOS 10.12, *)
/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:6:26: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
4 | open var defaultRate: Float { get set }
5 | @MainActor open func play()
6 | @MainActor open func pause()
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
7 | @available(macOS 10.12, *)
8 | open var timeControlStatus: AVPlayer.TimeControlStatus { get }
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:401:33: warning: capture of 'asset' with non-sendable type 'AVURLAsset' in a `@Sendable` closure; this is an error in the Swift 6 language mode
399 | var error: NSError?
400 |
401 | let keyStatus = asset.statusOfValue(forKey: "playable", error: &error)
| `- warning: capture of 'asset' with non-sendable type 'AVURLAsset' in a `@Sendable` closure; this is an error in the Swift 6 language mode
402 | if keyStatus == AVKeyValueStatus.failed || !asset.isPlayable {
403 | completionHandler(false, nil)
AVFoundation.AVURLAsset:2:12: note: class 'AVURLAsset' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class AVURLAsset : AVAsset {
| `- note: class 'AVURLAsset' does not conform to the 'Sendable' protocol
3 | @available(*, unavailable)
4 | public convenience init()
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
7 | //
8 |
9 | import AVFoundation
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
10 |
11 | // MARK: - FRadioPlayingState
/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; this is an error in the Swift 6 language mode
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; this is an error in the Swift 6 language mode
| `- 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:402:61: warning: implicit capture of 'asset' requires that 'AVURLAsset' conforms to `Sendable`; this is an error in the Swift 6 language mode
400 |
401 | let keyStatus = asset.statusOfValue(forKey: "playable", error: &error)
402 | if keyStatus == AVKeyValueStatus.failed || !asset.isPlayable {
| `- warning: implicit capture of 'asset' requires that 'AVURLAsset' conforms to `Sendable`; this is an error in the Swift 6 language mode
403 | completionHandler(false, nil)
404 | return
AVFoundation.AVURLAsset:2:12: note: class 'AVURLAsset' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class AVURLAsset : AVAsset {
| `- note: class 'AVURLAsset' does not conform to the 'Sendable' protocol
3 | @available(*, unavailable)
4 | public convenience init()
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:429:17: warning: capture of 'self' with non-sendable type 'FRadioPlayer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
134 | */
135 |
136 | open class FRadioPlayer: NSObject {
| `- note: class 'FRadioPlayer' does not conform to the 'Sendable' protocol
137 |
138 | // MARK: - Properties
:
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: capture of 'self' with non-sendable type 'FRadioPlayer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
430 | }
431 | })
/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:6:26: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
4 | open var defaultRate: Float { get set }
5 | @MainActor open func play()
6 | @MainActor open func pause()
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
7 | @available(macOS 10.12, *)
8 | open var timeControlStatus: AVPlayer.TimeControlStatus { get }
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:515:17: warning: capture of 'item' with non-sendable type 'AVPlayerItem' in a `@Sendable` closure; this is an error in the Swift 6 language mode
513 | // Wait 1 sec to recheck and make sure the reload is needed
514 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
515 | if !item.isPlaybackLikelyToKeepUp { self.reloadItem() }
| `- warning: capture of 'item' with non-sendable type 'AVPlayerItem' in a `@Sendable` closure; this is an error in the Swift 6 language mode
516 | self.isPlaying ? self.player?.play() : self.player?.pause()
517 | }
AVFoundation.AVPlayerItem:2:12: note: class 'AVPlayerItem' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class AVPlayerItem : NSObject, NSCopying {
| `- note: class 'AVPlayerItem' does not conform to the 'Sendable' protocol
3 | @available(*, unavailable)
4 | public convenience init()
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:515:49: warning: capture of 'self' with non-sendable type 'FRadioPlayer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
134 | */
135 |
136 | open class FRadioPlayer: NSObject {
| `- note: class 'FRadioPlayer' does not conform to the 'Sendable' protocol
137 |
138 | // MARK: - Properties
:
513 | // Wait 1 sec to recheck and make sure the reload is needed
514 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
515 | if !item.isPlaybackLikelyToKeepUp { self.reloadItem() }
| `- warning: capture of 'self' with non-sendable type 'FRadioPlayer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
516 | self.isPlaying ? self.player?.play() : self.player?.pause()
517 | }
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:292:16: warning: sending 'player' risks causing data races; this is an error in the Swift 6 language mode
290 | open func pause() {
291 | guard let player = player else { return }
292 | player.pause()
| |- warning: sending 'player' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'player' to main actor-isolated instance method 'pause()' risks causing data races between main actor-isolated and task-isolated uses
293 | playbackState = .paused
294 | }
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:282:16: warning: sending 'player' risks causing data races; this is an error in the Swift 6 language mode
280 | }
281 |
282 | player.play()
| |- warning: sending 'player' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'player' to main actor-isolated instance method 'play()' risks causing data races between main actor-isolated and task-isolated uses
283 | playbackState = .playing
284 | }
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:401:33: warning: sending 'asset' risks causing data races; this is an error in the Swift 6 language mode
399 | var error: NSError?
400 |
401 | let keyStatus = asset.statusOfValue(forKey: "playable", error: &error)
| |- warning: sending 'asset' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asset' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
402 | if keyStatus == AVKeyValueStatus.failed || !asset.isPlayable {
403 | completionHandler(false, nil)
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:403:21: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
401 | let keyStatus = asset.statusOfValue(forKey: "playable", error: &error)
402 | if keyStatus == AVKeyValueStatus.failed || !asset.isPlayable {
403 | completionHandler(false, 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
404 | return
405 | }
/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 | })
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:511:17: warning: sending 'self.player.some' risks causing data races; this is an error in the Swift 6 language mode
509 | reachability.connection != .none else { return }
510 |
511 | player?.pause()
| |- warning: sending 'self.player.some' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'self.player.some' to main actor-isolated instance method 'pause()' risks causing data races between main actor-isolated and task-isolated uses
512 |
513 | // Wait 1 sec to recheck and make sure the reload is needed
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:515:17: warning: sending 'item' risks causing data races; this is an error in the Swift 6 language mode
513 | // Wait 1 sec to recheck and make sure the reload is needed
514 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
515 | if !item.isPlaybackLikelyToKeepUp { self.reloadItem() }
| |- warning: sending 'item' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'item' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
516 | self.isPlaying ? self.player?.play() : self.player?.pause()
517 | }
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:515:49: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
513 | // Wait 1 sec to recheck and make sure the reload is needed
514 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
515 | if !item.isPlaybackLikelyToKeepUp { self.reloadItem() }
| |- 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
516 | self.isPlaying ? self.player?.play() : self.player?.pause()
517 | }
Build complete! (26.57s)
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.