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 SwiftyUserDefaults, reference master (558c01), with Swift 6.0 for macOS (SPM) on 1 Nov 2024 13:41:48 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

Build Log

========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/sunshinejr/SwiftyUserDefaults.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/sunshinejr/SwiftyUserDefaults
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 558c015 Update README.md
Cloned https://github.com/sunshinejr/SwiftyUserDefaults.git
Revision (git rev-parse @):
558c015e49524ebf5031b66980a722a4c225c302
SUCCESS checkout https://github.com/sunshinejr/SwiftyUserDefaults.git at master
========================================
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": "swiftyuserdefaults",
      "name": "SwiftyUserDefaults",
      "url": "https://github.com/sunshinejr/SwiftyUserDefaults.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/SwiftyUserDefaults",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/sunshinejr/SwiftyUserDefaults.git
[1/3414] Fetching swiftyuserdefaults
Fetched https://github.com/sunshinejr/SwiftyUserDefaults.git from cache (0.97s)
Creating working copy for https://github.com/sunshinejr/SwiftyUserDefaults.git
Working copy of https://github.com/sunshinejr/SwiftyUserDefaults.git resolved at master (558c015)
warning: '.resolve-product-dependencies': dependency 'swiftyuserdefaults' 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/sunshinejr/SwiftyUserDefaults.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 SwiftyUserDefaults DefaultsKey.swift
[4/15] Compiling SwiftyUserDefaults DefaultsObserver.swift
/Users/admin/builder/spi-builder-workspace/Sources/DefaultsObserver.swift:51:41: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
 31 | #if !os(Linux)
 32 |
 33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
    |                                     `- note: 'T' previously declared here
 34 |
 35 |     public struct Update {
    :
 49 |         }
 50 |
 51 |         private static func deserialize<T: DefaultsSerializable>(_ value: Any?, for key: DefaultsKey<T>) -> T.T? where T.T == T {
    |                                         `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
 52 |             guard let value = value else { return nil }
 53 |
[5/16] Compiling SwiftyUserDefaults DefaultsSerializable.swift
[6/16] Compiling SwiftyUserDefaults OptionalType.swift
[7/16] Compiling SwiftyUserDefaults DefaultsKeys.swift
[8/16] Compiling SwiftyUserDefaults Defaults.swift
/Users/admin/builder/spi-builder-workspace/Sources/Defaults.swift:35:12: warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | ///  ~~~
34 |
35 | public var Defaults = DefaultsAdapter<DefaultsKeys>(defaults: .standard, keyStore: .init())
   |            |- warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'Defaults' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: annotate 'Defaults' 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
36 |
37 | public extension UserDefaults {
[9/16] Compiling SwiftyUserDefaults DefaultsAdapter.swift
/Users/admin/builder/spi-builder-workspace/Sources/Defaults.swift:35:12: warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | ///  ~~~
34 |
35 | public var Defaults = DefaultsAdapter<DefaultsKeys>(defaults: .standard, keyStore: .init())
   |            |- warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'Defaults' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: annotate 'Defaults' 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
36 |
37 | public extension UserDefaults {
[10/16] Compiling SwiftyUserDefaults BuiltIns.swift
[11/16] Compiling SwiftyUserDefaults Defaults+Observing.swift
[12/16] Compiling SwiftyUserDefaults Defaults+StringToBool.swift
[13/16] Compiling SwiftyUserDefaults Defaults+Subscripts.swift
[14/16] Emitting module SwiftyUserDefaults
/Users/admin/builder/spi-builder-workspace/Sources/Defaults.swift:35:12: warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | ///  ~~~
34 |
35 | public var Defaults = DefaultsAdapter<DefaultsKeys>(defaults: .standard, keyStore: .init())
   |            |- warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'Defaults' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: annotate 'Defaults' 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
36 |
37 | public extension UserDefaults {
/Users/admin/builder/spi-builder-workspace/Sources/DefaultsObserver.swift:51:41: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
 31 | #if !os(Linux)
 32 |
 33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
    |                                     `- note: 'T' previously declared here
 34 |
 35 |     public struct Update {
    :
 49 |         }
 50 |
 51 |         private static func deserialize<T: DefaultsSerializable>(_ value: Any?, for key: DefaultsKey<T>) -> T.T? where T.T == T {
    |                                         `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
 52 |             guard let value = value else { return nil }
 53 |
/Users/admin/builder/spi-builder-workspace/Sources/PropertyWrappers.swift:28:23: warning: static property 'cached' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | #if swift(>=5.1)
26 | public struct SwiftyUserDefaultOptions: OptionSet {
   |               `- note: consider making struct 'SwiftyUserDefaultOptions' conform to the 'Sendable' protocol
27 |
28 |     public static let cached = SwiftyUserDefaultOptions(rawValue: 1 << 0)
   |                       |- warning: static property 'cached' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'cached' 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
29 |     public static let observed = SwiftyUserDefaultOptions(rawValue: 1 << 2)
30 |
/Users/admin/builder/spi-builder-workspace/Sources/PropertyWrappers.swift:29:23: warning: static property 'observed' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | #if swift(>=5.1)
26 | public struct SwiftyUserDefaultOptions: OptionSet {
   |               `- note: consider making struct 'SwiftyUserDefaultOptions' conform to the 'Sendable' protocol
27 |
28 |     public static let cached = SwiftyUserDefaultOptions(rawValue: 1 << 0)
29 |     public static let observed = SwiftyUserDefaultOptions(rawValue: 1 << 2)
   |                       |- warning: static property 'observed' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'observed' 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 |
31 |     public let rawValue: Int
[15/16] Compiling SwiftyUserDefaults DefaultsBridges.swift
[16/16] Compiling SwiftyUserDefaults PropertyWrappers.swift
/Users/admin/builder/spi-builder-workspace/Sources/PropertyWrappers.swift:28:23: warning: static property 'cached' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | #if swift(>=5.1)
26 | public struct SwiftyUserDefaultOptions: OptionSet {
   |               `- note: consider making struct 'SwiftyUserDefaultOptions' conform to the 'Sendable' protocol
27 |
28 |     public static let cached = SwiftyUserDefaultOptions(rawValue: 1 << 0)
   |                       |- warning: static property 'cached' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'cached' 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
29 |     public static let observed = SwiftyUserDefaultOptions(rawValue: 1 << 2)
30 |
/Users/admin/builder/spi-builder-workspace/Sources/PropertyWrappers.swift:29:23: warning: static property 'observed' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | #if swift(>=5.1)
26 | public struct SwiftyUserDefaultOptions: OptionSet {
   |               `- note: consider making struct 'SwiftyUserDefaultOptions' conform to the 'Sendable' protocol
27 |
28 |     public static let cached = SwiftyUserDefaultOptions(rawValue: 1 << 0)
29 |     public static let observed = SwiftyUserDefaultOptions(rawValue: 1 << 2)
   |                       |- warning: static property 'observed' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'observed' 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 |
31 |     public let rawValue: Int
/Users/admin/builder/spi-builder-workspace/Sources/Defaults.swift:35:12: warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | ///  ~~~
34 |
35 | public var Defaults = DefaultsAdapter<DefaultsKeys>(defaults: .standard, keyStore: .init())
   |            |- warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'Defaults' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: annotate 'Defaults' 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
36 |
37 | public extension UserDefaults {
Build complete! (11.43s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftyUserDefaults",
  "name" : "SwiftyUserDefaults",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.11"
    },
    {
      "name" : "ios",
      "version" : "9.0"
    },
    {
      "name" : "tvos",
      "version" : "9.0"
    },
    {
      "name" : "watchos",
      "version" : "2.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftyUserDefaults",
      "targets" : [
        "SwiftyUserDefaults"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftyUserDefaults",
      "module_type" : "SwiftTarget",
      "name" : "SwiftyUserDefaults",
      "path" : "Sources",
      "product_memberships" : [
        "SwiftyUserDefaults"
      ],
      "sources" : [
        "BuiltIns.swift",
        "Defaults+Observing.swift",
        "Defaults+StringToBool.swift",
        "Defaults+Subscripts.swift",
        "Defaults.swift",
        "DefaultsAdapter.swift",
        "DefaultsBridges.swift",
        "DefaultsKey.swift",
        "DefaultsKeys.swift",
        "DefaultsObserver.swift",
        "DefaultsSerializable.swift",
        "OptionalType.swift",
        "PropertyWrappers.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.