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 CustomButton, reference main (e7c725), with Swift 6.0 for macOS (SPM) on 1 Nov 2024 07:13:59 UTC.

Swift 6 data race errors: 0

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/sindresorhus/CustomButton.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/sindresorhus/CustomButton
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at e7c7250 Tweaks
Cloned https://github.com/sindresorhus/CustomButton.git
Revision (git rev-parse @):
e7c72500005ae4f3ca29c102ad7f8175c68c396b
SUCCESS checkout https://github.com/sindresorhus/CustomButton.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": "custombutton",
      "name": "CustomButton",
      "url": "https://github.com/sindresorhus/CustomButton.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/CustomButton",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/sindresorhus/CustomButton.git
[1/184] Fetching custombutton
Fetched https://github.com/sindresorhus/CustomButton.git from cache (0.92s)
Creating working copy for https://github.com/sindresorhus/CustomButton.git
Working copy of https://github.com/sindresorhus/CustomButton.git resolved at main (e7c7250)
warning: '.resolve-product-dependencies': dependency 'custombutton' 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/sindresorhus/CustomButton.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] Emitting module CustomButton
[4/5] Compiling CustomButton CustomButton.swift
[5/5] Compiling CustomButton Utilities.swift
/Users/admin/builder/spi-builder-workspace/Sources/CustomButton/Utilities.swift:60:28: warning: main actor-isolated property 'bounds' can not be referenced from a nonisolated autoclosure; this is an error in the Swift 6 language mode
 58 | 	) {
 59 | 		self.view = view
 60 | 		self.rect = rect ?? view.bounds
    |                            `- warning: main actor-isolated property 'bounds' can not be referenced from a nonisolated autoclosure; this is an error in the Swift 6 language mode
 61 | 		self.options = options
 62 | 	}
AppKit.NSView:76:25: note: property declared here
 74 |     @available(swift, obsoleted: 3, renamed: "rotate(byDegrees:)")
 75 |     open func rotateByAngle(_ angle: CGFloat)
 76 |     @MainActor open var bounds: NSRect { get set }
    |                         `- note: property declared here
 77 |     open var isFlipped: Bool { get }
 78 |     @available(swift, obsoleted: 3, renamed: "isFlipped")
/Users/admin/builder/spi-builder-workspace/Sources/CustomButton/Utilities.swift:70:10: warning: call to main actor-isolated instance method 'removeTrackingArea' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 66 | 	- Note: This should be called in your `NSView#updateTrackingAreas()` method.
 67 | 	*/
 68 | 	func update() {
    |       `- note: add '@MainActor' to make instance method 'update()' part of global actor 'MainActor'
 69 | 		if let trackingArea {
 70 | 			view?.removeTrackingArea(trackingArea)
    |          `- warning: call to main actor-isolated instance method 'removeTrackingArea' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 71 | 		}
 72 |
AppKit.NSView:5:26: note: calls to instance method 'removeTrackingArea' from outside of its actor context are implicitly asynchronous
 3 |     @MainActor open func addTrackingArea(_ trackingArea: NSTrackingArea)
 4 |     @available(macOS 10.5, *)
 5 |     @MainActor open func removeTrackingArea(_ trackingArea: NSTrackingArea)
   |                          `- note: calls to instance method 'removeTrackingArea' from outside of its actor context are implicitly asynchronous
 6 |     @available(macOS 10.5, *)
 7 |     open var trackingAreas: [NSTrackingArea] { get }
/Users/admin/builder/spi-builder-workspace/Sources/CustomButton/Utilities.swift:83:9: warning: call to main actor-isolated instance method 'addTrackingArea' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 66 | 	- Note: This should be called in your `NSView#updateTrackingAreas()` method.
 67 | 	*/
 68 | 	func update() {
    |       `- note: add '@MainActor' to make instance method 'update()' part of global actor 'MainActor'
 69 | 		if let trackingArea {
 70 | 			view?.removeTrackingArea(trackingArea)
    :
 81 | 		)
 82 |
 83 | 		view?.addTrackingArea(newTrackingArea)
    |         `- warning: call to main actor-isolated instance method 'addTrackingArea' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 84 | 		trackingArea = newTrackingArea
 85 | 	}
AppKit.NSView:3:26: note: calls to instance method 'addTrackingArea' from outside of its actor context are implicitly asynchronous
 1 | extension NSView {
 2 |     @available(macOS 10.5, *)
 3 |     @MainActor open func addTrackingArea(_ trackingArea: NSTrackingArea)
   |                          `- note: calls to instance method 'addTrackingArea' from outside of its actor context are implicitly asynchronous
 4 |     @available(macOS 10.5, *)
 5 |     @MainActor open func removeTrackingArea(_ trackingArea: NSTrackingArea)
/Users/admin/builder/spi-builder-workspace/Sources/CustomButton/Utilities.swift:70:10: warning: sending 'trackingArea' risks causing data races; this is an error in the Swift 6 language mode
 68 | 	func update() {
 69 | 		if let trackingArea {
 70 | 			view?.removeTrackingArea(trackingArea)
    |          |- warning: sending 'trackingArea' risks causing data races; this is an error in the Swift 6 language mode
    |          `- note: sending task-isolated 'trackingArea' to main actor-isolated instance method 'removeTrackingArea' risks causing data races between main actor-isolated and task-isolated uses
 71 | 		}
 72 |
/Users/admin/builder/spi-builder-workspace/Sources/CustomButton/Utilities.swift:83:9: warning: sending 'newTrackingArea' risks causing data races; this is an error in the Swift 6 language mode
 81 | 		)
 82 |
 83 | 		view?.addTrackingArea(newTrackingArea)
    |         |- warning: sending 'newTrackingArea' risks causing data races; this is an error in the Swift 6 language mode
    |         `- note: sending 'newTrackingArea' to main actor-isolated instance method 'addTrackingArea' risks causing data races between main actor-isolated and local nonisolated uses
 84 | 		trackingArea = newTrackingArea
    |                  `- note: access can happen concurrently
 85 | 	}
 86 | }
Build complete! (8.78s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "CustomButton",
  "name" : "CustomButton",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.13"
    }
  ],
  "products" : [
    {
      "name" : "CustomButton",
      "targets" : [
        "CustomButton"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "CustomButton",
      "module_type" : "SwiftTarget",
      "name" : "CustomButton",
      "path" : "Sources/CustomButton",
      "product_memberships" : [
        "CustomButton"
      ],
      "sources" : [
        "CustomButton.swift",
        "Utilities.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.