Build Information
Successful build of MultiPeer with Swift 6.0 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/dingwilson/MultiPeer.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/dingwilson/MultiPeer
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at e2ea072 Regen jazzy docs [ci skip]
Cloned https://github.com/dingwilson/MultiPeer.git
Revision (git rev-parse @):
e2ea072710fb566b0070a6b5d78b45c29307c218
SUCCESS checkout https://github.com/dingwilson/MultiPeer.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/dingwilson/MultiPeer.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 MultiPeer MultiPeerDelegate.swift
[4/6] Compiling MultiPeer Peer.swift
[5/6] Emitting module MultiPeer
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:15:23: warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'MultiPeer' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// Main Class for MultiPeer
12 | public class MultiPeer: NSObject {
| `- note: class 'MultiPeer' does not conform to the 'Sendable' protocol
13 |
14 | /// Singleton instance - call via MultiPeer.instance
15 | public static let instance = MultiPeer()
| |- warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'MultiPeer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'instance' 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
16 |
17 | // MARK: Properties
[6/6] Compiling MultiPeer MultiPeer.swift
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:15:23: warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'MultiPeer' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// Main Class for MultiPeer
12 | public class MultiPeer: NSObject {
| `- note: class 'MultiPeer' does not conform to the 'Sendable' protocol
13 |
14 | /// Singleton instance - call via MultiPeer.instance
15 | public static let instance = MultiPeer()
| |- warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'MultiPeer' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'instance' 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
16 |
17 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:198:13: warning: capture of 'invitationHandler' with non-sendable type '(Bool, MCSession?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
196 |
197 | OperationQueue.main.addOperation {
198 | invitationHandler(true, self.session)
| |- warning: capture of 'invitationHandler' with non-sendable type '(Bool, MCSession?) -> Void' 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'
199 | }
200 | }
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:198:37: warning: capture of 'self' with non-sendable type 'MultiPeer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
10 |
11 | /// Main Class for MultiPeer
12 | public class MultiPeer: NSObject {
| `- note: class 'MultiPeer' does not conform to the 'Sendable' protocol
13 |
14 | /// Singleton instance - call via MultiPeer.instance
:
196 |
197 | OperationQueue.main.addOperation {
198 | invitationHandler(true, self.session)
| `- warning: capture of 'self' with non-sendable type 'MultiPeer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
199 | }
200 | }
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:257:13: warning: capture of 'self' with non-sendable type 'MultiPeer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
10 |
11 | /// Main Class for MultiPeer
12 | public class MultiPeer: NSObject {
| `- note: class 'MultiPeer' does not conform to the 'Sendable' protocol
13 |
14 | /// Singleton instance - call via MultiPeer.instance
:
255 | // Send new connection list to delegate
256 | OperationQueue.main.addOperation {
257 | self.delegate?.multiPeer(connectedDevicesChanged: session.connectedPeers.map({$0.displayName}))
| `- warning: capture of 'self' with non-sendable type 'MultiPeer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
258 | }
259 | }
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:257:63: warning: capture of 'session' with non-sendable type 'MCSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
255 | // Send new connection list to delegate
256 | OperationQueue.main.addOperation {
257 | self.delegate?.multiPeer(connectedDevicesChanged: session.connectedPeers.map({$0.displayName}))
| `- warning: capture of 'session' with non-sendable type 'MCSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
258 | }
259 | }
MultipeerConnectivity.MCSession:2:12: note: class 'MCSession' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.10, *)
2 | open class MCSession : NSObject {
| `- note: class 'MCSession' does not conform to the 'Sendable' protocol
3 | public convenience init(peer myPeerID: MCPeerID)
4 | public init(peer myPeerID: MCPeerID, securityIdentity identity: [Any]?, encryptionPreference: MCEncryptionPreference)
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MultipeerConnectivity'
7 |
8 | import Foundation
9 | import MultipeerConnectivity
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MultipeerConnectivity'
10 |
11 | /// Main Class for MultiPeer
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:270:13: warning: capture of 'self' with non-sendable type 'MultiPeer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
10 |
11 | /// Main Class for MultiPeer
12 | public class MultiPeer: NSObject {
| `- note: class 'MultiPeer' does not conform to the 'Sendable' protocol
13 |
14 | /// Singleton instance - call via MultiPeer.instance
:
268 |
269 | OperationQueue.main.addOperation {
270 | self.delegate?.multiPeer(didReceiveData: item, ofType: type, from: peerID)
| `- warning: capture of 'self' with non-sendable type 'MultiPeer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
271 | }
272 |
/Users/admin/builder/spi-builder-workspace/Sources/MultiPeer.swift:270:80: warning: capture of 'peerID' with non-sendable type 'MCPeerID' in a `@Sendable` closure; this is an error in the Swift 6 language mode
268 |
269 | OperationQueue.main.addOperation {
270 | self.delegate?.multiPeer(didReceiveData: item, ofType: type, from: peerID)
| `- warning: capture of 'peerID' with non-sendable type 'MCPeerID' in a `@Sendable` closure; this is an error in the Swift 6 language mode
271 | }
272 |
MultipeerConnectivity.MCPeerID:2:12: note: class 'MCPeerID' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.10, *)
2 | open class MCPeerID : NSObject, NSCopying, NSSecureCoding {
| `- note: class 'MCPeerID' does not conform to the 'Sendable' protocol
3 | public init(displayName myDisplayName: String)
4 | open var displayName: String { get }
Build complete! (23.30s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "MultiPeer",
"name" : "MultiPeer",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "MultiPeer",
"targets" : [
"MultiPeer"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "MultiPeer",
"module_type" : "SwiftTarget",
"name" : "MultiPeer",
"path" : "Sources",
"product_memberships" : [
"MultiPeer"
],
"sources" : [
"MultiPeer.swift",
"MultiPeerDelegate.swift",
"Peer.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
Done.