Build Information
Successful build of Bonjour, reference master (265755
), with Swift 6.0 for macOS (SPM) on 28 Nov 2024 16:04:22 UTC.
Swift 6 data race errors: 6
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 -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.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/eugenebokhan/bonjour.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/eugenebokhan/bonjour
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 2657554 Update README.md
Cloned https://github.com/eugenebokhan/bonjour.git
Revision (git rev-parse @):
2657554cde018199823f034624ec5dc642264450
SUCCESS checkout https://github.com/eugenebokhan/bonjour.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": "bonjour",
"name": "Bonjour",
"url": "https://github.com/eugenebokhan/bonjour.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/bonjour",
"dependencies": [
]
}
]
}
Fetching https://github.com/eugenebokhan/bonjour.git
[1/106] Fetching bonjour
Fetched https://github.com/eugenebokhan/bonjour.git from cache (0.74s)
Creating working copy for https://github.com/eugenebokhan/bonjour.git
Working copy of https://github.com/eugenebokhan/bonjour.git resolved at master (2657554)
warning: '.resolve-product-dependencies': dependency 'bonjour' 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/eugenebokhan/bonjour.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 -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--7754E27361AE5C74.txt
[3/7] Compiling Bonjour ProgressWatcher.swift
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/ProgressWatcher.swift:34:16: warning: capture of 'context' with non-sendable type 'UnsafeMutableRawPointer?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
32 | context: UnsafeMutableRawPointer?) {
33 | self.observationQueue.async {
34 | if context == &self.kvoContext {
| `- warning: capture of 'context' with non-sendable type 'UnsafeMutableRawPointer?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | switch keyPath {
36 | case ObservationKeyPath.fractionCompleted.rawValue:
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/ProgressWatcher.swift:34:28: warning: capture of 'self' with non-sendable type 'ProgressWatcher' in a `@Sendable` closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | class ProgressWatcher: NSObject {
| `- note: class 'ProgressWatcher' does not conform to the 'Sendable' protocol
4 |
5 | enum ObservationKeyPath: String {
:
32 | context: UnsafeMutableRawPointer?) {
33 | self.observationQueue.async {
34 | if context == &self.kvoContext {
| `- warning: capture of 'self' with non-sendable type 'ProgressWatcher' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | switch keyPath {
36 | case ObservationKeyPath.fractionCompleted.rawValue:
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/ProgressWatcher.swift:37:39: warning: capture of 'object' with non-sendable type 'Any?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | switch keyPath {
36 | case ObservationKeyPath.fractionCompleted.rawValue:
37 | if let progress = object as? Progress {
| `- warning: capture of 'object' with non-sendable type 'Any?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
38 | self.progressHandler?(progress.fractionCompleted)
39 | }
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/ProgressWatcher.swift:45:44: warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
43 | super.observeValue(forKeyPath: keyPath,
44 | of: object,
45 | change: change,
| `- warning: capture of 'change' with non-sendable type '[NSKeyValueChangeKey : Any]?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 | context: context)
47 | }
[4/7] Compiling Bonjour MCPeerID+Extensions.swift
[5/7] Compiling Bonjour Peer.swift
[6/7] Emitting module Bonjour
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:39:31: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Configuration.Security' may have shared mutable state; this is an error in the Swift 6 language mode
17 | }
18 |
19 | public struct Security {
| `- note: consider making struct 'Security' conform to the 'Sendable' protocol
20 |
21 | public typealias InvitationHandler = (Peer, Data?, @escaping (Bool) -> Void) -> Void
:
37 | }
38 |
39 | public static let `default` = Security(identity: nil,
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Configuration.Security' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' 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
40 | encryptionPreference: .none,
41 | invitationHandler: { _, _, handler in handler(true) },
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:66:27: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
9 | // MARK: - Type Definitions
10 |
11 | public struct Configuration {
| `- note: consider making struct 'Configuration' conform to the 'Sendable' protocol
12 |
13 | public enum Invitation {
:
64 | }
65 |
66 | public static let `default` = Configuration(serviceType: "Bonjour",
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' 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 | peerName: MCPeerID.defaultDisplayName,
68 | defaults: .standard,
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:91:27: warning: static property 'receive' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
82 | }
83 |
84 | public struct Usage: OptionSet {
| `- note: consider making struct 'Usage' conform to the 'Sendable' protocol
85 | public let rawValue: UInt
86 |
:
89 | }
90 |
91 | public static let receive = Usage(rawValue: 0x1)
| |- warning: static property 'receive' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'receive' 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
92 | public static let transmit = Usage(rawValue: 0x2)
93 | public static let combined: Usage = [.receive, .transmit]
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:92:27: warning: static property 'transmit' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
82 | }
83 |
84 | public struct Usage: OptionSet {
| `- note: consider making struct 'Usage' conform to the 'Sendable' protocol
85 | public let rawValue: UInt
86 |
:
90 |
91 | public static let receive = Usage(rawValue: 0x1)
92 | public static let transmit = Usage(rawValue: 0x2)
| |- warning: static property 'transmit' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'transmit' 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
93 | public static let combined: Usage = [.receive, .transmit]
94 | }
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:93:27: warning: static property 'combined' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
82 | }
83 |
84 | public struct Usage: OptionSet {
| `- note: consider making struct 'Usage' conform to the 'Sendable' protocol
85 | public let rawValue: UInt
86 |
:
91 | public static let receive = Usage(rawValue: 0x1)
92 | public static let transmit = Usage(rawValue: 0x2)
93 | public static let combined: Usage = [.receive, .transmit]
| |- warning: static property 'combined' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'combined' 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
94 | }
95 |
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:107:17: warning: capture of 'self' with non-sendable type 'BonjourSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
5 | public typealias InvitationCompletionHandler = (_ result: Result<Peer, Error>) -> Void
6 |
7 | final public class BonjourSession: NSObject {
| `- note: class 'BonjourSession' does not conform to the 'Sendable' protocol
8 |
9 | // MARK: - Type Definitions
:
105 | else { return }
106 | self.sessionQueue.async {
107 | self.onAvailablePeersDidChange?(Array(self.availablePeers))
| `- warning: capture of 'self' with non-sendable type 'BonjourSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
108 | }
109 | }
[7/7] Compiling Bonjour BonjourSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:39:31: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Configuration.Security' may have shared mutable state; this is an error in the Swift 6 language mode
17 | }
18 |
19 | public struct Security {
| `- note: consider making struct 'Security' conform to the 'Sendable' protocol
20 |
21 | public typealias InvitationHandler = (Peer, Data?, @escaping (Bool) -> Void) -> Void
:
37 | }
38 |
39 | public static let `default` = Security(identity: nil,
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Configuration.Security' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' 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
40 | encryptionPreference: .none,
41 | invitationHandler: { _, _, handler in handler(true) },
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:66:27: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
9 | // MARK: - Type Definitions
10 |
11 | public struct Configuration {
| `- note: consider making struct 'Configuration' conform to the 'Sendable' protocol
12 |
13 | public enum Invitation {
:
64 | }
65 |
66 | public static let `default` = Configuration(serviceType: "Bonjour",
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' 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 | peerName: MCPeerID.defaultDisplayName,
68 | defaults: .standard,
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:91:27: warning: static property 'receive' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
82 | }
83 |
84 | public struct Usage: OptionSet {
| `- note: consider making struct 'Usage' conform to the 'Sendable' protocol
85 | public let rawValue: UInt
86 |
:
89 | }
90 |
91 | public static let receive = Usage(rawValue: 0x1)
| |- warning: static property 'receive' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'receive' 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
92 | public static let transmit = Usage(rawValue: 0x2)
93 | public static let combined: Usage = [.receive, .transmit]
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:92:27: warning: static property 'transmit' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
82 | }
83 |
84 | public struct Usage: OptionSet {
| `- note: consider making struct 'Usage' conform to the 'Sendable' protocol
85 | public let rawValue: UInt
86 |
:
90 |
91 | public static let receive = Usage(rawValue: 0x1)
92 | public static let transmit = Usage(rawValue: 0x2)
| |- warning: static property 'transmit' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'transmit' 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
93 | public static let combined: Usage = [.receive, .transmit]
94 | }
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:93:27: warning: static property 'combined' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
82 | }
83 |
84 | public struct Usage: OptionSet {
| `- note: consider making struct 'Usage' conform to the 'Sendable' protocol
85 | public let rawValue: UInt
86 |
:
91 | public static let receive = Usage(rawValue: 0x1)
92 | public static let transmit = Usage(rawValue: 0x2)
93 | public static let combined: Usage = [.receive, .transmit]
| |- warning: static property 'combined' is not concurrency-safe because non-'Sendable' type 'BonjourSession.Usage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'combined' 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
94 | }
95 |
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:107:17: warning: capture of 'self' with non-sendable type 'BonjourSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
5 | public typealias InvitationCompletionHandler = (_ result: Result<Peer, Error>) -> Void
6 |
7 | final public class BonjourSession: NSObject {
| `- note: class 'BonjourSession' does not conform to the 'Sendable' protocol
8 |
9 | // MARK: - Type Definitions
:
105 | else { return }
106 | self.sessionQueue.async {
107 | self.onAvailablePeersDidChange?(Array(self.availablePeers))
| `- warning: capture of 'self' with non-sendable type 'BonjourSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
108 | }
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:359:17: warning: capture of 'handler' with non-sendable type 'InvitationCompletionHandler?' (aka 'Optional<(Result<Peer, any Error>) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
357 | switch state {
358 | case .connected:
359 | handler?(.success(peer))
| |- warning: capture of 'handler' with non-sendable type 'InvitationCompletionHandler?' (aka 'Optional<(Result<Peer, any Error>) -> ()>') 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'
360 | self.invitationCompletionHandlers[peerID] = nil
361 | self.handlePeerConnected(peer)
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:359:35: warning: capture of 'peer' with non-sendable type 'Peer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
357 | switch state {
358 | case .connected:
359 | handler?(.success(peer))
| `- warning: capture of 'peer' with non-sendable type 'Peer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
360 | self.invitationCompletionHandlers[peerID] = nil
361 | self.handlePeerConnected(peer)
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/Peer.swift:5:15: note: consider making struct 'Peer' conform to the 'Sendable' protocol
3 | import CommonCrypto
4 |
5 | public struct Peer: Hashable, Identifiable {
| `- note: consider making struct 'Peer' conform to the 'Sendable' protocol
6 | public let id: String
7 | public let name: String
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:360:17: warning: capture of 'self' with non-sendable type 'BonjourSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
5 | public typealias InvitationCompletionHandler = (_ result: Result<Peer, Error>) -> Void
6 |
7 | final public class BonjourSession: NSObject {
| `- note: class 'BonjourSession' does not conform to the 'Sendable' protocol
8 |
9 | // MARK: - Type Definitions
:
358 | case .connected:
359 | handler?(.success(peer))
360 | self.invitationCompletionHandlers[peerID] = nil
| `- warning: capture of 'self' with non-sendable type 'BonjourSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
361 | self.handlePeerConnected(peer)
362 | case .notConnected:
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:360:51: warning: capture of 'peerID' with non-sendable type 'MCPeerID' in a `@Sendable` closure; this is an error in the Swift 6 language mode
358 | case .connected:
359 | handler?(.success(peer))
360 | self.invitationCompletionHandlers[peerID] = nil
| `- warning: capture of 'peerID' with non-sendable type 'MCPeerID' in a `@Sendable` closure; this is an error in the Swift 6 language mode
361 | self.handlePeerConnected(peer)
362 | case .notConnected:
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 }
/Users/admin/builder/spi-builder-workspace/Sources/Bonjour/BonjourSession.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MultipeerConnectivity'
1 | import Foundation
2 | import MultipeerConnectivity
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MultipeerConnectivity'
3 | import os.log
4 |
Build complete! (9.54s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "Bonjour",
"name" : "Bonjour",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "11.0"
},
{
"name" : "macos",
"version" : "10.13"
}
],
"products" : [
{
"name" : "Bonjour",
"targets" : [
"Bonjour"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "Bonjour",
"module_type" : "SwiftTarget",
"name" : "Bonjour",
"path" : "Sources/Bonjour",
"product_memberships" : [
"Bonjour"
],
"sources" : [
"BonjourSession.swift",
"Extensions/MCPeerID+Extensions.swift",
"Peer.swift",
"ProgressWatcher.swift"
],
"type" : "library"
}
],
"tools_version" : "5.2"
}
Done.