Build Information
Successful build of MenuBuilder 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/j-f1/MenuBuilder.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/j-f1/MenuBuilder
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at ba0202c v3.0.0 changelog
Cloned https://github.com/j-f1/MenuBuilder.git
Revision (git rev-parse @):
ba0202c5ff6d63f0fd7ec6b1da11a769eff15000
SUCCESS checkout https://github.com/j-f1/MenuBuilder.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/j-f1/MenuBuilder.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/11] Compiling MenuBuilder SeparatorItem.swift
[4/11] Compiling MenuBuilder MenuItem.swift
[5/11] Compiling MenuBuilder MenuInvoker.swift
/Users/admin/builder/spi-builder-workspace/Sources/MenuBuilder/MenuInvoker.swift:5:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MenuInvoker' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// A singleton class that calls the closure-based `onSelect` handlers of menu items
4 | class MenuInvoker {
| `- note: class 'MenuInvoker' does not conform to the 'Sendable' protocol
5 | static let shared = MenuInvoker()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MenuInvoker' 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
6 | private init() {}
7 | @objc func run(_ item: NSMenuItem) {
[6/11] Compiling MenuBuilder MenuBuilder.swift
[7/11] Compiling MenuBuilder IndentGroup.swift
[8/11] Compiling MenuBuilder MenuItemView.swift
[9/11] Compiling MenuBuilder AnyMenuItem.swift
/Users/admin/builder/spi-builder-workspace/Sources/MenuBuilder/MenuInvoker.swift:5:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MenuInvoker' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// A singleton class that calls the closure-based `onSelect` handlers of menu items
4 | class MenuInvoker {
| `- note: class 'MenuInvoker' does not conform to the 'Sendable' protocol
5 | static let shared = MenuInvoker()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MenuInvoker' 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
6 | private init() {}
7 | @objc func run(_ item: NSMenuItem) {
/Users/admin/builder/spi-builder-workspace/Sources/MenuBuilder/AnyMenuItem.swift:196:14: warning: call to main actor-isolated initializer 'init(showsHighlight:_:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
193 | /// ```
194 | @available(macOS 10.15, *)
195 | public func view<Content: View>(showsHighlight: Bool = true, @ViewBuilder _ content: () -> Content) -> Self {
| `- note: add '@MainActor' to make instance method 'view(showsHighlight:_:)' part of global actor 'MainActor'
196 | view(MenuItemView(showsHighlight: showsHighlight, content()))
| `- warning: call to main actor-isolated initializer 'init(showsHighlight:_:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
197 | }
198 | #endif
/Users/admin/builder/spi-builder-workspace/Sources/MenuBuilder/MenuItemView.swift:32:5: note: calls to initializer 'init(showsHighlight:_:)' from outside of its actor context are implicitly asynchronous
30 | let showsHighlight: Bool
31 |
32 | init(showsHighlight: Bool, _ view: ContentView) {
| `- note: calls to initializer 'init(showsHighlight:_:)' from outside of its actor context are implicitly asynchronous
33 | effectView = NSVisualEffectView()
34 | contentView = view
/Users/admin/builder/spi-builder-workspace/Sources/MenuBuilder/AnyMenuItem.swift:196:14: warning: sending task-isolated value of type 'Content' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
194 | @available(macOS 10.15, *)
195 | public func view<Content: View>(showsHighlight: Bool = true, @ViewBuilder _ content: () -> Content) -> Self {
196 | view(MenuItemView(showsHighlight: showsHighlight, content()))
| `- warning: sending task-isolated value of type 'Content' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
197 | }
198 | #endif
[10/11] Compiling MenuBuilder CustomMenuItem.swift
[11/11] Emitting module MenuBuilder
/Users/admin/builder/spi-builder-workspace/Sources/MenuBuilder/MenuInvoker.swift:5:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MenuInvoker' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// A singleton class that calls the closure-based `onSelect` handlers of menu items
4 | class MenuInvoker {
| `- note: class 'MenuInvoker' does not conform to the 'Sendable' protocol
5 | static let shared = MenuInvoker()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MenuInvoker' 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
6 | private init() {}
7 | @objc func run(_ item: NSMenuItem) {
Build complete! (34.09s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "MenuBuilder",
"name" : "MenuBuilder",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.10"
}
],
"products" : [
{
"name" : "MenuBuilder",
"targets" : [
"MenuBuilder"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "MenuBuilderTests",
"module_type" : "SwiftTarget",
"name" : "MenuBuilderTests",
"path" : "Tests/MenuBuilderTests",
"sources" : [
"MenuBuilderTests.swift",
"XCTestManifests.swift"
],
"target_dependencies" : [
"MenuBuilder"
],
"type" : "test"
},
{
"c99name" : "MenuBuilder",
"module_type" : "SwiftTarget",
"name" : "MenuBuilder",
"path" : "Sources/MenuBuilder",
"product_memberships" : [
"MenuBuilder"
],
"sources" : [
"AnyMenuItem.swift",
"CustomMenuItem.swift",
"IndentGroup.swift",
"MenuBuilder.swift",
"MenuInvoker.swift",
"MenuItem.swift",
"MenuItemView.swift",
"SeparatorItem.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
Done.