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 Magnet, reference v3.4.0 (26d672), with Swift 6.0 for macOS (SPM) on 3 Nov 2024 17:38:52 UTC.

Swift 6 data race errors: 1

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/Clipy/Magnet.git
Reference: v3.4.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Clipy/Magnet
 * tag               v3.4.0     -> FETCH_HEAD
HEAD is now at 26d672a Bump version to v3.4.0
Submodule path 'Carthage/Checkouts/Sauce': checked out '8f8fabaa8509c1a653d6c2c3c87396a4c493d876'
Submodule 'Carthage/Checkouts/Sauce' (https://github.com/Clipy/Sauce.git) registered for path 'Carthage/Checkouts/Sauce'
Cloning into '/Users/admin/builder/spi-builder-workspace/Carthage/Checkouts/Sauce'...
Cloned https://github.com/Clipy/Magnet.git
Revision (git rev-parse @):
26d672a031fd33eac94887b4e19aca0ab4761f45
SUCCESS checkout https://github.com/Clipy/Magnet.git at v3.4.0
Fetching https://github.com/Clipy/Sauce
[1/872] Fetching sauce
Fetched https://github.com/Clipy/Sauce from cache (0.84s)
Computing version for https://github.com/Clipy/Sauce
Computed https://github.com/Clipy/Sauce at 2.4.1 (0.66s)
Creating working copy for https://github.com/Clipy/Sauce
Working copy of https://github.com/Clipy/Sauce resolved at 2.4.1
========================================
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": "magnet",
      "name": "Magnet",
      "url": "https://github.com/Clipy/Magnet.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Magnet",
      "dependencies": [
        {
          "identity": "sauce",
          "name": "Sauce",
          "url": "https://github.com/Clipy/Sauce",
          "version": "2.4.1",
          "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Sauce",
          "dependencies": [
          ]
        }
      ]
    }
  ]
}
Fetching https://github.com/Clipy/Magnet.git
[1/1335] Fetching magnet
Fetched https://github.com/Clipy/Magnet.git from cache (0.88s)
Fetching https://github.com/Clipy/Sauce from cache
Fetched https://github.com/Clipy/Sauce from cache (0.50s)
Computing version for https://github.com/Clipy/Sauce
Computed https://github.com/Clipy/Sauce at 2.4.1 (0.06s)
Creating working copy for https://github.com/Clipy/Magnet.git
Working copy of https://github.com/Clipy/Magnet.git resolved at v3.4.0 (26d672a)
Creating working copy for https://github.com/Clipy/Sauce
Working copy of https://github.com/Clipy/Sauce resolved at 2.4.1
warning: '.resolve-product-dependencies': dependency 'magnet' is not used by any target
Found 1 product dependencies
  - Sauce
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/Clipy/Magnet.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/3] Write sources
[2/3] Write swift-version--7754E27361AE5C74.txt
[4/12] Compiling Sauce KeyboardLayout.swift
[5/12] Compiling Sauce Key.swift
[6/12] Compiling Sauce TISInputSource+Property.swift
[7/12] Compiling Sauce SpecialKeyCode.swift
[8/12] Compiling Sauce NSMenuItem+Key.swift
[9/12] Compiling Sauce ModifierTransformer.swift
[10/12] Compiling Sauce InputSource.swift
[11/12] Emitting module Sauce
[12/12] Compiling Sauce Sauce.swift
[13/21] Compiling Magnet IntExtension.swift
[14/21] Compiling Magnet CollectionExtension.swift
[15/21] Compiling Magnet ModifierEventHandler.swift
/Users/admin/builder/spi-builder-workspace/Lib/Magnet/ModifierEventHandler.swift:69:13: warning: capture of 'self' with non-sendable type 'ModifierEventHandler?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
11 | import Cocoa
12 |
13 | public final class ModifierEventHandler {
   |                    `- note: class 'ModifierEventHandler' does not conform to the 'Sendable' protocol
14 |
15 |     // MARK: - Properties
   :
67 |         // After a certain amount of time, the tapped modifier will be reset.
68 |         cleanQueue.asyncAfter(deadline: .now() + cleanTimeInterval) { [weak self] in
69 |             self?.tappingModifierFlags = NSEvent.ModifierFlags()
   |             `- warning: capture of 'self' with non-sendable type 'ModifierEventHandler?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
70 |         }
71 |     }
[16/21] Compiling Magnet NSEventExtension.swift
[17/21] Compiling Magnet KeyCombo.swift
[18/21] Emitting module Magnet
/Users/admin/builder/spi-builder-workspace/Lib/Magnet/HotKeyCenter.swift:17:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HotKeyCenter' may have shared mutable state; this is an error in the Swift 6 language mode
 12 | import Carbon
 13 |
 14 | public final class HotKeyCenter {
    |                    `- note: class 'HotKeyCenter' does not conform to the 'Sendable' protocol
 15 |
 16 |     // MARK: - Properties
 17 |     public static let shared = HotKeyCenter()
    |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HotKeyCenter' 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
 18 |
 19 |     private var hotKeys = [String: HotKey]()
[19/21] Compiling Magnet HotKey.swift
/Users/admin/builder/spi-builder-workspace/Lib/Magnet/HotKey.swift:36:21: warning: capture of 'closure' with non-sendable type '() -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 34 |             case .main:
 35 |                 DispatchQueue.main.async {
 36 |                     closure()
    |                     |- warning: capture of 'closure' with non-sendable type '() -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 37 |                 }
 38 |             case .session:
/Users/admin/builder/spi-builder-workspace/Lib/Magnet/HotKeyCenter.swift:17:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HotKeyCenter' may have shared mutable state; this is an error in the Swift 6 language mode
 12 | import Carbon
 13 |
 14 | public final class HotKeyCenter {
    |                    `- note: class 'HotKeyCenter' does not conform to the 'Sendable' protocol
 15 |
 16 |     // MARK: - Properties
 17 |     public static let shared = HotKeyCenter()
    |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HotKeyCenter' 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
 18 |
 19 |     private var hotKeys = [String: HotKey]()
/Users/admin/builder/spi-builder-workspace/Lib/Magnet/HotKey.swift:36:21: warning: sending 'closure' risks causing data races; this is an error in the Swift 6 language mode
 34 |             case .main:
 35 |                 DispatchQueue.main.async {
 36 |                     closure()
    |                     |- warning: sending 'closure' risks causing data races; this is an error in the Swift 6 language mode
    |                     `- note: task-isolated 'closure' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 37 |                 }
 38 |             case .session:
[20/21] Compiling Magnet HotKeyCenter.swift
/Users/admin/builder/spi-builder-workspace/Lib/Magnet/HotKeyCenter.swift:17:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HotKeyCenter' may have shared mutable state; this is an error in the Swift 6 language mode
 12 | import Carbon
 13 |
 14 | public final class HotKeyCenter {
    |                    `- note: class 'HotKeyCenter' does not conform to the 'Sendable' protocol
 15 |
 16 |     // MARK: - Properties
 17 |     public static let shared = HotKeyCenter()
    |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'HotKeyCenter' 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
 18 |
 19 |     private var hotKeys = [String: HotKey]()
[21/21] Compiling Magnet KeyExtension.swift
Build complete! (15.09s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "sauce",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "2.4.0",
            "upper_bound" : "2.5.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/Clipy/Sauce"
    }
  ],
  "manifest_display_name" : "Magnet",
  "name" : "Magnet",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.13"
    }
  ],
  "products" : [
    {
      "name" : "Magnet",
      "targets" : [
        "Magnet"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "MagnetTests",
      "module_type" : "SwiftTarget",
      "name" : "MagnetTests",
      "path" : "Lib/MagnetTests",
      "sources" : [
        "CollectionExtensionTests.swift",
        "Fixtures/v2_0_0KeyCombo.swift",
        "Fixtures/v3_1_0KeyCombo.swift",
        "KeyComboTests.swift",
        "ModifierEventHandlerTests.swift"
      ],
      "target_dependencies" : [
        "Magnet"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Magnet",
      "module_type" : "SwiftTarget",
      "name" : "Magnet",
      "path" : "Lib/Magnet",
      "product_dependencies" : [
        "Sauce"
      ],
      "product_memberships" : [
        "Magnet"
      ],
      "sources" : [
        "Extensions/CollectionExtension.swift",
        "Extensions/IntExtension.swift",
        "Extensions/KeyExtension.swift",
        "Extensions/NSEventExtension.swift",
        "HotKey.swift",
        "HotKeyCenter.swift",
        "KeyCombo.swift",
        "ModifierEventHandler.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.