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 Inject, reference main (9cf762), with Swift 6.0 for macOS (SPM) on 5 Nov 2024 09:15:38 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

Build Log

========================================
RunAll
========================================
Builder version: 4.56.0
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 9cf7622 Merge pull request #99 from AgapovOne/patch-1
Cloned https://github.com/krzysztofzablocki/Inject.git
Revision (git rev-parse @):
9cf76225b7f15d4a48142a1496099538805330bb
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/475] Fetching inject
Fetched https://github.com/krzysztofzablocki/Inject.git from cache (0.84s)
Creating working copy for https://github.com/krzysztofzablocki/Inject.git
Working copy of https://github.com/krzysztofzablocki/Inject.git resolved at main (9cf7622)
warning: '.resolve-product-dependencies': dependency 'inject' 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/krzysztofzablocki/Inject.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/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/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: annotate 'bundlePath' 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
 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: annotate 'observer' 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
 20 |     public static let load: Void = loadInjectionImplementation
 21 |     @available(iOS 13.0, *)
    :
 69 |
 70 | @available(iOS 13.0, *)
 71 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 72 |     @Published public private(set) var injectionNumber = 0
 73 |     private var cancellable: AnyCancellable?
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:90: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
 69 |
 70 | @available(iOS 13.0, *)
 71 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 72 |     @Published public private(set) var injectionNumber = 0
 73 |     private var cancellable: AnyCancellable?
    :
 88 |
 89 | @available(iOS 13.0, *)
 90 | 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: annotate 'injectionObserver' 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
 91 | @available(iOS 13.0, *)
 92 | private var injectionObservationKey = arc4random()
/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: annotate 'loadInjectionImplementation' 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
 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: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: annotate 'animation' 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
 23 | }
 24 |
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:92: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
 90 | private let injectionObserver = InjectionObserver()
 91 | @available(iOS 13.0, *)
 92 | 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: annotate 'injectionObservationKey' 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
 93 |
 94 | public extension InjectListener where Self: NSObject {
[4/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: annotate 'bundlePath' 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
 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: annotate 'observer' 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
 20 |     public static let load: Void = loadInjectionImplementation
 21 |     @available(iOS 13.0, *)
    :
 69 |
 70 | @available(iOS 13.0, *)
 71 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 72 |     @Published public private(set) var injectionNumber = 0
 73 |     private var cancellable: AnyCancellable?
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:90: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
 69 |
 70 | @available(iOS 13.0, *)
 71 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 72 |     @Published public private(set) var injectionNumber = 0
 73 |     private var cancellable: AnyCancellable?
    :
 88 |
 89 | @available(iOS 13.0, *)
 90 | 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: annotate 'injectionObserver' 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
 91 | @available(iOS 13.0, *)
 92 | private var injectionObservationKey = arc4random()
/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: annotate 'loadInjectionImplementation' 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
 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: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: annotate 'animation' 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
 23 | }
 24 |
/Users/admin/builder/spi-builder-workspace/Sources/Inject/InjectConfiguration.swift:92: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
 90 | private let injectionObserver = InjectionObserver()
 91 | @available(iOS 13.0, *)
 92 | 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: annotate 'injectionObservationKey' 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
 93 |
 94 | public extension InjectListener where Self: NSObject {
[5/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
 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
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 | }
[6/7] Compiling Inject KitFrameworks.swift
[7/7] Compiling Inject SwiftUI.swift
/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: annotate 'observer' 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
 20 |     public static let load: Void = loadInjectionImplementation
 21 |     @available(iOS 13.0, *)
    :
 69 |
 70 | @available(iOS 13.0, *)
 71 | public class InjectionObserver: ObservableObject {
    |              `- note: class 'InjectionObserver' does not conform to the 'Sendable' protocol
 72 |     @Published public private(set) var injectionNumber = 0
 73 |     private var cancellable: AnyCancellable?
/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: 'self.iO' not initialized
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 }
BUILD FAILURE 6.0 macosSpm