The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Successful build of Inject, reference main (5dbaba), with Swift 6.1 for macOS (SPM) on 8 May 2025 15:58:23 UTC.

Swift 6 data race errors: 6

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64

Build Log

========================================
RunAll
========================================
Builder version: 4.61.3
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/krzysztofzablocki/Inject.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/krzysztofzablocki/Inject
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 5dbaba2 Merge pull request #114 from johnno1962/main
Cloned https://github.com/krzysztofzablocki/Inject.git
Revision (git rev-parse @):
5dbaba26118ddc4d057ee13e3b264a2e6e64885d
SUCCESS checkout https://github.com/krzysztofzablocki/Inject.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": "inject",
      "name": "Inject",
      "url": "https://github.com/krzysztofzablocki/Inject.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Inject",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/krzysztofzablocki/Inject.git
[1/495] Fetching inject
Fetched https://github.com/krzysztofzablocki/Inject.git from cache (0.75s)
Creating working copy for https://github.com/krzysztofzablocki/Inject.git
Working copy of https://github.com/krzysztofzablocki/Inject.git resolved at main (5dbaba2)
warning: '.resolve-product-dependencies': dependency 'inject' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/krzysztofzablocki/Inject.git
https://github.com/krzysztofzablocki/Inject.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Inject",
  "name" : "Inject",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "Inject",
      "targets" : [
        "Inject"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "Inject",
      "module_type" : "SwiftTarget",
      "name" : "Inject",
      "path" : "Sources/Inject",
      "product_memberships" : [
        "Inject"
      ],
      "sources" : [
        "InjectConfiguration.swift",
        "Integrations/Hosts.swift",
        "Integrations/KitFrameworks.swift",
        "Integrations/SwiftUI.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.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-2F0A5646E1D333AE.txt
[3/7] Compiling Inject KitFrameworks.swift
[4/7] Compiling Inject Hosts.swift
/Users/admin/builder/spi-builder-workspace/Sources/Inject/Integrations/Hosts.swift:187:16: warning: call to main actor-isolated initializer 'init(_:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 37 |     public var onInjectionHook: ((Hosted) -> Void)?
 38 |
 39 |     public init(_ constructor: @autoclosure @escaping () -> Hosted) {
    |            |- note: calls to initializer 'init(_:)' from outside of its actor context are implicitly asynchronous
    |            `- note: main actor isolation inferred from inheritance from class 'NSViewController'
 40 |         instance = constructor()
 41 |         self.constructor = constructor
    :
184 |
185 | extension InjectConfiguration {
186 |     public static func ViewControllerHost<Hosted: InjectViewControllerType>(_ viewController: Hosted) -> ViewControllerHost<Hosted> {
    |                        `- note: add '@MainActor' to make static method 'ViewControllerHost' part of global actor 'MainActor'
187 |         Inject.ViewControllerHost(viewController)
    |                `- warning: call to main actor-isolated initializer 'init(_:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
188 |     }
189 |     public static func ViewHost<Hosted: InjectViewType>(_ view: Hosted) -> ViewHost<Hosted> {
/Users/admin/builder/spi-builder-workspace/Sources/Inject/Integrations/Hosts.swift:190:16: warning: call to main actor-isolated initializer 'init(_:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
135 |     let constructor: () -> Hosted
136 |
137 |     public init(_ constructor: @autoclosure @escaping () -> Hosted) {
    |            |- note: calls to initializer 'init(_:)' from outside of its actor context are implicitly asynchronous
    |            `- note: main actor isolation inferred from inheritance from class 'NSView'
138 |         instance = constructor()
139 |         self.constructor = constructor
    :
187 |         Inject.ViewControllerHost(viewController)
188 |     }
189 |     public static func ViewHost<Hosted: InjectViewType>(_ view: Hosted) -> ViewHost<Hosted> {
    |                        `- note: add '@MainActor' to make static method 'ViewHost' part of global actor 'MainActor'
190 |         Inject.ViewHost(view)
    |                `- warning: call to main actor-isolated initializer 'init(_:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
191 |     }
192 | }
[5/7] Compiling Inject SwiftUI.swift
/Users/admin/builder/spi-builder-workspace/Sources/Inject/Integrations/SwiftUI.swift:28:32: error: return from initializer without initializing all stored properties
26 | public struct ObserveInjection: DynamicProperty {
27 |     @ObservedObject private var iO = InjectConfiguration.observer
28 |     public nonisolated init() {}
   |                                |- error: return from initializer without initializing all stored properties
   |                                `- note: main actor-isolated default value of 'self.iO' cannot be used in a nonisolated initalizer
29 |     // Use a computed property rather than directly storing the value to work around https://github.com/swiftlang/swift/issues/62003
30 |     public var wrappedValue: InjectConfiguration.Type { InjectConfiguration.self }
[6/7] Compiling Inject InjectConfiguration.swift
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:17:23: warning: static property 'bundlePath' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 15 | /// Public namespace for using Inject API
 16 | public enum InjectConfiguration {
 17 |     public static var bundlePath = "/Applications/InjectionIII.app/Contents/Resources/"
    |                       |- warning: static property 'bundlePath' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'bundlePath' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'bundlePath' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 18 |     @available(iOS 13.0, *)
 19 |     public static let observer = injectionObserver
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:19:23: warning: static property 'observer' is not concurrency-safe because non-'Sendable' type 'InjectionObserver' may have shared mutable state; this is an error in the Swift 6 language mode
 17 |     public static var bundlePath = "/Applications/InjectionIII.app/Contents/Resources/"
 18 |     @available(iOS 13.0, *)
 19 |     public static let observer = injectionObserver
    |                       |- warning: static property 'observer' is not concurrency-safe because non-'Sendable' type 'InjectionObserver' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'observer' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 20 |     public static let load: Void = loadInjectionImplementation
 21 |     @available(iOS 13.0, *)
    :
 72 |
 73 | @available(iOS 13.0, *)
 74 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 75 |     @Published public private(set) var injectionNumber = 0
 76 |     private var cancellable: AnyCancellable?
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:22:23: warning: static property 'animation' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 20 |     public static let load: Void = loadInjectionImplementation
 21 |     @available(iOS 13.0, *)
 22 |     public static var animation: SwiftUI.Animation?
    |                       |- warning: static property 'animation' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'animation' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'animation' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 23 | }
 24 |
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:34:13: warning: var 'loadInjectionImplementation' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 32 |
 33 | #if DEBUG
 34 | private var loadInjectionImplementation: Void = {
    |             |- warning: var 'loadInjectionImplementation' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'loadInjectionImplementation' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: add '@MainActor' to make var 'loadInjectionImplementation' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 35 |     guard objc_getClass("InjectionClient") == nil else { return }
 36 |     // If project has a "Build Phase" running this script, Inject should
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:94:13: warning: let 'injectionObserver' is not concurrency-safe because non-'Sendable' type 'InjectionObserver' may have shared mutable state; this is an error in the Swift 6 language mode
 72 |
 73 | @available(iOS 13.0, *)
 74 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 75 |     @Published public private(set) var injectionNumber = 0
 76 |     private var cancellable: AnyCancellable?
    :
 92 |
 93 | @available(iOS 13.0, *)
 94 | private let injectionObserver = InjectionObserver()
    |             |- warning: let 'injectionObserver' is not concurrency-safe because non-'Sendable' type 'InjectionObserver' may have shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: add '@MainActor' to make let 'injectionObserver' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 95 | @available(iOS 13.0, *)
 96 | private var injectionObservationKey = arc4random()
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:96:13: warning: var 'injectionObservationKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 94 | private let injectionObserver = InjectionObserver()
 95 | @available(iOS 13.0, *)
 96 | private var injectionObservationKey = arc4random()
    |             |- warning: var 'injectionObservationKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'injectionObservationKey' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: add '@MainActor' to make var 'injectionObservationKey' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 97 |
 98 | public extension InjectListener where Self: NSObject {
[7/7] Emitting module Inject
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:17:23: warning: static property 'bundlePath' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 15 | /// Public namespace for using Inject API
 16 | public enum InjectConfiguration {
 17 |     public static var bundlePath = "/Applications/InjectionIII.app/Contents/Resources/"
    |                       |- warning: static property 'bundlePath' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'bundlePath' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'bundlePath' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 18 |     @available(iOS 13.0, *)
 19 |     public static let observer = injectionObserver
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:19:23: warning: static property 'observer' is not concurrency-safe because non-'Sendable' type 'InjectionObserver' may have shared mutable state; this is an error in the Swift 6 language mode
 17 |     public static var bundlePath = "/Applications/InjectionIII.app/Contents/Resources/"
 18 |     @available(iOS 13.0, *)
 19 |     public static let observer = injectionObserver
    |                       |- warning: static property 'observer' is not concurrency-safe because non-'Sendable' type 'InjectionObserver' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'observer' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 20 |     public static let load: Void = loadInjectionImplementation
 21 |     @available(iOS 13.0, *)
    :
 72 |
 73 | @available(iOS 13.0, *)
 74 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 75 |     @Published public private(set) var injectionNumber = 0
 76 |     private var cancellable: AnyCancellable?
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:22:23: warning: static property 'animation' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 20 |     public static let load: Void = loadInjectionImplementation
 21 |     @available(iOS 13.0, *)
 22 |     public static var animation: SwiftUI.Animation?
    |                       |- warning: static property 'animation' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'animation' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'animation' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 23 | }
 24 |
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:34:13: warning: var 'loadInjectionImplementation' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 32 |
 33 | #if DEBUG
 34 | private var loadInjectionImplementation: Void = {
    |             |- warning: var 'loadInjectionImplementation' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'loadInjectionImplementation' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: add '@MainActor' to make var 'loadInjectionImplementation' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 35 |     guard objc_getClass("InjectionClient") == nil else { return }
 36 |     // If project has a "Build Phase" running this script, Inject should
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:94:13: warning: let 'injectionObserver' is not concurrency-safe because non-'Sendable' type 'InjectionObserver' may have shared mutable state; this is an error in the Swift 6 language mode
 72 |
 73 | @available(iOS 13.0, *)
 74 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 75 |     @Published public private(set) var injectionNumber = 0
 76 |     private var cancellable: AnyCancellable?
    :
 92 |
 93 | @available(iOS 13.0, *)
 94 | private let injectionObserver = InjectionObserver()
    |             |- warning: let 'injectionObserver' is not concurrency-safe because non-'Sendable' type 'InjectionObserver' may have shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: add '@MainActor' to make let 'injectionObserver' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 95 | @available(iOS 13.0, *)
 96 | private var injectionObservationKey = arc4random()
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:96:13: warning: var 'injectionObservationKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 94 | private let injectionObserver = InjectionObserver()
 95 | @available(iOS 13.0, *)
 96 | private var injectionObservationKey = arc4random()
    |             |- warning: var 'injectionObservationKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'injectionObservationKey' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: add '@MainActor' to make var 'injectionObservationKey' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 97 |
 98 | public extension InjectListener where Self: NSObject {
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-2F0A5646E1D333AE.txt
[2/6] Compiling Inject KitFrameworks.swift
[3/6] Compiling Inject SwiftUI.swift
[4/6] Compiling Inject Hosts.swift
[5/6] Emitting module Inject
[6/6] Compiling Inject InjectConfiguration.swift
Build complete! (0.64s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Inject",
  "name" : "Inject",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "Inject",
      "targets" : [
        "Inject"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "Inject",
      "module_type" : "SwiftTarget",
      "name" : "Inject",
      "path" : "Sources/Inject",
      "product_memberships" : [
        "Inject"
      ],
      "sources" : [
        "InjectConfiguration.swift",
        "Integrations/Hosts.swift",
        "Integrations/KitFrameworks.swift",
        "Integrations/SwiftUI.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Done.