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 InterposeKit, reference master (2d4822), with Swift 6.0 for macOS (SPM) on 31 Oct 2024 13:05:54 UTC.

Swift 6 data race errors: 9

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/steipete/InterposeKit.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/steipete/InterposeKit
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 2d48227 Update pod spec to latest tag (#24)
Cloned https://github.com/steipete/InterposeKit.git
Revision (git rev-parse @):
2d48227c359b71be057fe9fd403ff791e5322b32
SUCCESS checkout https://github.com/steipete/InterposeKit.git at master
========================================
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": "interposekit",
      "name": "InterposeKit",
      "url": "https://github.com/steipete/InterposeKit.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/InterposeKit",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/steipete/InterposeKit.git
[1/2212] Fetching interposekit
Fetched https://github.com/steipete/InterposeKit.git from cache (1.39s)
Creating working copy for https://github.com/steipete/InterposeKit.git
Working copy of https://github.com/steipete/InterposeKit.git resolved at master (2d48227)
warning: '.resolve-product-dependencies': dependency 'interposekit' 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/steipete/InterposeKit.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
[1/3] Write swift-version--7754E27361AE5C74.txt
[2/3] Compiling ITKSuperBuilder.m
[4/13] Compiling InterposeKit ObjectHook.swift
[5/13] Compiling InterposeKit ClassHook.swift
[6/13] Compiling InterposeKit LinuxCompileSupport.swift
[7/13] Compiling InterposeKit InterposeSubclass.swift
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeSubclass.swift:14:20: warning: static property 'getClass' is not concurrency-safe because non-'Sendable' type 'UnsafePointer<CChar>' (aka 'UnsafePointer<Int8>') may have shared mutable state; this is an error in the Swift 6 language mode
 12 |
 13 |     enum ObjCMethodEncoding {
 14 |         static let getClass = extract("#@:")
    |                    |- warning: static property 'getClass' is not concurrency-safe because non-'Sendable' type 'UnsafePointer<CChar>' (aka 'UnsafePointer<Int8>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                    |- note: annotate 'getClass' 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
 15 |
 16 |         private static func extract(_ string: StaticString) -> UnsafePointer<CChar> {
Swift.UnsafePointer:1:23: note: generic struct 'UnsafePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafePointer<Pointee> : Copyable where Pointee : ~Copyable {
  |                       `- note: generic struct 'UnsafePointer' does not conform to the 'Sendable' protocol
2 |     public let _rawValue: Builtin.RawPointer
3 |     public init(_ _rawValue: Builtin.RawPointer)
[8/13] Compiling InterposeKit InterposeError.swift
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeError.swift:13:10: warning: associated value 'unexpectedImplementation' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type '(AnyClass, Selector, IMP?)' (aka '(any AnyObject.Type, Selector, Optional<OpaquePointer>)'); this is an error in the Swift 6 language mode
11 |     /// Someone else changed the implementation; reverting removed this implementation.
12 |     /// This is bad, likely someone else also hooked this method. If you are in such a codebase, do not use revert.
13 |     case unexpectedImplementation(AnyClass, Selector, IMP?)
   |          `- warning: associated value 'unexpectedImplementation' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type '(AnyClass, Selector, IMP?)' (aka '(any AnyObject.Type, Selector, Optional<OpaquePointer>)'); this is an error in the Swift 6 language mode
14 |
15 |     /// Unable to register subclass for object-based interposing.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeError.swift:24:10: warning: associated value 'keyValueObservationDetected' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyObject'; this is an error in the Swift 6 language mode
22 |     /// The KVO mechanism also uses subclasses created at runtime but doesn't check for additional overrides.
23 |     /// Adding a hook eventually crashes the KVO management code so we reject hooking altogether in this case.
24 |     case keyValueObservationDetected(AnyObject)
   |          `- warning: associated value 'keyValueObservationDetected' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyObject'; this is an error in the Swift 6 language mode
25 |
26 |     /// Object is lying about it's actual class metadata.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeError.swift:32:10: warning: associated value 'objectPosingAsDifferentClass(_:actualClass:)' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyObject'; this is an error in the Swift 6 language mode
30 |     /// @note Printing classes in Swift uses the class posing mechanism.
31 |     /// Use `NSClassFromString` to get the correct name.
32 |     case objectPosingAsDifferentClass(AnyObject, actualClass: AnyClass)
   |          `- warning: associated value 'objectPosingAsDifferentClass(_:actualClass:)' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyObject'; this is an error in the Swift 6 language mode
33 |
34 |     /// Can't revert or apply if already done so.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeError.swift:35:10: warning: associated value 'invalidState(expectedState:)' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyHook.State'; this is an error in the Swift 6 language mode
33 |
34 |     /// Can't revert or apply if already done so.
35 |     case invalidState(expectedState: AnyHook.State)
   |          `- warning: associated value 'invalidState(expectedState:)' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyHook.State'; this is an error in the Swift 6 language mode
36 |
37 |     /// Unable to remove hook.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/AnyHook.swift:21:17: note: consider making enum 'State' conform to the 'Sendable' protocol
 19 |
 20 |     /// The possible task states
 21 |     public enum State: Equatable {
    |                 `- note: consider making enum 'State' conform to the 'Sendable' protocol
 22 |         /// The task is prepared to be nterposed.
 23 |         case prepared
[9/13] Compiling InterposeKit HookFinder.swift
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/HookFinder.swift:6:20: warning: static property 'hookForBlock' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 4 |
 5 |     private struct AssociatedKeys {
 6 |         static var hookForBlock: UInt8 = 0
   |                    |- warning: static property 'hookForBlock' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                    |- note: convert 'hookForBlock' to a 'let' constant to make 'Sendable' shared state immutable
   |                    |- note: annotate 'hookForBlock' 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
 7 |     }
 8 |
[10/13] Compiling InterposeKit Watcher.swift
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/Watcher.swift:72:24: warning: static property 'globalWatchers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 70 | private struct InterposeWatcher {
 71 |     // Global list of waiters; can be multiple per class
 72 |     private static var globalWatchers: [Interpose.Waiter] = {
    |                        |- warning: static property 'globalWatchers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'globalWatchers' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'globalWatchers' 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
 73 |         // Register after Swift global registers to not deadlock
 74 |         DispatchQueue.main.async { InterposeWatcher.installGlobalImageLoadWatcher() }
[11/13] Compiling InterposeKit InterposeKit.swift
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeKit.swift:168:23: warning: static property 'isLoggingEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
166 | extension Interpose {
167 |     /// Logging uses print and is minimal.
168 |     public static var isLoggingEnabled = false
    |                       |- warning: static property 'isLoggingEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'isLoggingEnabled' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'isLoggingEnabled' 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
169 |
170 |     /// Simple log wrapper for print.
[12/13] Compiling InterposeKit AnyHook.swift
[13/13] Emitting module InterposeKit
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/HookFinder.swift:6:20: warning: static property 'hookForBlock' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 4 |
 5 |     private struct AssociatedKeys {
 6 |         static var hookForBlock: UInt8 = 0
   |                    |- warning: static property 'hookForBlock' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                    |- note: convert 'hookForBlock' to a 'let' constant to make 'Sendable' shared state immutable
   |                    |- note: annotate 'hookForBlock' 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
 7 |     }
 8 |
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeError.swift:13:10: warning: associated value 'unexpectedImplementation' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type '(AnyClass, Selector, IMP?)' (aka '(any AnyObject.Type, Selector, Optional<OpaquePointer>)'); this is an error in the Swift 6 language mode
11 |     /// Someone else changed the implementation; reverting removed this implementation.
12 |     /// This is bad, likely someone else also hooked this method. If you are in such a codebase, do not use revert.
13 |     case unexpectedImplementation(AnyClass, Selector, IMP?)
   |          `- warning: associated value 'unexpectedImplementation' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type '(AnyClass, Selector, IMP?)' (aka '(any AnyObject.Type, Selector, Optional<OpaquePointer>)'); this is an error in the Swift 6 language mode
14 |
15 |     /// Unable to register subclass for object-based interposing.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeError.swift:24:10: warning: associated value 'keyValueObservationDetected' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyObject'; this is an error in the Swift 6 language mode
22 |     /// The KVO mechanism also uses subclasses created at runtime but doesn't check for additional overrides.
23 |     /// Adding a hook eventually crashes the KVO management code so we reject hooking altogether in this case.
24 |     case keyValueObservationDetected(AnyObject)
   |          `- warning: associated value 'keyValueObservationDetected' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyObject'; this is an error in the Swift 6 language mode
25 |
26 |     /// Object is lying about it's actual class metadata.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeError.swift:32:10: warning: associated value 'objectPosingAsDifferentClass(_:actualClass:)' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyObject'; this is an error in the Swift 6 language mode
30 |     /// @note Printing classes in Swift uses the class posing mechanism.
31 |     /// Use `NSClassFromString` to get the correct name.
32 |     case objectPosingAsDifferentClass(AnyObject, actualClass: AnyClass)
   |          `- warning: associated value 'objectPosingAsDifferentClass(_:actualClass:)' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyObject'; this is an error in the Swift 6 language mode
33 |
34 |     /// Can't revert or apply if already done so.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeError.swift:35:10: warning: associated value 'invalidState(expectedState:)' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyHook.State'; this is an error in the Swift 6 language mode
33 |
34 |     /// Can't revert or apply if already done so.
35 |     case invalidState(expectedState: AnyHook.State)
   |          `- warning: associated value 'invalidState(expectedState:)' of 'Sendable'-conforming enum 'InterposeError' has non-sendable type 'AnyHook.State'; this is an error in the Swift 6 language mode
36 |
37 |     /// Unable to remove hook.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/AnyHook.swift:21:17: note: consider making enum 'State' conform to the 'Sendable' protocol
 19 |
 20 |     /// The possible task states
 21 |     public enum State: Equatable {
    |                 `- note: consider making enum 'State' conform to the 'Sendable' protocol
 22 |         /// The task is prepared to be nterposed.
 23 |         case prepared
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeKit.swift:168:23: warning: static property 'isLoggingEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
166 | extension Interpose {
167 |     /// Logging uses print and is minimal.
168 |     public static var isLoggingEnabled = false
    |                       |- warning: static property 'isLoggingEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'isLoggingEnabled' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'isLoggingEnabled' 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
169 |
170 |     /// Simple log wrapper for print.
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/InterposeSubclass.swift:14:20: warning: static property 'getClass' is not concurrency-safe because non-'Sendable' type 'UnsafePointer<CChar>' (aka 'UnsafePointer<Int8>') may have shared mutable state; this is an error in the Swift 6 language mode
 12 |
 13 |     enum ObjCMethodEncoding {
 14 |         static let getClass = extract("#@:")
    |                    |- warning: static property 'getClass' is not concurrency-safe because non-'Sendable' type 'UnsafePointer<CChar>' (aka 'UnsafePointer<Int8>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                    |- note: annotate 'getClass' 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
 15 |
 16 |         private static func extract(_ string: StaticString) -> UnsafePointer<CChar> {
Swift.UnsafePointer:1:23: note: generic struct 'UnsafePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafePointer<Pointee> : Copyable where Pointee : ~Copyable {
  |                       `- note: generic struct 'UnsafePointer' does not conform to the 'Sendable' protocol
2 |     public let _rawValue: Builtin.RawPointer
3 |     public init(_ _rawValue: Builtin.RawPointer)
/Users/admin/builder/spi-builder-workspace/Sources/InterposeKit/Watcher.swift:72:24: warning: static property 'globalWatchers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 70 | private struct InterposeWatcher {
 71 |     // Global list of waiters; can be multiple per class
 72 |     private static var globalWatchers: [Interpose.Waiter] = {
    |                        |- warning: static property 'globalWatchers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'globalWatchers' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'globalWatchers' 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
 73 |         // Register after Swift global registers to not deadlock
 74 |         DispatchQueue.main.async { InterposeWatcher.installGlobalImageLoadWatcher() }
Build complete! (13.73s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "InterposeKit",
  "name" : "InterposeKit",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "macos",
      "version" : "10.13"
    },
    {
      "name" : "tvos",
      "version" : "11.0"
    },
    {
      "name" : "watchos",
      "version" : "5.0"
    }
  ],
  "products" : [
    {
      "name" : "InterposeKit",
      "targets" : [
        "InterposeKit"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SuperBuilder",
      "module_type" : "ClangTarget",
      "name" : "SuperBuilder",
      "path" : "Sources/SuperBuilder",
      "product_memberships" : [
        "InterposeKit"
      ],
      "sources" : [
        "src/ITKSuperBuilder.m"
      ],
      "type" : "library"
    },
    {
      "c99name" : "InterposeKitTests",
      "module_type" : "SwiftTarget",
      "name" : "InterposeKitTests",
      "path" : "Tests/InterposeKitTests",
      "sources" : [
        "InterposeKitTestCase.swift",
        "InterposeKitTests.swift",
        "KVOTests.swift",
        "MultipleInterposing.swift",
        "ObjectInterposeTests.swift",
        "TestClass.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "InterposeKit"
      ],
      "type" : "test"
    },
    {
      "c99name" : "InterposeKit",
      "module_type" : "SwiftTarget",
      "name" : "InterposeKit",
      "path" : "Sources/InterposeKit",
      "product_memberships" : [
        "InterposeKit"
      ],
      "sources" : [
        "AnyHook.swift",
        "ClassHook.swift",
        "HookFinder.swift",
        "InterposeError.swift",
        "InterposeKit.swift",
        "InterposeSubclass.swift",
        "LinuxCompileSupport.swift",
        "ObjectHook.swift",
        "Watcher.swift"
      ],
      "target_dependencies" : [
        "SuperBuilder"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.