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

Failed to build KeyInputListener, reference main (fbf8c8), with Swift 6.0 for macOS (SPM) on 1 Dec 2024 00:30:41 UTC.

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/edonv/KeyInputListener.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/edonv/KeyInputListener
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at fbf8c89 Added privacy manifest.
Cloned https://github.com/edonv/KeyInputListener.git
Revision (git rev-parse @):
fbf8c8922b96aabfc2c9beb0adb61479663cb110
SUCCESS checkout https://github.com/edonv/KeyInputListener.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": "keyinputlistener",
      "name": "KeyInputListener",
      "url": "https://github.com/edonv/KeyInputListener.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/KeyInputListener",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/edonv/KeyInputListener.git
[1/60] Fetching keyinputlistener
Fetched https://github.com/edonv/KeyInputListener.git from cache (0.68s)
Creating working copy for https://github.com/edonv/KeyInputListener.git
Working copy of https://github.com/edonv/KeyInputListener.git resolved at main (fbf8c89)
warning: '.resolve-product-dependencies': dependency 'keyinputlistener' 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/edonv/KeyInputListener.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "KeyInputListener",
  "name" : "KeyInputListener",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "KeyInputListener",
      "targets" : [
        "KeyInputListener"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "KeyInputListenerTests",
      "module_type" : "SwiftTarget",
      "name" : "KeyInputListenerTests",
      "path" : "Tests/KeyInputListenerTests",
      "sources" : [
        "KeyInputListenerTests.swift"
      ],
      "target_dependencies" : [
        "KeyInputListener"
      ],
      "type" : "test"
    },
    {
      "c99name" : "KeyInputListener",
      "module_type" : "SwiftTarget",
      "name" : "KeyInputListener",
      "path" : "Sources/KeyInputListener",
      "product_memberships" : [
        "KeyInputListener"
      ],
      "sources" : [
        "KeyInputEvent.swift",
        "KeyInputListener+ViewModifiers.swift",
        "KeyInputListener.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
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/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/6] Compiling KeyInputListener KeyInputListener+ViewModifiers.swift
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputEvent.swift:20:35: error: cannot find type 'NSEvent' in scope
18 |
19 |     #if canImport(AppKit)
20 |     public typealias SpecialKey = NSEvent.SpecialKey
   |                                   `- error: cannot find type 'NSEvent' in scope
21 |     #else
22 |     public typealias SpecialKey = Never
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/6] Emitting module KeyInputListener
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputEvent.swift:20:35: error: cannot find type 'NSEvent' in scope
18 |
19 |     #if canImport(AppKit)
20 |     public typealias SpecialKey = NSEvent.SpecialKey
   |                                   `- error: cannot find type 'NSEvent' in scope
21 |     #else
22 |     public typealias SpecialKey = Never
[5/6] Compiling KeyInputListener KeyInputEvent.swift
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputEvent.swift:20:35: error: cannot find type 'NSEvent' in scope
18 |
19 |     #if canImport(AppKit)
20 |     public typealias SpecialKey = NSEvent.SpecialKey
   |                                   `- error: cannot find type 'NSEvent' in scope
21 |     #else
22 |     public typealias SpecialKey = Never
[6/6] Compiling KeyInputListener KeyInputListener.swift
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputListener.swift:24:29: error: use of local variable 'modifiers' before its declaration
 22 |         } else {
 23 |             #if canImport(AppKit)
 24 |             var modifiers = modifiers
    |                 |           `- error: use of local variable 'modifiers' before its declaration
    |                 `- note: 'modifiers' declared here
 25 |             if char.isUppercase && modifiers.contains(.shift) {
 26 |                 modifiers.subtract(.shift)
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputListener.swift:25:56: error: cannot infer contextual base in reference to member 'shift'
 23 |             #if canImport(AppKit)
 24 |             var modifiers = modifiers
 25 |             if char.isUppercase && modifiers.contains(.shift) {
    |                                                        `- error: cannot infer contextual base in reference to member 'shift'
 26 |                 modifiers.subtract(.shift)
 27 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputListener.swift:26:37: error: cannot infer contextual base in reference to member 'shift'
 24 |             var modifiers = modifiers
 25 |             if char.isUppercase && modifiers.contains(.shift) {
 26 |                 modifiers.subtract(.shift)
    |                                     `- error: cannot infer contextual base in reference to member 'shift'
 27 |             }
 28 |             #endif
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputEvent.swift:20:35: error: cannot find type 'NSEvent' in scope
18 |
19 |     #if canImport(AppKit)
20 |     public typealias SpecialKey = NSEvent.SpecialKey
   |                                   `- error: cannot find type 'NSEvent' in scope
21 |     #else
22 |     public typealias SpecialKey = Never
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputListener.swift:102:20: warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 99 |     }
100 |
101 |     private func createView() -> ViewType {
    |                  `- note: add '@MainActor' to make instance method 'createView()' part of global actor 'MainActor'
102 |         let view = ViewType()
    |                    `- warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 |         view.keyInputEventHandler = self.keyInputEventHandler
104 |         return view
AppKit.NSView:354:35: note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
352 |     @available(macOS 10.14, *)
353 |     open func viewDidChangeEffectiveAppearance()
354 |     @MainActor public convenience init()
    |                                   `- note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
355 |     @available(macOS 10.5, *)
356 |     open var animations: [NSAnimatablePropertyKey : Any] { get set }
/Users/admin/builder/spi-builder-workspace/Sources/KeyInputListener/KeyInputListener.swift:103:14: warning: main actor-isolated property 'keyInputEventHandler' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
 15 |
 16 | class _TextInput: CrossPlatView {
 17 |     var keyInputEventHandler: ((KeyInputEvent) -> Void)? = nil
    |         `- note: mutation of this property is only permitted within the actor
 18 |
 19 |     private func newCharacter(_ char: Character) {
    :
 99 |     }
100 |
101 |     private func createView() -> ViewType {
    |                  `- note: add '@MainActor' to make instance method 'createView()' part of global actor 'MainActor'
102 |         let view = ViewType()
103 |         view.keyInputEventHandler = self.keyInputEventHandler
    |              `- warning: main actor-isolated property 'keyInputEventHandler' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
104 |         return view
105 |     }
BUILD FAILURE 6.0 macosSpm