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 SwiftProcessManager, reference main (b56b6e), with Swift 6.0 for macOS (SPM) on 14 Sep 2024 19:45:06 UTC.

Swift 6 data race errors: 0

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.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.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/calmdocs/SwiftProcessManager.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/calmdocs/SwiftProcessManager
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at b56b6e9 fix: remove old swiftpm dir
Cloned https://github.com/calmdocs/SwiftProcessManager.git
Revision (git rev-parse @):
b56b6e9b0cfdafa1d472521313cab3d4758384b4
SUCCESS checkout https://github.com/calmdocs/SwiftProcessManager.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/calmdocs/SwiftProcessManager.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.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-117DEE11B69C53C9.txt
[3/7] Compiling SwiftProcessManager ExitAppIfAlreadyOpen.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftProcessManager/ExitAppIfAlreadyOpen.swift:18:29: warning: call to main actor-isolated instance method 'terminate' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
11 |
12 | /// Terminate the running executable if another copy of the executable is already running.
13 | public func ExitAppIfAlreadyOpen() {
   |             `- note: add '@MainActor' to make global function 'ExitAppIfAlreadyOpen()' part of global actor 'MainActor'
14 |     let bundleID = Bundle.main.bundleIdentifier!
15 |     let numInstances = NSRunningApplication.runningApplications(withBundleIdentifier: bundleID).count
16 |     if numInstances > 1 {
17 |        print("Application already opened.  Exiting ...")
18 |        NSApplication.shared.terminate(nil)
   |                             `- warning: call to main actor-isolated instance method 'terminate' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
19 |     }
20 | }
AppKit.NSApplication:60:26: note: calls to instance method 'terminate' from outside of its actor context are implicitly asynchronous
 58 |     open func runModalSession(_ session: NSApplication.ModalSession) -> NSApplication.ModalResponse
 59 |     open func endModalSession(_ session: NSApplication.ModalSession)
 60 |     @MainActor open func terminate(_ sender: Any?)
    |                          `- note: calls to instance method 'terminate' from outside of its actor context are implicitly asynchronous
 61 |     open func requestUserAttention(_ requestType: NSApplication.RequestUserAttentionType) -> Int
 62 |     open func cancelUserAttentionRequest(_ request: Int)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftProcessManager/ExitAppIfAlreadyOpen.swift:18:22: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
11 |
12 | /// Terminate the running executable if another copy of the executable is already running.
13 | public func ExitAppIfAlreadyOpen() {
   |             `- note: add '@MainActor' to make global function 'ExitAppIfAlreadyOpen()' part of global actor 'MainActor'
14 |     let bundleID = Bundle.main.bundleIdentifier!
15 |     let numInstances = NSRunningApplication.runningApplications(withBundleIdentifier: bundleID).count
16 |     if numInstances > 1 {
17 |        print("Application already opened.  Exiting ...")
18 |        NSApplication.shared.terminate(nil)
   |                      `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 |     }
20 | }
AppKit.NSApplication:2:20: note: class property declared here
  1 | @MainActor open class NSApplication : NSResponder, NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElementProtocol, NSAccessibilityProtocol {
  2 |     open class var shared: NSApplication { get }
    |                    `- note: class property declared here
  3 |     @available(swift, obsoleted: 3, renamed: "shared")
  4 |     open class var sharedApplication: NSApplication { get }
[4/7] Compiling SwiftProcessManager ProcessManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftProcessManager/ProcessManager.swift:46:16: warning: capture of 'self' with non-sendable type 'ProcessManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 18 | /// Run and monitor bundled binaries.
 19 | @available(iOS 13, macOS 10.15, *)
 20 | public class ProcessManager: ObservableObject {
    |              `- note: class 'ProcessManager' does not conform to the 'Sendable' protocol
 21 |
 22 |     /// The Process variable used to run the procided binary.
    :
 44 |     public func terminateCurrentTask() {
 45 |         DispatchQueue.main.async {
 46 |             if self.task.isRunning {
    |                `- warning: capture of 'self' with non-sendable type 'ProcessManager' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 47 |                 self.task.terminate()
 48 |             }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftProcessManager/ProcessManager.swift:136:17: warning: capture of 'standardOutput' with non-sendable type '(String) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
134 |         outHandle.readabilityHandler = { pipe in
135 |             if let line = String(data: pipe.availableData, encoding: .utf8) {
136 |                 standardOutput(line)
    |                 |- warning: capture of 'standardOutput' with non-sendable type '(String) -> 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'
137 |             }
138 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftProcessManager/ProcessManager.swift:171:13: warning: capture of 'taskExitNotification' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
169 |         self.task.waitUntilExit()
170 |         DispatchQueue.main.async {
171 |             taskExitNotification(nil)
    |             |- warning: capture of 'taskExitNotification' with non-sendable type '((any Error)?) -> 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'
172 |         }
173 |     }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftProcessManager/ProcessManager.swift:46:16: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 44 |     public func terminateCurrentTask() {
 45 |         DispatchQueue.main.async {
 46 |             if self.task.isRunning {
    |                |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 47 |                 self.task.terminate()
 48 |             }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftProcessManager/ProcessManager.swift:171:13: warning: sending 'taskExitNotification' risks causing data races; this is an error in the Swift 6 language mode
169 |         self.task.waitUntilExit()
170 |         DispatchQueue.main.async {
171 |             taskExitNotification(nil)
    |             |- warning: sending 'taskExitNotification' risks causing data races; this is an error in the Swift 6 language mode
    |             `- note: task-isolated 'taskExitNotification' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
172 |         }
173 |     }
[5/7] Emitting module SwiftProcessManager
[6/7] Compiling SwiftProcessManager Port.swift
[7/7] Compiling SwiftProcessManager SystemArchitecture.swift
Build complete! (15.37s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftProcessManager",
  "name" : "SwiftProcessManager",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "SwiftProcessManager",
      "targets" : [
        "SwiftProcessManager"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftProcessManagerTests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftProcessManagerTests",
      "path" : "Tests/SwiftProcessManagerTests",
      "sources" : [
        "SwiftProcessManagerTests.swift"
      ],
      "target_dependencies" : [
        "SwiftProcessManager"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftProcessManager",
      "module_type" : "SwiftTarget",
      "name" : "SwiftProcessManager",
      "path" : "Sources/SwiftProcessManager",
      "product_memberships" : [
        "SwiftProcessManager"
      ],
      "sources" : [
        "ExitAppIfAlreadyOpen.swift",
        "Port.swift",
        "ProcessManager.swift",
        "SystemArchitecture.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.8"
}
Done.