Build Information
Successful build of FRadioPlayer, reference 0.1.22 (983817
), with Swift 6.0 for macOS (SPM) on 1 Nov 2024 12:35:40 UTC.
Swift 6 data race errors: 2
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/fethica/FRadioPlayer.git
Reference: 0.1.22
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/fethica/FRadioPlayer
* tag 0.1.22 -> FETCH_HEAD
HEAD is now at 9838173 🍏 Update pod version to 0.1.22
Cloned https://github.com/fethica/FRadioPlayer.git
Revision (git rev-parse @):
983817334905e438ea7eba9411311cce4258197c
SUCCESS checkout https://github.com/fethica/FRadioPlayer.git at 0.1.22
========================================
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/1366] Fetching fradioplayer
Fetched https://github.com/fethica/FRadioPlayer.git from cache (1.09s)
Creating working copy for https://github.com/fethica/FRadioPlayer.git
Working copy of https://github.com/fethica/FRadioPlayer.git resolved at 0.1.22 (9838173)
warning: '.resolve-product-dependencies': dependency 'fradioplayer' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/fethica/FRadioPlayer.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun 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--7754E27361AE5C74.txt
[3/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 | }
[4/6] Emitting module FRadioPlayer
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:79:45: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
77 | */
78 |
79 | @objc public protocol FRadioPlayerDelegate: class {
| `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
80 | /**
81 | Called when player changes state
/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
[5/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 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 | }
[6/6] Compiling FRadioPlayer FRadioPlayer.swift
/Users/admin/builder/spi-builder-workspace/Sources/FRadioPlayer/FRadioPlayer.swift:79:45: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
77 | */
78 |
79 | @objc public protocol FRadioPlayerDelegate: class {
| `- warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead
80 | /**
81 | Called when player changes state
/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 |
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 | nonisolated 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:15: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 | @available(macOS 13.0, *)
4 | nonisolated open var defaultRate: Float { get set }
5 | open func play()
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
6 | 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:15: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
4 | nonisolated open var defaultRate: Float { get set }
5 | open func play()
6 | open func pause()
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
7 | @available(macOS 10.12, *)
8 | nonisolated open var timeControlStatus: AVPlayer.TimeControlStatus { get }
/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:3:26: note: calls to instance method 'add' from outside of its actor context are implicitly asynchronous
1 | extension 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 | @available(macOS 10.8, *)
5 | @available(swift, obsoleted: 3, renamed: "add(_:)")
/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: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: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:15: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
4 | nonisolated open var defaultRate: Float { get set }
5 | open func play()
6 | open func pause()
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
7 | @available(macOS 10.12, *)
8 | nonisolated open var timeControlStatus: AVPlayer.TimeControlStatus { get }
/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 | })
Build complete! (8.84s)
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.