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 Chip8iEmulationCore, reference main (4676f5), with Swift 6.0 for macOS (SPM) on 29 Sep 2024 21:24:33 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.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.54.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/danijelLoc/Chip8iEmulationCore.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/danijelLoc/Chip8iEmulationCore
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 4676f5b Fixed data access thread race problem (#8)
Cloned https://github.com/danijelLoc/Chip8iEmulationCore.git
Revision (git rev-parse @):
4676f5b4b495cd8b4e443872e445ba539c463694
SUCCESS checkout https://github.com/danijelLoc/Chip8iEmulationCore.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/danijelLoc/Chip8iEmulationCore.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.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--4A847ED0836F2485.txt
[3/12] Compiling Chip8iEmulationCore Chip8SystemState.swift
[4/12] Compiling Chip8iEmulationCore Chip8System.swift
[5/12] Compiling Chip8iEmulationCore EmulationControls.swift
/Users/admin/builder/spi-builder-workspace/Sources/Chip8iEmulationCore/Utils/EmulationControls.swift:56:23: warning: static property 'Chip8KeysQWERTZKeyboardBindingExample' is not concurrency-safe because non-'Sendable' type 'Dictionary<Character, EmulationControls.Chip8Key>' may have shared mutable state; this is an error in the Swift 6 language mode
19 |     /// A 0 B F
20 |     /// ```
21 |     public enum Chip8Key: UByte {
   |                 `- note: consider making enum 'Chip8Key' conform to the 'Sendable' protocol
22 |         case Zero = 0x0
23 |         case One  = 0x1
   :
54 |     /// y x c v
55 |     /// ```
56 |     public static let Chip8KeysQWERTZKeyboardBindingExample: Dictionary<Character, Chip8Key> = [
   |                       |- warning: static property 'Chip8KeysQWERTZKeyboardBindingExample' is not concurrency-safe because non-'Sendable' type 'Dictionary<Character, EmulationControls.Chip8Key>' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'Chip8KeysQWERTZKeyboardBindingExample' 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
57 |         "1": .One,   "2": .Two,   "3": .Three, "4": .C,
58 |         "q": .Four,  "w": .Five,  "e": .Six,   "r": .D,
[6/12] Compiling Chip8iEmulationCore ExtensionsAndConstants.swift
[7/12] Compiling Chip8iEmulationCore EmulationLogger.swift
[8/12] Compiling Chip8iEmulationCore Chip8OperationParser.swift
[9/12] Compiling Chip8iEmulationCore Chip8Operation.swift
[10/12] Compiling Chip8iEmulationCore Chip8EmulationCore.swift
/Users/admin/builder/spi-builder-workspace/Sources/Chip8iEmulationCore/Chip8EmulationCore.swift:189:13: warning: capture of 'self' with non-sendable type 'Chip8EmulationCore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 53 |
 54 | /// Emulation Core that should be used for starting emulation, sending inputs and subscribing to its screen and sound output. It also includes optional debug output info for advanced users. This is a ViewModel that creates execution loop and communicates with internal Chip8 program operations processing modules.
 55 | public class Chip8EmulationCore: ObservableObject, Chip8EmulationCoreProtocol {
    |              `- note: class 'Chip8EmulationCore' does not conform to the 'Sendable' protocol
 56 |     /// Internal Chip8 System/CPU that executes the commands
 57 |     private var system: Chip8System
    :
187 |     private func publishInfo(error: Error? = nil) async {
188 |         await MainActor.run {
189 |             outputScreen = system.state.Output
    |             `- warning: capture of 'self' with non-sendable type 'Chip8EmulationCore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
190 |             outputSoundTimer = system.state.soundTimer
191 |
/Users/admin/builder/spi-builder-workspace/Sources/Chip8iEmulationCore/Chip8EmulationCore.swift:199:13: warning: capture of 'self' with non-sendable type 'Chip8EmulationCore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 53 |
 54 | /// Emulation Core that should be used for starting emulation, sending inputs and subscribing to its screen and sound output. It also includes optional debug output info for advanced users. This is a ViewModel that creates execution loop and communicates with internal Chip8 program operations processing modules.
 55 | public class Chip8EmulationCore: ObservableObject, Chip8EmulationCoreProtocol {
    |              `- note: class 'Chip8EmulationCore' does not conform to the 'Sendable' protocol
 56 |     /// Internal Chip8 System/CPU that executes the commands
 57 |     private var system: Chip8System
    :
197 |     private func resetPublishers() async {
198 |         await MainActor.run {
199 |             outputScreen = Array(repeating: false, count: 64*32)
    |             `- warning: capture of 'self' with non-sendable type 'Chip8EmulationCore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
200 |             outputSoundTimer = 0
201 |             debugSystemStateInfo = nil
/Users/admin/builder/spi-builder-workspace/Sources/Chip8iEmulationCore/Chip8EmulationCore.swift:199:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
197 |     private func resetPublishers() async {
198 |         await MainActor.run {
199 |             outputScreen = Array(repeating: false, count: 64*32)
    |             |- 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
200 |             outputSoundTimer = 0
201 |             debugSystemStateInfo = nil
/Users/admin/builder/spi-builder-workspace/Sources/Chip8iEmulationCore/Chip8EmulationCore.swift:189:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
187 |     private func publishInfo(error: Error? = nil) async {
188 |         await MainActor.run {
189 |             outputScreen = system.state.Output
    |             |- 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
190 |             outputSoundTimer = system.state.soundTimer
191 |
/Users/admin/builder/spi-builder-workspace/Sources/Chip8iEmulationCore/Chip8EmulationCore.swift:106:29: warning: task-isolated value of type '() async throws -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
104 |
105 |             system.loadProgram(program.contentROM)
106 |             emulationTask = Task { try await emulationLoop(program: program) }
    |                             `- warning: task-isolated value of type '() async throws -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
107 |
108 |             try await emulationTask?.value
[11/12] Emitting module Chip8iEmulationCore
/Users/admin/builder/spi-builder-workspace/Sources/Chip8iEmulationCore/Utils/EmulationControls.swift:56:23: warning: static property 'Chip8KeysQWERTZKeyboardBindingExample' is not concurrency-safe because non-'Sendable' type 'Dictionary<Character, EmulationControls.Chip8Key>' may have shared mutable state; this is an error in the Swift 6 language mode
19 |     /// A 0 B F
20 |     /// ```
21 |     public enum Chip8Key: UByte {
   |                 `- note: consider making enum 'Chip8Key' conform to the 'Sendable' protocol
22 |         case Zero = 0x0
23 |         case One  = 0x1
   :
54 |     /// y x c v
55 |     /// ```
56 |     public static let Chip8KeysQWERTZKeyboardBindingExample: Dictionary<Character, Chip8Key> = [
   |                       |- warning: static property 'Chip8KeysQWERTZKeyboardBindingExample' is not concurrency-safe because non-'Sendable' type 'Dictionary<Character, EmulationControls.Chip8Key>' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'Chip8KeysQWERTZKeyboardBindingExample' 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
57 |         "1": .One,   "2": .Two,   "3": .Three, "4": .C,
58 |         "q": .Four,  "w": .Five,  "e": .Six,   "r": .D,
[12/12] Compiling Chip8iEmulationCore Chip8Program.swift
Build complete! (14.22s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Chip8iEmulationCore",
  "name" : "Chip8iEmulationCore",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "macos",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "Chip8iEmulationCore",
      "targets" : [
        "Chip8iEmulationCore"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "Chip8iEmulationCoreTests",
      "module_type" : "SwiftTarget",
      "name" : "Chip8iEmulationCoreTests",
      "path" : "Tests/Chip8iEmulationCoreTests",
      "sources" : [
        "Chip8EmuCoreTests.swift",
        "Chip8OperationParserTests.swift",
        "Chip8SystemTests.swift"
      ],
      "target_dependencies" : [
        "Chip8iEmulationCore"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Chip8iEmulationCore",
      "module_type" : "SwiftTarget",
      "name" : "Chip8iEmulationCore",
      "path" : "Sources/Chip8iEmulationCore",
      "product_memberships" : [
        "Chip8iEmulationCore"
      ],
      "sources" : [
        "Chip8EmulationCore.swift",
        "Chip8Operation/Chip8Operation.swift",
        "Chip8Operation/Chip8OperationParser.swift",
        "Chip8Program.swift",
        "Chip8System.swift",
        "Chip8SystemState.swift",
        "EmulationLogger.swift",
        "Utils/EmulationControls.swift",
        "Utils/ExtensionsAndConstants.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.