Build Information
Successful build of CloudStorage, reference main (5b8a2f
), with Swift 6.0 for macOS (SPM) on 5 Nov 2024 00:38:12 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/Jeehut/CloudStorage.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Jeehut/CloudStorage
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 5b8a2f1 Add support for storing non-optional Codable types
Cloned https://github.com/Jeehut/CloudStorage.git
Revision (git rev-parse @):
5b8a2f1af469deb4bc4a1e3acd5ee99398de9429
SUCCESS checkout https://github.com/Jeehut/CloudStorage.git at main
========================================
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": "cloudstorage",
"name": "CloudStorage",
"url": "https://github.com/Jeehut/CloudStorage.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/CloudStorage",
"dependencies": [
]
}
]
}
Fetching https://github.com/Jeehut/CloudStorage.git
[1/226] Fetching cloudstorage
Fetched https://github.com/Jeehut/CloudStorage.git from cache (0.77s)
Creating working copy for https://github.com/Jeehut/CloudStorage.git
Working copy of https://github.com/Jeehut/CloudStorage.git resolved at main (5b8a2f1)
warning: '.resolve-product-dependencies': dependency 'cloudstorage' 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/Jeehut/CloudStorage.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/5] Compiling CloudStorage CloudStorageSync.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:16:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' 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
17 |
18 | private let ubiquitousKvs: NSUbiquitousKeyValueStore
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:51:13: warning: capture of 'self' with non-sendable type 'CloudStorageSync' in a `@Sendable` closure; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
17 |
:
49 | // Since main queue is needed anyway to change UI properties.
50 | DispatchQueue.main.async {
51 | self.status = Status(date: Date(), source: .externalChange(reason), keys: keys)
| `- warning: capture of 'self' with non-sendable type 'CloudStorageSync' in a `@Sendable` closure; this is an error in the Swift 6 language mode
52 |
53 | for key in keys {
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:51:72: warning: capture of 'reason' with non-sendable type 'CloudStorageSync.ChangeReason?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 | // Since main queue is needed anyway to change UI properties.
50 | DispatchQueue.main.async {
51 | self.status = Status(date: Date(), source: .externalChange(reason), keys: keys)
| `- warning: capture of 'reason' with non-sendable type 'CloudStorageSync.ChangeReason?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
52 |
53 | for key in keys {
:
211 |
212 | extension CloudStorageSync {
213 | public enum ChangeReason {
| `- note: consider making enum 'ChangeReason' conform to the 'Sendable' protocol
214 | case serverChange
215 | case initialSyncChange
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:65:29: warning: capture of 'self' with non-sendable type 'CloudStorageSync' in a `@Sendable` closure; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
17 |
:
63 | // Since main queue is needed anyway to change UI properties.
64 | DispatchQueue.main.async {
65 | for observer in self.observers[key, default: []] {
| `- warning: capture of 'self' with non-sendable type 'CloudStorageSync' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | observer.keyChanged()
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:75:13: warning: capture of 'self' with non-sendable type 'CloudStorageSync' in a `@Sendable` closure; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
17 |
:
73 | // Since main queue is needed anyway to change UI properties.
74 | DispatchQueue.main.async {
75 | self.observers[key, default: []].append(observer)
| `- warning: capture of 'self' with non-sendable type 'CloudStorageSync' in a `@Sendable` closure; this is an error in the Swift 6 language mode
76 | }
77 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:75:53: warning: capture of 'observer' with non-sendable type 'KeyObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
73 | // Since main queue is needed anyway to change UI properties.
74 | DispatchQueue.main.async {
75 | self.observers[key, default: []].append(observer)
| `- warning: capture of 'observer' with non-sendable type 'KeyObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
76 | }
77 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorage.swift:44:16: note: class 'KeyObserver' does not conform to the 'Sendable' protocol
42 | }
43 |
44 | internal class KeyObserver {
| `- note: class 'KeyObserver' does not conform to the 'Sendable' protocol
45 | weak var storageObjectWillChange: ObservableObjectPublisher?
46 | weak var enclosingObjectWillChange: ObservableObjectPublisher?
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:83:13: warning: capture of 'self' with non-sendable type 'CloudStorageSync' in a `@Sendable` closure; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
17 |
:
81 | // Since main queue is needed anyway to change UI properties.
82 | DispatchQueue.main.async {
83 | self.observers = self.observers.mapValues { $0.filter { $0 !== observer } }
| `- warning: capture of 'self' with non-sendable type 'CloudStorageSync' in a `@Sendable` closure; this is an error in the Swift 6 language mode
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:83:76: warning: capture of 'observer' with non-sendable type 'KeyObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
81 | // Since main queue is needed anyway to change UI properties.
82 | DispatchQueue.main.async {
83 | self.observers = self.observers.mapValues { $0.filter { $0 !== observer } }
| `- warning: capture of 'observer' with non-sendable type 'KeyObserver' in a `@Sendable` closure; this is an error in the Swift 6 language mode
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorage.swift:44:16: note: class 'KeyObserver' does not conform to the 'Sendable' protocol
42 | }
43 |
44 | internal class KeyObserver {
| `- note: class 'KeyObserver' does not conform to the 'Sendable' protocol
45 | weak var storageObjectWillChange: ObservableObjectPublisher?
46 | weak var enclosingObjectWillChange: ObservableObjectPublisher?
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:83:76: warning: capture of 'observer' with non-sendable type 'KeyObserver' in an isolated closure; this is an error in the Swift 6 language mode
81 | // Since main queue is needed anyway to change UI properties.
82 | DispatchQueue.main.async {
83 | self.observers = self.observers.mapValues { $0.filter { $0 !== observer } }
| `- warning: capture of 'observer' with non-sendable type 'KeyObserver' in an isolated closure; this is an error in the Swift 6 language mode
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorage.swift:44:16: note: class 'KeyObserver' does not conform to the 'Sendable' protocol
42 | }
43 |
44 | internal class KeyObserver {
| `- note: class 'KeyObserver' does not conform to the 'Sendable' protocol
45 | weak var storageObjectWillChange: ObservableObjectPublisher?
46 | weak var enclosingObjectWillChange: ObservableObjectPublisher?
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:83:76: warning: capture of 'observer' with non-sendable type 'KeyObserver' in an isolated closure; this is an error in the Swift 6 language mode
81 | // Since main queue is needed anyway to change UI properties.
82 | DispatchQueue.main.async {
83 | self.observers = self.observers.mapValues { $0.filter { $0 !== observer } }
| `- warning: capture of 'observer' with non-sendable type 'KeyObserver' in an isolated closure; this is an error in the Swift 6 language mode
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorage.swift:44:16: note: class 'KeyObserver' does not conform to the 'Sendable' protocol
42 | }
43 |
44 | internal class KeyObserver {
| `- note: class 'KeyObserver' does not conform to the 'Sendable' protocol
45 | weak var storageObjectWillChange: ObservableObjectPublisher?
46 | weak var enclosingObjectWillChange: ObservableObjectPublisher?
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:51:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
49 | // Since main queue is needed anyway to change UI properties.
50 | DispatchQueue.main.async {
51 | self.status = Status(date: Date(), source: .externalChange(reason), keys: keys)
| |- 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
52 |
53 | for key in keys {
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:65:29: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
63 | // Since main queue is needed anyway to change UI properties.
64 | DispatchQueue.main.async {
65 | for observer in self.observers[key, default: []] {
| |- 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
66 | observer.keyChanged()
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:75:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
73 | // Since main queue is needed anyway to change UI properties.
74 | DispatchQueue.main.async {
75 | self.observers[key, default: []].append(observer)
| |- 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
76 | }
77 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:75:53: warning: sending 'observer' risks causing data races; this is an error in the Swift 6 language mode
73 | // Since main queue is needed anyway to change UI properties.
74 | DispatchQueue.main.async {
75 | self.observers[key, default: []].append(observer)
| |- warning: sending 'observer' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'observer' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
76 | }
77 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:83:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
81 | // Since main queue is needed anyway to change UI properties.
82 | DispatchQueue.main.async {
83 | self.observers = self.observers.mapValues { $0.filter { $0 !== observer } }
| |- 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
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:83:76: warning: sending 'observer' risks causing data races; this is an error in the Swift 6 language mode
81 | // Since main queue is needed anyway to change UI properties.
82 | DispatchQueue.main.async {
83 | self.observers = self.observers.mapValues { $0.filter { $0 !== observer } }
| |- warning: sending 'observer' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'observer' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
84 | }
85 | }
[4/5] Emitting module CloudStorage
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorage.swift:11:13: warning: let 'sync' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | private let sync = CloudStorageSync.shared
| |- warning: let 'sync' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'sync' 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
12 |
13 | @propertyWrapper public struct CloudStorage<Value>: DynamicProperty {
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:15:14: note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
17 |
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:16:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' 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
17 |
18 | private let ubiquitousKvs: NSUbiquitousKeyValueStore
[5/5] Compiling CloudStorage CloudStorage.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorage.swift:11:13: warning: let 'sync' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | private let sync = CloudStorageSync.shared
| |- warning: let 'sync' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'sync' 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
12 |
13 | @propertyWrapper public struct CloudStorage<Value>: DynamicProperty {
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:15:14: note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
17 |
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorageSync.swift:16:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' may have shared mutable state; this is an error in the Swift 6 language mode
13 | #endif
14 |
15 | public class CloudStorageSync: ObservableObject {
| `- note: class 'CloudStorageSync' does not conform to the 'Sendable' protocol
16 | public static let shared = CloudStorageSync()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'CloudStorageSync' 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
17 |
18 | private let ubiquitousKvs: NSUbiquitousKeyValueStore
/Users/admin/builder/spi-builder-workspace/Sources/CloudStorage/CloudStorage.swift:81:29: warning: cannot access property 'keyObserver' with a non-sendable type 'KeyObserver' from nonisolated deinit; this is an error in the Swift 6 language mode
42 | }
43 |
44 | internal class KeyObserver {
| `- note: class 'KeyObserver' does not conform to the 'Sendable' protocol
45 | weak var storageObjectWillChange: ObservableObjectPublisher?
46 | weak var enclosingObjectWillChange: ObservableObjectPublisher?
:
79 |
80 | deinit {
81 | sync.removeObserver(keyObserver)
| `- warning: cannot access property 'keyObserver' with a non-sendable type 'KeyObserver' from nonisolated deinit; this is an error in the Swift 6 language mode
82 | }
83 | }
Build complete! (12.77s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "CloudStorage",
"name" : "CloudStorage",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "ios",
"version" : "14.0"
},
{
"name" : "tvos",
"version" : "14.0"
},
{
"name" : "watchos",
"version" : "9.0"
},
{
"name" : "visionos",
"version" : "1.0"
}
],
"products" : [
{
"name" : "CloudStorage",
"targets" : [
"CloudStorage"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "CloudStorage",
"module_type" : "SwiftTarget",
"name" : "CloudStorage",
"path" : "Sources/CloudStorage",
"product_memberships" : [
"CloudStorage"
],
"sources" : [
"CloudStorage.swift",
"CloudStorageSync.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Done.