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 KeychainItem, reference main (ba8ea1), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 06:48:42 UTC.

Swift 6 data race errors: 2

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/danielctull/KeychainItem.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/danielctull/KeychainItem
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at ba8ea1c Allow for building on linux
Cloned https://github.com/danielctull/KeychainItem.git
Revision (git rev-parse @):
ba8ea1cc6818a6f16a6529cdb7af13e25ca61fe9
SUCCESS checkout https://github.com/danielctull/KeychainItem.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": "keychainitem",
      "name": "KeychainItem",
      "url": "https://github.com/danielctull/KeychainItem.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/KeychainItem",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/danielctull/KeychainItem.git
[4/194] Fetching keychainitem
Fetched https://github.com/danielctull/KeychainItem.git from cache (0.66s)
Creating working copy for https://github.com/danielctull/KeychainItem.git
Working copy of https://github.com/danielctull/KeychainItem.git resolved at main (ba8ea1c)
warning: '.resolve-product-dependencies': dependency 'keychainitem' 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/danielctull/KeychainItem.git
https://github.com/danielctull/KeychainItem.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "KeychainItem",
  "name" : "KeychainItem",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "KeychainItem",
      "targets" : [
        "KeychainItem"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "KeychainItemTests",
      "module_type" : "SwiftTarget",
      "name" : "KeychainItemTests",
      "path" : "Tests/KeychainItemTests",
      "sources" : [
        "CodableTests.swift",
        "KeychainTests.swift"
      ],
      "target_dependencies" : [
        "KeychainItem"
      ],
      "type" : "test"
    },
    {
      "c99name" : "KeychainItem",
      "module_type" : "SwiftTarget",
      "name" : "KeychainItem",
      "path" : "Sources/KeychainItem",
      "product_memberships" : [
        "KeychainItem"
      ],
      "sources" : [
        "Keychain+Functions.swift",
        "Keychain-Dynamic.swift",
        "Keychain-Static.swift",
        "KeychainItem+Codable.swift",
        "KeychainItem.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
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/8] Compiling KeychainItem Keychain-Static.swift
[4/8] Compiling KeychainItem KeychainItem.swift
[5/8] Compiling KeychainItem KeychainItem+Codable.swift
[6/8] Compiling KeychainItem Keychain+Functions.swift
[7/8] Emitting module KeychainItem
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:35:6: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
33 |
34 |     public let item: KeychainItem<Value>
35 |     @ObservedObject private var observable: Observable<Value>
   |      `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
36 |
37 |     public init(_ item: KeychainItem<Value>) {
SwiftUICore.ObservedObject.init:2:35: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
1 | generic struct ObservedObject {
2 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)}
  |                                   `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:35:6: warning: sending '$input_value' risks causing data races; this is an error in the Swift 6 language mode
33 |
34 |     public let item: KeychainItem<Value>
35 |     @ObservedObject private var observable: Observable<Value>
   |      |- warning: sending '$input_value' risks causing data races; this is an error in the Swift 6 language mode
   |      `- note: sending task-isolated '$input_value' to main actor-isolated callee risks causing data races between main actor-isolated and task-isolated uses
36 |
37 |     public init(_ item: KeychainItem<Value>) {
[8/8] Compiling KeychainItem Keychain-Dynamic.swift
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:35:6: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
33 |
34 |     public let item: KeychainItem<Value>
35 |     @ObservedObject private var observable: Observable<Value>
   |      `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
36 |
37 |     public init(_ item: KeychainItem<Value>) {
SwiftUICore.ObservedObject.init:2:35: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
1 | generic struct ObservedObject {
2 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)}
  |                                   `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:39:9: warning: main actor-isolated property 'observable' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
33 |
34 |     public let item: KeychainItem<Value>
35 |     @ObservedObject private var observable: Observable<Value>
   |                                 `- note: mutation of this property is only permitted within the actor
36 |
37 |     public init(_ item: KeychainItem<Value>) {
38 |         self.item = item
39 |         observable = Observable(item: item)
   |         `- warning: main actor-isolated property 'observable' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
40 |     }
41 |
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:44:15: warning: main actor-isolated property 'observable' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
33 |
34 |     public let item: KeychainItem<Value>
35 |     @ObservedObject private var observable: Observable<Value>
   |                                 `- note: property declared here
36 |
37 |     public init(_ item: KeychainItem<Value>) {
   :
42 |     /// The value stored in the keychain for the given key.
43 |     public var wrappedValue: Value? {
44 |         get { observable.value }
   |               `- warning: main actor-isolated property 'observable' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
45 |         nonmutating set { observable.value = newValue }
46 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:45:27: warning: main actor-isolated property 'observable' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
33 |
34 |     public let item: KeychainItem<Value>
35 |     @ObservedObject private var observable: Observable<Value>
   |                                 `- note: mutation of this property is only permitted within the actor
36 |
37 |     public init(_ item: KeychainItem<Value>) {
   :
43 |     public var wrappedValue: Value? {
44 |         get { observable.value }
45 |         nonmutating set { observable.value = newValue }
   |                           `- warning: main actor-isolated property 'observable' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
46 |     }
47 |
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:49:61: warning: main actor-isolated subscript 'subscript(dynamicMember:)' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
47 |
48 |     /// A binding to the value in stored in the keychain.
49 |     public var projectedValue: Binding<Value?> { $observable.value }
   |                                                             `- warning: main actor-isolated subscript 'subscript(dynamicMember:)' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
50 | }
51 |
SwiftUICore.ObservedObject.Wrapper.subscript:3:35: note: subscript declared here
1 | generic struct ObservedObject {
2 |   struct Wrapper {
3 | @MainActor @preconcurrency public subscript<Subject>(dynamicMember keyPath: ReferenceWritableKeyPath<ObjectType, Subject>) -> Binding<Subject> { get }  }
  |                                   `- note: subscript declared here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:49:50: warning: main actor-isolated property '$observable' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
33 |
34 |     public let item: KeychainItem<Value>
35 |     @ObservedObject private var observable: Observable<Value>
   |                                 `- note: property declared here
36 |
37 |     public init(_ item: KeychainItem<Value>) {
   :
47 |
48 |     /// A binding to the value in stored in the keychain.
49 |     public var projectedValue: Binding<Value?> { $observable.value }
   |                                                  `- warning: main actor-isolated property '$observable' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
50 | }
51 |
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:23:27: warning: will never be executed
21 |         return NotificationCenter.default
22 |             .publisher(for: .keychainItemWillChange)
23 |             .catch { _ in Empty<Notification, Never>() }
   |                    |      `- warning: will never be executed
   |                    `- note: '_' is of type 'NotificationCenter.Publisher.Failure' (aka 'Never') which cannot be constructed because it is an enum with no cases
24 |             .compactMap { $0.object as? KeychainItem<Value> }
25 |             .filter { $0.account == item.account }
/Users/admin/builder/spi-builder-workspace/Sources/KeychainItem/Keychain-Dynamic.swift:35:6: warning: sending '$input_value' risks causing data races; this is an error in the Swift 6 language mode
33 |
34 |     public let item: KeychainItem<Value>
35 |     @ObservedObject private var observable: Observable<Value>
   |      |- warning: sending '$input_value' risks causing data races; this is an error in the Swift 6 language mode
   |      `- note: sending task-isolated '$input_value' to main actor-isolated callee risks causing data races between main actor-isolated and task-isolated uses
36 |
37 |     public init(_ item: KeychainItem<Value>) {
Build complete! (7.54s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "KeychainItem",
  "name" : "KeychainItem",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "KeychainItem",
      "targets" : [
        "KeychainItem"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "KeychainItemTests",
      "module_type" : "SwiftTarget",
      "name" : "KeychainItemTests",
      "path" : "Tests/KeychainItemTests",
      "sources" : [
        "CodableTests.swift",
        "KeychainTests.swift"
      ],
      "target_dependencies" : [
        "KeychainItem"
      ],
      "type" : "test"
    },
    {
      "c99name" : "KeychainItem",
      "module_type" : "SwiftTarget",
      "name" : "KeychainItem",
      "path" : "Sources/KeychainItem",
      "product_memberships" : [
        "KeychainItem"
      ],
      "sources" : [
        "Keychain+Functions.swift",
        "Keychain-Dynamic.swift",
        "Keychain-Static.swift",
        "KeychainItem+Codable.swift",
        "KeychainItem.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.