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 Dip, reference develop (7ec008), with Swift 6.0 for macOS (SPM) on 31 Oct 2024 11:05:01 UTC.

Swift 6 data race errors: 8

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/AliSoftware/Dip.git
Reference: develop
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/AliSoftware/Dip
 * branch            develop    -> FETCH_HEAD
 * [new branch]      develop    -> origin/develop
HEAD is now at 7ec008a Merge pull request #237 from michalsrutek/develop
Cloned https://github.com/AliSoftware/Dip.git
Revision (git rev-parse @):
7ec008a5c09520b67f07669ad5a753d757f05bbe
SUCCESS checkout https://github.com/AliSoftware/Dip.git at develop
========================================
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": "dip",
      "name": "Dip",
      "url": "https://github.com/AliSoftware/Dip.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Dip",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/AliSoftware/Dip.git
[1/4684] Fetching dip
Fetched https://github.com/AliSoftware/Dip.git from cache (1.09s)
Creating working copy for https://github.com/AliSoftware/Dip.git
Working copy of https://github.com/AliSoftware/Dip.git resolved at develop (7ec008a)
warning: '.resolve-product-dependencies': dependency 'dip' 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/AliSoftware/Dip.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/15] Compiling Dip TypeForwarding.swift
[4/16] Compiling Dip Resolve.swift
[5/16] Compiling Dip Utils.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils.swift:31:12: warning: var 'logLevel' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 29 | }
 30 |
 31 | public var logLevel: LogLevel = .Errors
    |            |- warning: var 'logLevel' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: convert 'logLevel' to a 'let' constant to make 'Sendable' shared state immutable
    |            |- note: annotate 'logLevel' 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
 32 |
 33 | public var logger: (LogLevel, Any) -> Void = { print($1) }
/Users/admin/builder/spi-builder-workspace/Sources/Utils.swift:33:12: warning: var 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 31 | public var logLevel: LogLevel = .Errors
 32 |
 33 | public var logger: (LogLevel, Any) -> Void = { print($1) }
    |            |- warning: var 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
    |            |- note: annotate 'logger' 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
 34 |
 35 | func log(level logLevel: LogLevel, _ message: Any) {
[6/16] Compiling Dip Register.swift
[7/16] Compiling Dip RuntimeArguments.swift
[8/16] Compiling Dip StoryboardInstantiatable.swift
/Users/admin/builder/spi-builder-workspace/Sources/StoryboardInstantiatable.swift:29:21: warning: static property 'uiContainers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 27 | extension DependencyContainer {
 28 |   ///Containers that will be used to resolve dependencies of instances, created by stroyboards.
 29 |   static public var uiContainers: [DependencyContainer] = {
    |                     |- warning: static property 'uiContainers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: convert 'uiContainers' to a 'let' constant to make 'Sendable' shared state immutable
    |                     |- note: annotate 'uiContainers' 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
 30 |     #if os(watchOS)
 31 |       swizzleAwakeWithContext
/Users/admin/builder/spi-builder-workspace/Sources/StoryboardInstantiatable.swift:175:5: warning: let 'DipTagAssociatedObjectKey' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<Int8>' may have shared mutable state; this is an error in the Swift 6 language mode
173 | #endif
174 |
175 | let DipTagAssociatedObjectKey = UnsafeMutablePointer<Int8>.allocate(capacity: 1)
    |     |- warning: let 'DipTagAssociatedObjectKey' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<Int8>' may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: annotate 'DipTagAssociatedObjectKey' 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
176 |
177 | extension NSObject {
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
  |                       `- note: generic struct 'UnsafeMutablePointer' 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/Utils.swift:31:12: warning: var 'logLevel' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 29 | }
 30 |
 31 | public var logLevel: LogLevel = .Errors
    |            |- warning: var 'logLevel' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: convert 'logLevel' to a 'let' constant to make 'Sendable' shared state immutable
    |            |- note: annotate 'logLevel' 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
 32 |
 33 | public var logger: (LogLevel, Any) -> Void = { print($1) }
/Users/admin/builder/spi-builder-workspace/Sources/Utils.swift:33:12: warning: var 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 31 | public var logLevel: LogLevel = .Errors
 32 |
 33 | public var logger: (LogLevel, Any) -> Void = { print($1) }
    |            |- warning: var 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
    |            |- note: annotate 'logger' 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
 34 |
 35 | func log(level logLevel: LogLevel, _ message: Any) {
[9/16] Compiling Dip DipError.swift
/Users/admin/builder/spi-builder-workspace/Sources/DipError.swift:37:8: warning: associated value 'definitionNotFound(key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'DefinitionKey'; this is an error in the Swift 6 language mode
35 |    - parameter key: definition key used to lookup matching definition
36 |    */
37 |   case definitionNotFound(key: DefinitionKey)
   |        `- warning: associated value 'definitionNotFound(key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'DefinitionKey'; this is an error in the Swift 6 language mode
38 |
39 |   /**
/Users/admin/builder/spi-builder-workspace/Sources/Definition.swift:26:15: note: consider making struct 'DefinitionKey' conform to the 'Sendable' protocol
 24 |
 25 | ///A key used to store definitons in a container.
 26 | public struct DefinitionKey: Hashable, CustomStringConvertible {
    |               `- note: consider making struct 'DefinitionKey' conform to the 'Sendable' protocol
 27 |   public let type: Any.Type
 28 |   public let typeOfArguments: Any.Type
/Users/admin/builder/spi-builder-workspace/Sources/DipError.swift:66:8: warning: associated value 'ambiguousDefinitions(type:definitions:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'any DefinitionType'; this is an error in the Swift 6 language mode
64 |       - definitions: Ambiguous definitions
65 |    */
66 |   case ambiguousDefinitions(type: Any.Type, definitions: [DefinitionType])
   |        `- warning: associated value 'ambiguousDefinitions(type:definitions:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'any DefinitionType'; this is an error in the Swift 6 language mode
67 |
68 |   /**
/Users/admin/builder/spi-builder-workspace/Sources/Definition.swift:64:17: note: protocol 'DefinitionType' does not conform to the 'Sendable' protocol
 62 |
 63 | ///Dummy protocol to store definitions for different types in collection
 64 | public protocol DefinitionType: AnyObject { }
    |                 `- note: protocol 'DefinitionType' does not conform to the 'Sendable' protocol
 65 |
 66 | /**
/Users/admin/builder/spi-builder-workspace/Sources/DipError.swift:75:8: warning: associated value 'invalidType(resolved:key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
73 |       - key: Definition key used to resolve instance
74 |    */
75 |   case invalidType(resolved: Any?, key: DefinitionKey)
   |        `- warning: associated value 'invalidType(resolved:key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
76 |
77 |   public var description: String {
/Users/admin/builder/spi-builder-workspace/Sources/DipError.swift:75:8: warning: associated value 'invalidType(resolved:key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'DefinitionKey'; this is an error in the Swift 6 language mode
73 |       - key: Definition key used to resolve instance
74 |    */
75 |   case invalidType(resolved: Any?, key: DefinitionKey)
   |        `- warning: associated value 'invalidType(resolved:key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'DefinitionKey'; this is an error in the Swift 6 language mode
76 |
77 |   public var description: String {
/Users/admin/builder/spi-builder-workspace/Sources/Definition.swift:26:15: note: consider making struct 'DefinitionKey' conform to the 'Sendable' protocol
 24 |
 25 | ///A key used to store definitons in a container.
 26 | public struct DefinitionKey: Hashable, CustomStringConvertible {
    |               `- note: consider making struct 'DefinitionKey' conform to the 'Sendable' protocol
 27 |   public let type: Any.Type
 28 |   public let typeOfArguments: Any.Type
[10/16] Compiling Dip AutoInjection.swift
[11/16] Compiling Dip AutoWiring.swift
[12/16] Emitting module Dip
/Users/admin/builder/spi-builder-workspace/Sources/DipError.swift:37:8: warning: associated value 'definitionNotFound(key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'DefinitionKey'; this is an error in the Swift 6 language mode
35 |    - parameter key: definition key used to lookup matching definition
36 |    */
37 |   case definitionNotFound(key: DefinitionKey)
   |        `- warning: associated value 'definitionNotFound(key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'DefinitionKey'; this is an error in the Swift 6 language mode
38 |
39 |   /**
/Users/admin/builder/spi-builder-workspace/Sources/Definition.swift:26:15: note: consider making struct 'DefinitionKey' conform to the 'Sendable' protocol
 24 |
 25 | ///A key used to store definitons in a container.
 26 | public struct DefinitionKey: Hashable, CustomStringConvertible {
    |               `- note: consider making struct 'DefinitionKey' conform to the 'Sendable' protocol
 27 |   public let type: Any.Type
 28 |   public let typeOfArguments: Any.Type
/Users/admin/builder/spi-builder-workspace/Sources/DipError.swift:66:8: warning: associated value 'ambiguousDefinitions(type:definitions:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'any DefinitionType'; this is an error in the Swift 6 language mode
64 |       - definitions: Ambiguous definitions
65 |    */
66 |   case ambiguousDefinitions(type: Any.Type, definitions: [DefinitionType])
   |        `- warning: associated value 'ambiguousDefinitions(type:definitions:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'any DefinitionType'; this is an error in the Swift 6 language mode
67 |
68 |   /**
/Users/admin/builder/spi-builder-workspace/Sources/Definition.swift:64:17: note: protocol 'DefinitionType' does not conform to the 'Sendable' protocol
 62 |
 63 | ///Dummy protocol to store definitions for different types in collection
 64 | public protocol DefinitionType: AnyObject { }
    |                 `- note: protocol 'DefinitionType' does not conform to the 'Sendable' protocol
 65 |
 66 | /**
/Users/admin/builder/spi-builder-workspace/Sources/DipError.swift:75:8: warning: associated value 'invalidType(resolved:key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
73 |       - key: Definition key used to resolve instance
74 |    */
75 |   case invalidType(resolved: Any?, key: DefinitionKey)
   |        `- warning: associated value 'invalidType(resolved:key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
76 |
77 |   public var description: String {
/Users/admin/builder/spi-builder-workspace/Sources/DipError.swift:75:8: warning: associated value 'invalidType(resolved:key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'DefinitionKey'; this is an error in the Swift 6 language mode
73 |       - key: Definition key used to resolve instance
74 |    */
75 |   case invalidType(resolved: Any?, key: DefinitionKey)
   |        `- warning: associated value 'invalidType(resolved:key:)' of 'Sendable'-conforming enum 'DipError' has non-sendable type 'DefinitionKey'; this is an error in the Swift 6 language mode
76 |
77 |   public var description: String {
/Users/admin/builder/spi-builder-workspace/Sources/Definition.swift:26:15: note: consider making struct 'DefinitionKey' conform to the 'Sendable' protocol
 24 |
 25 | ///A key used to store definitons in a container.
 26 | public struct DefinitionKey: Hashable, CustomStringConvertible {
    |               `- note: consider making struct 'DefinitionKey' conform to the 'Sendable' protocol
 27 |   public let type: Any.Type
 28 |   public let typeOfArguments: Any.Type
/Users/admin/builder/spi-builder-workspace/Sources/StoryboardInstantiatable.swift:29:21: warning: static property 'uiContainers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 27 | extension DependencyContainer {
 28 |   ///Containers that will be used to resolve dependencies of instances, created by stroyboards.
 29 |   static public var uiContainers: [DependencyContainer] = {
    |                     |- warning: static property 'uiContainers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: convert 'uiContainers' to a 'let' constant to make 'Sendable' shared state immutable
    |                     |- note: annotate 'uiContainers' 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
 30 |     #if os(watchOS)
 31 |       swizzleAwakeWithContext
/Users/admin/builder/spi-builder-workspace/Sources/StoryboardInstantiatable.swift:175:5: warning: let 'DipTagAssociatedObjectKey' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<Int8>' may have shared mutable state; this is an error in the Swift 6 language mode
173 | #endif
174 |
175 | let DipTagAssociatedObjectKey = UnsafeMutablePointer<Int8>.allocate(capacity: 1)
    |     |- warning: let 'DipTagAssociatedObjectKey' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<Int8>' may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: annotate 'DipTagAssociatedObjectKey' 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
176 |
177 | extension NSObject {
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
  |                       `- note: generic struct 'UnsafeMutablePointer' 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/Utils.swift:31:12: warning: var 'logLevel' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 29 | }
 30 |
 31 | public var logLevel: LogLevel = .Errors
    |            |- warning: var 'logLevel' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: convert 'logLevel' to a 'let' constant to make 'Sendable' shared state immutable
    |            |- note: annotate 'logLevel' 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
 32 |
 33 | public var logger: (LogLevel, Any) -> Void = { print($1) }
/Users/admin/builder/spi-builder-workspace/Sources/Utils.swift:33:12: warning: var 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 31 | public var logLevel: LogLevel = .Errors
 32 |
 33 | public var logger: (LogLevel, Any) -> Void = { print($1) }
    |            |- warning: var 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
    |            |- note: annotate 'logger' 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
 34 |
 35 | func log(level logLevel: LogLevel, _ message: Any) {
[13/16] Compiling Dip Compatibility.swift
[14/16] Compiling Dip ComponentScope.swift
[15/16] Compiling Dip Definition.swift
[16/16] Compiling Dip Dip.swift
Build complete! (12.54s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Dip",
  "name" : "Dip",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Dip",
      "targets" : [
        "Dip"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "DipTests",
      "module_type" : "SwiftTarget",
      "name" : "DipTests",
      "path" : "Tests",
      "sources" : [
        "DipTests/AutoInjectionTests.swift",
        "DipTests/AutoWiringTests.swift",
        "DipTests/ComponentScopeTests.swift",
        "DipTests/ContextTests.swift",
        "DipTests/DefinitionTests.swift",
        "DipTests/DipTests.swift",
        "DipTests/DipUITests.swift",
        "DipTests/RuntimeArgumentsTests.swift",
        "DipTests/ThreadSafetyTests.swift",
        "DipTests/TypeForwardingTests.swift",
        "DipTests/Utils.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "Dip"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Dip",
      "module_type" : "SwiftTarget",
      "name" : "Dip",
      "path" : "Sources",
      "product_memberships" : [
        "Dip"
      ],
      "sources" : [
        "AutoInjection.swift",
        "AutoWiring.swift",
        "Compatibility.swift",
        "ComponentScope.swift",
        "Definition.swift",
        "Dip.swift",
        "DipError.swift",
        "Register.swift",
        "Resolve.swift",
        "RuntimeArguments.swift",
        "StoryboardInstantiatable.swift",
        "TypeForwarding.swift",
        "Utils.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.