Build Information
Successful build of swiftui-shared-object, reference 2.0.0 (487a92
), with Swift 6.1 for macOS (SPM) on 26 Apr 2025 20:23:04 UTC.
Swift 6 data race errors: 4
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.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.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/lorenzofiamingo/swiftui-shared-object.git
Reference: 2.0.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/lorenzofiamingo/swiftui-shared-object
* tag 2.0.0 -> FETCH_HEAD
HEAD is now at 487a922 Update Package.swift
Cloned https://github.com/lorenzofiamingo/swiftui-shared-object.git
Revision (git rev-parse @):
487a922254f669fb2f69ec8816694afc7e596bba
SUCCESS checkout https://github.com/lorenzofiamingo/swiftui-shared-object.git at 2.0.0
========================================
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": "swiftui-shared-object",
"name": "swiftui-shared-object",
"url": "https://github.com/lorenzofiamingo/swiftui-shared-object.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/swiftui-shared-object",
"dependencies": [
]
}
]
}
Fetching https://github.com/lorenzofiamingo/swiftui-shared-object.git
[1/94] Fetching swiftui-shared-object
Fetched https://github.com/lorenzofiamingo/swiftui-shared-object.git from cache (0.57s)
Creating working copy for https://github.com/lorenzofiamingo/swiftui-shared-object.git
Working copy of https://github.com/lorenzofiamingo/swiftui-shared-object.git resolved at 2.0.0 (487a922)
warning: '.resolve-product-dependencies': dependency 'swiftui-shared-object' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/lorenzofiamingo/swiftui-shared-object.git
https://github.com/lorenzofiamingo/swiftui-shared-object.git
{
"dependencies" : [
],
"manifest_display_name" : "swiftui-shared-object",
"name" : "swiftui-shared-object",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "tvos",
"version" : "13.0"
},
{
"name" : "watchos",
"version" : "6.0"
}
],
"products" : [
{
"name" : "SharedObject",
"targets" : [
"SharedObject"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SharedObjectTests",
"module_type" : "SwiftTarget",
"name" : "SharedObjectTests",
"path" : "Tests/SharedObjectTests",
"sources" : [
"SharedObjectTests.swift",
"XCTestManifests.swift"
],
"target_dependencies" : [
"SharedObject"
],
"type" : "test"
},
{
"c99name" : "SharedObject",
"module_type" : "SwiftTarget",
"name" : "SharedObject",
"path" : "Sources/SharedObject",
"product_memberships" : [
"SharedObject"
],
"sources" : [
"SharableObject.swift",
"SharedObject.swift",
"SharedRepository.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.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-2F0A5646E1D333AE.txt
[3/6] Compiling SharedObject SharableObject.swift
[4/6] Compiling SharedObject SharedObject.swift
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:16:3: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
17 |
18 | /// The underlying value referenced by the shared object.
SwiftUICore.ObservedObject.init:2:35: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
1 | generic struct ObservedObject {
2 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)}
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:44:29: warning: generic parameter 'ObjectType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
12 | @available(watchOS 6.0, tvOS 13.0, iOS 13.0, OSX 10.15, *)
13 | @propertyWrapper
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
| `- note: 'ObjectType' previously declared here
15 |
16 | @ObservedObject private var object: Object<ObjectType>
:
42 | }
43 |
44 | private final class Object<ObjectType: ObservableObject>: ObservableObject {
| `- warning: generic parameter 'ObjectType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
45 |
46 | private var cancellable: AnyCancellable?
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:20:9: warning: main actor-isolated property 'object' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| `- note: property declared here
17 |
18 | /// The underlying value referenced by the shared object.
19 | public var wrappedValue: ObjectType {
20 | get { object.object }
| `- warning: main actor-isolated property 'object' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
21 | nonmutating set { object.object = newValue }
22 | }
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:21:21: warning: main actor-isolated property 'object' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| `- note: mutation of this property is only permitted within the actor
17 |
18 | /// The underlying value referenced by the shared object.
19 | public var wrappedValue: ObjectType {
20 | get { object.object }
21 | nonmutating set { object.object = newValue }
| `- warning: main actor-isolated property 'object' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
22 | }
23 |
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:26:9: warning: main actor-isolated property 'object' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| `- note: property declared here
17 |
18 | /// The underlying value referenced by the shared object.
:
24 | /// A projection of the shared object that creates bindings to its properties using dynamic member lookup.
25 | public var projectedValue: SharedObject.Wrapper {
26 | .init(object.object)
| `- warning: main actor-isolated property 'object' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
27 | }
28 |
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:31:3: warning: main actor-isolated property 'object' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| `- note: mutation of this property is only permitted within the actor
17 |
18 | /// The underlying value referenced by the shared object.
:
29 | /// Retrieves the shared object with the given id or creates a shared object with an initial wrapped value.
30 | public init(wrappedValue: ObjectType, _ id: ID) {
31 | object = .init(wrappedValue: wrappedValue, id: id)
| `- warning: main actor-isolated property 'object' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
32 | }
33 |
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:36:3: warning: main actor-isolated property 'object' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| `- note: mutation of this property is only permitted within the actor
17 |
18 | /// The underlying value referenced by the shared object.
:
34 | /// Retrieves the shared object with the given id.
35 | public init(_ id: ID) {
36 | object = .init(wrappedValue: nil, id: id)
| `- warning: main actor-isolated property 'object' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
37 | }
38 |
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:41:3: warning: main actor-isolated property 'object' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| `- note: mutation of this property is only permitted within the actor
17 |
18 | /// The underlying value referenced by the shared object.
:
39 | /// Retrieves the shared object with the given id or creates a shared object with an initial wrapped value provided by the object class.
40 | public init(_ id: ID) where ObjectType: SharableObject {
41 | object = .init(wrappedValue: ObjectType.initialValue, id: id)
| `- warning: main actor-isolated property 'object' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
42 | }
43 |
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:74:5: warning: capture of 'self' with non-sendable type 'SharedObject<ObjectType, ID>.Wrapper' in a '@Sendable' closure
62 | /// A wrapper of the underlying observable object that can create bindings to its properties using dynamic member lookup.
63 | @dynamicMemberLookup
64 | public struct Wrapper {
| `- note: consider making struct 'Wrapper' conform to the 'Sendable' protocol
65 |
66 | private let object: ObjectType
:
72 | subscript<Subject>(dynamicMember keyPath: ReferenceWritableKeyPath<ObjectType, Subject>) -> Binding<Subject> {
73 | .init {
74 | object[keyPath: keyPath]
| `- warning: capture of 'self' with non-sendable type 'SharedObject<ObjectType, ID>.Wrapper' in a '@Sendable' closure
75 | } set: { newValue in
76 | object[keyPath: keyPath] = newValue
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:74:21: warning: capture of 'keyPath' with non-sendable type 'ReferenceWritableKeyPath<ObjectType, Subject>' in a '@Sendable' closure
72 | subscript<Subject>(dynamicMember keyPath: ReferenceWritableKeyPath<ObjectType, Subject>) -> Binding<Subject> {
73 | .init {
74 | object[keyPath: keyPath]
| `- warning: capture of 'keyPath' with non-sendable type 'ReferenceWritableKeyPath<ObjectType, Subject>' in a '@Sendable' closure
75 | } set: { newValue in
76 | object[keyPath: keyPath] = newValue
Swift.ReferenceWritableKeyPath:1:14: note: generic class 'ReferenceWritableKeyPath' does not conform to the 'Sendable' protocol
1 | public class ReferenceWritableKeyPath<Root, Value> : WritableKeyPath<Root, Value> {
| `- note: generic class 'ReferenceWritableKeyPath' does not conform to the 'Sendable' protocol
2 | @objc deinit
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:76:5: warning: capture of 'self' with non-sendable type 'SharedObject<ObjectType, ID>.Wrapper' in a '@Sendable' closure
62 | /// A wrapper of the underlying observable object that can create bindings to its properties using dynamic member lookup.
63 | @dynamicMemberLookup
64 | public struct Wrapper {
| `- note: consider making struct 'Wrapper' conform to the 'Sendable' protocol
65 |
66 | private let object: ObjectType
:
74 | object[keyPath: keyPath]
75 | } set: { newValue in
76 | object[keyPath: keyPath] = newValue
| `- warning: capture of 'self' with non-sendable type 'SharedObject<ObjectType, ID>.Wrapper' in a '@Sendable' closure
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:76:21: warning: capture of 'keyPath' with non-sendable type 'ReferenceWritableKeyPath<ObjectType, Subject>' in a '@Sendable' closure
74 | object[keyPath: keyPath]
75 | } set: { newValue in
76 | object[keyPath: keyPath] = newValue
| `- warning: capture of 'keyPath' with non-sendable type 'ReferenceWritableKeyPath<ObjectType, Subject>' in a '@Sendable' closure
77 | }
78 | }
Swift.ReferenceWritableKeyPath:1:14: note: generic class 'ReferenceWritableKeyPath' does not conform to the 'Sendable' protocol
1 | public class ReferenceWritableKeyPath<Root, Value> : WritableKeyPath<Root, Value> {
| `- note: generic class 'ReferenceWritableKeyPath' does not conform to the 'Sendable' protocol
2 | @objc deinit
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:16:3: warning: sending '$input_value' risks causing data races; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| |- warning: sending '$input_value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated '$input_value' to main actor-isolated callee risks causing data races between main actor-isolated and task-isolated uses
17 |
18 | /// The underlying value referenced by the shared object.
[5/6] Emitting module SharedObject
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:16:3: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
17 |
18 | /// The underlying value referenced by the shared object.
SwiftUICore.ObservedObject.init:2:35: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
1 | generic struct ObservedObject {
2 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)}
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:44:29: warning: generic parameter 'ObjectType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
12 | @available(watchOS 6.0, tvOS 13.0, iOS 13.0, OSX 10.15, *)
13 | @propertyWrapper
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
| `- note: 'ObjectType' previously declared here
15 |
16 | @ObservedObject private var object: Object<ObjectType>
:
42 | }
43 |
44 | private final class Object<ObjectType: ObservableObject>: ObservableObject {
| `- warning: generic parameter 'ObjectType' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
45 |
46 | private var cancellable: AnyCancellable?
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedRepository.swift:12:21: warning: static property 'objects' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 | final class SharedRepository {
11 |
12 | private static var objects: [Int: Any] = [:]
| |- warning: static property 'objects' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'objects' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'objects' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | static func getObject<ObjectType>(for key: Int, defaultValue: ObjectType?) -> ObjectType {
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedObject.swift:16:3: warning: sending '$input_value' risks causing data races; this is an error in the Swift 6 language mode
14 | public struct SharedObject<ObjectType, ID>: DynamicProperty where ObjectType: ObservableObject, ID: Hashable {
15 |
16 | @ObservedObject private var object: Object<ObjectType>
| |- warning: sending '$input_value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated '$input_value' to main actor-isolated callee risks causing data races between main actor-isolated and task-isolated uses
17 |
18 | /// The underlying value referenced by the shared object.
[6/6] Compiling SharedObject SharedRepository.swift
/Users/admin/builder/spi-builder-workspace/Sources/SharedObject/SharedRepository.swift:12:21: warning: static property 'objects' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 | final class SharedRepository {
11 |
12 | private static var objects: [Int: Any] = [:]
| |- warning: static property 'objects' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'objects' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'objects' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | static func getObject<ObjectType>(for key: Int, defaultValue: ObjectType?) -> ObjectType {
Build complete! (8.95s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "swiftui-shared-object",
"name" : "swiftui-shared-object",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "tvos",
"version" : "13.0"
},
{
"name" : "watchos",
"version" : "6.0"
}
],
"products" : [
{
"name" : "SharedObject",
"targets" : [
"SharedObject"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SharedObjectTests",
"module_type" : "SwiftTarget",
"name" : "SharedObjectTests",
"path" : "Tests/SharedObjectTests",
"sources" : [
"SharedObjectTests.swift",
"XCTestManifests.swift"
],
"target_dependencies" : [
"SharedObject"
],
"type" : "test"
},
{
"c99name" : "SharedObject",
"module_type" : "SwiftTarget",
"name" : "SharedObject",
"path" : "Sources/SharedObject",
"product_memberships" : [
"SharedObject"
],
"sources" : [
"SharableObject.swift",
"SharedObject.swift",
"SharedRepository.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Done.