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 FormStateKit, reference main (9c3f39), with Swift 6.0 for macOS (SPM) on 28 Nov 2024 06:42:24 UTC.

Swift 6 data race errors: 4

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 -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.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/futuredapp/FormStateKit.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/futuredapp/FormStateKit
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 9c3f391 Merge pull request #3 from futuredapp/housekeep/platform-support
Cloned https://github.com/futuredapp/FormStateKit.git
Revision (git rev-parse @):
9c3f391a5bd40aab5779bfa9a704a588946c3287
SUCCESS checkout https://github.com/futuredapp/FormStateKit.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": "formstatekit",
      "name": "FormStateKit",
      "url": "https://github.com/futuredapp/FormStateKit.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/FormStateKit",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/futuredapp/FormStateKit.git
[1/230] Fetching formstatekit
Fetched https://github.com/futuredapp/FormStateKit.git from cache (0.78s)
Creating working copy for https://github.com/futuredapp/FormStateKit.git
Working copy of https://github.com/futuredapp/FormStateKit.git resolved at main (9c3f391)
warning: '.resolve-product-dependencies': dependency 'formstatekit' 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/futuredapp/FormStateKit.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 -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--7754E27361AE5C74.txt
[3/12] Compiling FormStateKit FormValidationRule+ExpressibleByNilLiteral.swift
[4/12] Compiling FormStateKit FormValidationRule+Bool.swift
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/Rules/FormValidationRule+Bool.swift:2:16: warning: static property 'hasToBeOn' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<Bool>' may have shared mutable state; this is an error in the Swift 6 language mode
1 | public extension FormValidationRule where Value == Bool {
2 |     static let hasToBeOn: Self = .init { $0 }
  |                |- warning: static property 'hasToBeOn' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<Bool>' may have shared mutable state; this is an error in the Swift 6 language mode
  |                |- note: annotate 'hasToBeOn' 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
3 |     static let hasToBeOff: Self = .init { !$0 }
4 | }
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormValidationRule.swift:3:15: note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 1 | import Foundation
 2 |
 3 | public struct FormValidationRule<Value> {
   |               `- note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 4 |     let validate: (Value) -> Bool
 5 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/Rules/FormValidationRule+Bool.swift:3:16: warning: static property 'hasToBeOff' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<Bool>' may have shared mutable state; this is an error in the Swift 6 language mode
1 | public extension FormValidationRule where Value == Bool {
2 |     static let hasToBeOn: Self = .init { $0 }
3 |     static let hasToBeOff: Self = .init { !$0 }
  |                |- warning: static property 'hasToBeOff' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<Bool>' may have shared mutable state; this is an error in the Swift 6 language mode
  |                |- note: annotate 'hasToBeOff' 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
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormValidationRule.swift:3:15: note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 1 | import Foundation
 2 |
 3 | public struct FormValidationRule<Value> {
   |               `- note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 4 |     let validate: (Value) -> Bool
 5 |
[5/12] Compiling FormStateKit FormValidationRule+Collection.swift
[6/12] Compiling FormStateKit FormValidationRule.swift
[7/12] Compiling FormStateKit FormValidation.swift
[8/12] Compiling FormStateKit FormValidationRule+String.swift
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/Rules/FormValidationRule+String.swift:4:16: warning: static property 'email' is not concurrency-safe because non-'Sendable' type 'NSPredicate' may have shared mutable state; this is an error in the Swift 6 language mode
 2 |
 3 | private extension NSPredicate {
 4 |     static let email: NSPredicate = NSPredicate(
   |                |- warning: static property 'email' is not concurrency-safe because non-'Sendable' type 'NSPredicate' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'email' 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
 5 |         format: "SELF MATCHES %@",
 6 |         "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"
Foundation.NSPredicate:2:12: note: class 'NSPredicate' does not conform to the 'Sendable' protocol
 1 | @available(macOS 10.4, *)
 2 | open class NSPredicate : NSObject, NSSecureCoding, NSCopying {
   |            `- note: class 'NSPredicate' does not conform to the 'Sendable' protocol
 3 |     public /*not inherited*/ init(format predicateFormat: String, argumentArray arguments: [Any]?)
 4 |     @available(*, unavailable, renamed: "init(format:argumentArray:)", message: "Not available in Swift")
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/Rules/FormValidationRule+String.swift:11:16: warning: static property 'email' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | public extension FormValidationRule where Value == String {
11 |     static let email: Self = .init(NSPredicate.email.evaluate)
   |                |- warning: static property 'email' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<String>' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'email' 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
12 | }
13 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormValidationRule.swift:3:15: note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 1 | import Foundation
 2 |
 3 | public struct FormValidationRule<Value> {
   |               `- note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 4 |     let validate: (Value) -> Bool
 5 |
[9/12] Compiling FormStateKit FormState.swift
[10/12] Compiling FormStateKit FormModel.swift
[11/12] Emitting module FormStateKit
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/Rules/FormValidationRule+Bool.swift:2:16: warning: static property 'hasToBeOn' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<Bool>' may have shared mutable state; this is an error in the Swift 6 language mode
1 | public extension FormValidationRule where Value == Bool {
2 |     static let hasToBeOn: Self = .init { $0 }
  |                |- warning: static property 'hasToBeOn' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<Bool>' may have shared mutable state; this is an error in the Swift 6 language mode
  |                |- note: annotate 'hasToBeOn' 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
3 |     static let hasToBeOff: Self = .init { !$0 }
4 | }
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormValidationRule.swift:3:15: note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 1 | import Foundation
 2 |
 3 | public struct FormValidationRule<Value> {
   |               `- note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 4 |     let validate: (Value) -> Bool
 5 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/Rules/FormValidationRule+Bool.swift:3:16: warning: static property 'hasToBeOff' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<Bool>' may have shared mutable state; this is an error in the Swift 6 language mode
1 | public extension FormValidationRule where Value == Bool {
2 |     static let hasToBeOn: Self = .init { $0 }
3 |     static let hasToBeOff: Self = .init { !$0 }
  |                |- warning: static property 'hasToBeOff' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<Bool>' may have shared mutable state; this is an error in the Swift 6 language mode
  |                |- note: annotate 'hasToBeOff' 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
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormValidationRule.swift:3:15: note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 1 | import Foundation
 2 |
 3 | public struct FormValidationRule<Value> {
   |               `- note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 4 |     let validate: (Value) -> Bool
 5 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/Rules/FormValidationRule+String.swift:4:16: warning: static property 'email' is not concurrency-safe because non-'Sendable' type 'NSPredicate' may have shared mutable state; this is an error in the Swift 6 language mode
 2 |
 3 | private extension NSPredicate {
 4 |     static let email: NSPredicate = NSPredicate(
   |                |- warning: static property 'email' is not concurrency-safe because non-'Sendable' type 'NSPredicate' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'email' 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
 5 |         format: "SELF MATCHES %@",
 6 |         "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"
Foundation.NSPredicate:2:12: note: class 'NSPredicate' does not conform to the 'Sendable' protocol
 1 | @available(macOS 10.4, *)
 2 | open class NSPredicate : NSObject, NSSecureCoding, NSCopying {
   |            `- note: class 'NSPredicate' does not conform to the 'Sendable' protocol
 3 |     public /*not inherited*/ init(format predicateFormat: String, argumentArray arguments: [Any]?)
 4 |     @available(*, unavailable, renamed: "init(format:argumentArray:)", message: "Not available in Swift")
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/Rules/FormValidationRule+String.swift:11:16: warning: static property 'email' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | public extension FormValidationRule where Value == String {
11 |     static let email: Self = .init(NSPredicate.email.evaluate)
   |                |- warning: static property 'email' is not concurrency-safe because non-'Sendable' type 'FormValidationRule<String>' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'email' 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
12 | }
13 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormValidationRule.swift:3:15: note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 1 | import Foundation
 2 |
 3 | public struct FormValidationRule<Value> {
   |               `- note: consider making generic struct 'FormValidationRule' conform to the 'Sendable' protocol
 4 |     let validate: (Value) -> Bool
 5 |
[12/12] Compiling FormStateKit FormPrefill.swift
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormPrefill.swift:12:13: warning: capture of 'self' with non-sendable type 'FormPrefill<Form>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 1 | import SwiftUI
 2 |
 3 | public struct FormPrefill<Form> {
   |               `- note: consider making generic struct 'FormPrefill' conform to the 'Sendable' protocol
 4 |     let form: Form?
 5 |
   :
10 |     public func prefill<Value>(_ keyPath: WritableKeyPath<Form, Value>, _ binding: Binding<FormState<Form>>) -> Binding<Value> {
11 |         Binding {
12 |             form?[keyPath: keyPath] ?? binding.form[dynamicMember: keyPath].wrappedValue
   |             `- warning: capture of 'self' with non-sendable type 'FormPrefill<Form>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
13 |         } set: { newValue in
14 |             binding.form[dynamicMember: keyPath].wrappedValue = newValue
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormPrefill.swift:12:28: warning: capture of 'keyPath' with non-sendable type 'WritableKeyPath<Form, Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
10 |     public func prefill<Value>(_ keyPath: WritableKeyPath<Form, Value>, _ binding: Binding<FormState<Form>>) -> Binding<Value> {
11 |         Binding {
12 |             form?[keyPath: keyPath] ?? binding.form[dynamicMember: keyPath].wrappedValue
   |                            `- warning: capture of 'keyPath' with non-sendable type 'WritableKeyPath<Form, Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
13 |         } set: { newValue in
14 |             binding.form[dynamicMember: keyPath].wrappedValue = newValue
Swift.WritableKeyPath:1:14: note: generic class 'WritableKeyPath' does not conform to the 'Sendable' protocol
1 | public class WritableKeyPath<Root, Value> : KeyPath<Root, Value> {
  |              `- note: generic class 'WritableKeyPath' does not conform to the 'Sendable' protocol
2 |     @objc deinit
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormPrefill.swift:12:40: warning: capture of 'binding' with non-sendable type 'Binding<FormState<Form>>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
10 |     public func prefill<Value>(_ keyPath: WritableKeyPath<Form, Value>, _ binding: Binding<FormState<Form>>) -> Binding<Value> {
11 |         Binding {
12 |             form?[keyPath: keyPath] ?? binding.form[dynamicMember: keyPath].wrappedValue
   |                                        `- warning: capture of 'binding' with non-sendable type 'Binding<FormState<Form>>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
13 |         } set: { newValue in
14 |             binding.form[dynamicMember: keyPath].wrappedValue = newValue
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormState.swift:1:15: note: consider making generic struct 'FormState' conform to the 'Sendable' protocol
 1 | public struct FormState<Form> {
   |               `- note: consider making generic struct 'FormState' conform to the 'Sendable' protocol
 2 |     public var form: Form
 3 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormPrefill.swift:12:40: warning: implicit capture of 'binding' requires that 'Binding<FormState<Form>>' conforms to `Sendable`; this is an error in the Swift 6 language mode
10 |     public func prefill<Value>(_ keyPath: WritableKeyPath<Form, Value>, _ binding: Binding<FormState<Form>>) -> Binding<Value> {
11 |         Binding {
12 |             form?[keyPath: keyPath] ?? binding.form[dynamicMember: keyPath].wrappedValue
   |                                        `- warning: implicit capture of 'binding' requires that 'Binding<FormState<Form>>' conforms to `Sendable`; this is an error in the Swift 6 language mode
13 |         } set: { newValue in
14 |             binding.form[dynamicMember: keyPath].wrappedValue = newValue
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormState.swift:1:15: note: consider making generic struct 'FormState' conform to the 'Sendable' protocol
 1 | public struct FormState<Form> {
   |               `- note: consider making generic struct 'FormState' conform to the 'Sendable' protocol
 2 |     public var form: Form
 3 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormPrefill.swift:12:68: warning: implicit capture of 'keyPath' requires that 'WritableKeyPath<Form, Value>' conforms to `Sendable`; this is an error in the Swift 6 language mode
10 |     public func prefill<Value>(_ keyPath: WritableKeyPath<Form, Value>, _ binding: Binding<FormState<Form>>) -> Binding<Value> {
11 |         Binding {
12 |             form?[keyPath: keyPath] ?? binding.form[dynamicMember: keyPath].wrappedValue
   |                                                                    `- warning: implicit capture of 'keyPath' requires that 'WritableKeyPath<Form, Value>' conforms to `Sendable`; this is an error in the Swift 6 language mode
13 |         } set: { newValue in
14 |             binding.form[dynamicMember: keyPath].wrappedValue = newValue
Swift.WritableKeyPath:1:14: note: generic class 'WritableKeyPath' does not conform to the 'Sendable' protocol
1 | public class WritableKeyPath<Root, Value> : KeyPath<Root, Value> {
  |              `- note: generic class 'WritableKeyPath' does not conform to the 'Sendable' protocol
2 |     @objc deinit
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormPrefill.swift:14:13: warning: capture of 'binding' with non-sendable type 'Binding<FormState<Form>>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
12 |             form?[keyPath: keyPath] ?? binding.form[dynamicMember: keyPath].wrappedValue
13 |         } set: { newValue in
14 |             binding.form[dynamicMember: keyPath].wrappedValue = newValue
   |             `- warning: capture of 'binding' with non-sendable type 'Binding<FormState<Form>>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 |         }
16 |         .transaction(binding.transaction)
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormState.swift:1:15: note: consider making generic struct 'FormState' conform to the 'Sendable' protocol
 1 | public struct FormState<Form> {
   |               `- note: consider making generic struct 'FormState' conform to the 'Sendable' protocol
 2 |     public var form: Form
 3 |
/Users/admin/builder/spi-builder-workspace/Sources/FormStateKit/FormPrefill.swift:14:41: warning: capture of 'keyPath' with non-sendable type 'WritableKeyPath<Form, Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
12 |             form?[keyPath: keyPath] ?? binding.form[dynamicMember: keyPath].wrappedValue
13 |         } set: { newValue in
14 |             binding.form[dynamicMember: keyPath].wrappedValue = newValue
   |                                         `- warning: capture of 'keyPath' with non-sendable type 'WritableKeyPath<Form, Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 |         }
16 |         .transaction(binding.transaction)
Swift.WritableKeyPath:1:14: note: generic class 'WritableKeyPath' does not conform to the 'Sendable' protocol
1 | public class WritableKeyPath<Root, Value> : KeyPath<Root, Value> {
  |              `- note: generic class 'WritableKeyPath' does not conform to the 'Sendable' protocol
2 |     @objc deinit
3 | }
Build complete! (13.20s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "FormStateKit",
  "name" : "FormStateKit",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "FormStateKit",
      "targets" : [
        "FormStateKit"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FormStateKitTests",
      "module_type" : "SwiftTarget",
      "name" : "FormStateKitTests",
      "path" : "Tests/FormStateKitTests",
      "sources" : [
        "FormValidationRuleOperatorTests.swift",
        "FormValidationRulesTests.swift"
      ],
      "target_dependencies" : [
        "FormStateKit"
      ],
      "type" : "test"
    },
    {
      "c99name" : "FormStateKit",
      "module_type" : "SwiftTarget",
      "name" : "FormStateKit",
      "path" : "Sources/FormStateKit",
      "product_memberships" : [
        "FormStateKit"
      ],
      "sources" : [
        "FormModel.swift",
        "FormPrefill.swift",
        "FormState.swift",
        "FormValidation.swift",
        "FormValidationRule.swift",
        "Rules/FormValidationRule+Bool.swift",
        "Rules/FormValidationRule+Collection.swift",
        "Rules/FormValidationRule+ExpressibleByNilLiteral.swift",
        "Rules/FormValidationRule+String.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Done.