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 master (b24a37), with Swift 6.0 for macOS (SPM) on 30 Nov 2024 03:07:31 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 -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.58.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Clipy/Magnet.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Clipy/Magnet
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at b24a371 Bump rexml from 3.2.8 to 3.3.9 (#97)
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 @):
b24a371a882033893266575f76964855eae65099
SUCCESS checkout https://github.com/Clipy/Magnet.git at master
Fetching https://github.com/Clipy/Sauce
[1/872] Fetching sauce
Fetched https://github.com/Clipy/Sauce from cache (0.88s)
Computing version for https://github.com/Clipy/Sauce
Computed https://github.com/Clipy/Sauce at 2.4.1 (0.56s)
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.45s)
Computing version for https://github.com/Clipy/Sauce
Computed https://github.com/Clipy/Sauce at 2.4.1 (0.02s)
Creating working copy for https://github.com/Clipy/Sauce
Working copy of https://github.com/Clipy/Sauce resolved at 2.4.1
Creating working copy for https://github.com/Clipy/Magnet.git
Working copy of https://github.com/Clipy/Magnet.git resolved at master (b24a371)
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
{
  "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"
}
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 -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/3] Write sources
[2/3] Write swift-version--7754E27361AE5C74.txt
[4/12] Compiling Sauce SpecialKeyCode.swift
[5/12] Compiling Sauce TISInputSource+Property.swift
[6/12] Compiling Sauce Sauce.swift
[7/12] Compiling Sauce ModifierTransformer.swift
[8/12] Compiling Sauce KeyboardLayout.swift
[9/12] Compiling Sauce Key.swift
[10/12] Compiling Sauce NSMenuItem+Key.swift
[11/12] Compiling Sauce InputSource.swift
[12/12] Emitting module Sauce
[13/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 | open 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 |     }
[14/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 | open 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]()
[15/21] Compiling Magnet NSEventExtension.swift
[16/21] Compiling Magnet HotKey.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 | open 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:
[17/21] Compiling Magnet CollectionExtension.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 | open 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 KeyExtension.swift
[20/21] Compiling Magnet KeyCombo.swift
[21/21] Compiling Magnet IntExtension.swift
Build complete! (16.68s)
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.