The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of MenuBuilder, reference main (ba0202), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 10:20:18 UTC.

Swift 6 data race errors: 1

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/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
========================================
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": "menubuilder",
      "name": "MenuBuilder",
      "url": "https://github.com/j-f1/MenuBuilder.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/MenuBuilder",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/j-f1/MenuBuilder.git
[1/545] Fetching menubuilder
Fetched https://github.com/j-f1/MenuBuilder.git from cache (0.79s)
Creating working copy for https://github.com/j-f1/MenuBuilder.git
Working copy of https://github.com/j-f1/MenuBuilder.git resolved at main (ba0202c)
warning: '.resolve-product-dependencies': dependency 'menubuilder' 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/j-f1/MenuBuilder.git
https://github.com/j-f1/MenuBuilder.git
{
  "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"
}
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/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: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 6 |     private init() {}
 7 |     @objc func run(_ item: NSMenuItem) {
[4/11] Compiling MenuBuilder CustomMenuItem.swift
[5/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: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
   |                `- 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 AnyMenuItem.swift
/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
   |     `- note: main actor isolation inferred from inheritance from class 'NSView'
33 |         effectView = NSVisualEffectView()
34 |         contentView = view
[7/11] Compiling MenuBuilder SeparatorItem.swift
[8/11] Compiling MenuBuilder IndentGroup.swift
[9/11] Compiling MenuBuilder MenuItem.swift
[10/11] Compiling MenuBuilder MenuItemView.swift
[11/11] Compiling MenuBuilder MenuBuilder.swift
Build complete! (9.36s)
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.