This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

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 UserDefault with Swift 6.0 for Linux.

Swift 6 data race errors: 4

Build Command

bash -c docker run --rm -v "checkouts-4609320-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/juliand665/UserDefault.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/juliand665/UserDefault
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 01ecd19 fix defaults not passing through nil convenience init
Cloned https://github.com/juliand665/UserDefault.git
Revision (git rev-parse @):
01ecd19faf558571571e6a5ad72d5feae43b3cbf
SUCCESS checkout https://github.com/juliand665/UserDefault.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $workDir
https://github.com/juliand665/UserDefault.git
Running build ...
bash -c docker run --rm -v "checkouts-4609320-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Fetching https://github.com/juliand665/HandyOperators.git
[1/77] Fetching handyoperators
Fetched https://github.com/juliand665/HandyOperators.git from cache (0.20s)
Computing version for https://github.com/juliand665/HandyOperators.git
Computed https://github.com/juliand665/HandyOperators.git at 2.0.1 (0.51s)
Creating working copy for https://github.com/juliand665/HandyOperators.git
Working copy of https://github.com/juliand665/HandyOperators.git resolved at 2.0.1
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-24593BA9C3E375BF.txt
[4/5] Compiling HandyOperators HandyOperators.swift
[5/5] Emitting module HandyOperators
[7/18] Emitting module UserDefault
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:3:13: warning: let 'encoder' is not concurrency-safe because non-'Sendable' type 'JSONEncoder' may have shared mutable state; this is an error in the Swift 6 language mode
 1 | import Foundation
 2 |
 3 | private let encoder = JSONEncoder()
   |             `- warning: let 'encoder' is not concurrency-safe because non-'Sendable' type 'JSONEncoder' may have shared mutable state; this is an error in the Swift 6 language mode
 4 | private let decoder = JSONDecoder()
 5 | public extension DefaultsValueConvertible where Self: Codable {
Foundation.JSONEncoder:1:12: note: class 'JSONEncoder' does not conform to the 'Sendable' protocol
 1 | open class JSONEncoder {
   |            `- note: class 'JSONEncoder' does not conform to the 'Sendable' protocol
 2 |     public struct OutputFormatting : OptionSet {
 3 |         public let rawValue: UInt
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:1:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 1 | import Foundation
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 2 |
 3 | private let encoder = JSONEncoder()
   |             |- note: annotate 'encoder' 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 | private let decoder = JSONDecoder()
 5 | public extension DefaultsValueConvertible where Self: Codable {
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:4:13: warning: let 'decoder' is not concurrency-safe because non-'Sendable' type 'JSONDecoder' may have shared mutable state; this is an error in the Swift 6 language mode
 2 |
 3 | private let encoder = JSONEncoder()
 4 | private let decoder = JSONDecoder()
   |             |- warning: let 'decoder' is not concurrency-safe because non-'Sendable' type 'JSONDecoder' may have shared mutable state; this is an error in the Swift 6 language mode
   |             |- note: annotate 'decoder' 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 | public extension DefaultsValueConvertible where Self: Codable {
 6 | 	init(defaultsRepresentation: Data) throws {
Foundation.JSONDecoder:1:12: note: class 'JSONDecoder' does not conform to the 'Sendable' protocol
 1 | open class JSONDecoder {
   |            `- note: class 'JSONDecoder' does not conform to the 'Sendable' protocol
 2 |     public enum DateDecodingStrategy {
 3 |         case deferredToDate
/host/spi-builder-workspace/Sources/UserDefault/DefaultsValue.swift:31:7: warning: associated value 'typeMismatch(found:expected:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
29 |
30 | public enum DefaultsError: Error {
31 | 	case typeMismatch(found: Any, expected: Any.Type)
   |       `- warning: associated value 'typeMismatch(found:expected:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
32 | 	case illegalValue(found: Any, for: Any.Type)
33 | 	case missingValue(key: String)
/host/spi-builder-workspace/Sources/UserDefault/DefaultsValue.swift:32:7: warning: associated value 'illegalValue(found:for:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
30 | public enum DefaultsError: Error {
31 | 	case typeMismatch(found: Any, expected: Any.Type)
32 | 	case illegalValue(found: Any, for: Any.Type)
   |       `- warning: associated value 'illegalValue(found:for:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
33 | 	case missingValue(key: String)
34 | }
[8/19] Compiling UserDefault UserDefaultState.swift
[9/19] Compiling UserDefault DefaultsValueConvertible.swift
[10/19] Compiling UserDefault IndirectDefaultsValueConvertible.swift
[11/19] Compiling UserDefault UserDefault.swift
[12/19] Compiling UserDefault Collection.swift
[13/19] Compiling UserDefault Dictionary.swift
[14/19] Compiling UserDefault RawRepresentable.swift
/host/spi-builder-workspace/Sources/UserDefault/DefaultsValue.swift:31:7: warning: associated value 'typeMismatch(found:expected:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
29 |
30 | public enum DefaultsError: Error {
31 | 	case typeMismatch(found: Any, expected: Any.Type)
   |       `- warning: associated value 'typeMismatch(found:expected:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
32 | 	case illegalValue(found: Any, for: Any.Type)
33 | 	case missingValue(key: String)
/host/spi-builder-workspace/Sources/UserDefault/DefaultsValue.swift:32:7: warning: associated value 'illegalValue(found:for:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
30 | public enum DefaultsError: Error {
31 | 	case typeMismatch(found: Any, expected: Any.Type)
32 | 	case illegalValue(found: Any, for: Any.Type)
   |       `- warning: associated value 'illegalValue(found:for:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
33 | 	case missingValue(key: String)
34 | }
[15/19] Compiling UserDefault DefaultsValue.swift
/host/spi-builder-workspace/Sources/UserDefault/DefaultsValue.swift:31:7: warning: associated value 'typeMismatch(found:expected:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
29 |
30 | public enum DefaultsError: Error {
31 | 	case typeMismatch(found: Any, expected: Any.Type)
   |       `- warning: associated value 'typeMismatch(found:expected:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
32 | 	case illegalValue(found: Any, for: Any.Type)
33 | 	case missingValue(key: String)
/host/spi-builder-workspace/Sources/UserDefault/DefaultsValue.swift:32:7: warning: associated value 'illegalValue(found:for:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
30 | public enum DefaultsError: Error {
31 | 	case typeMismatch(found: Any, expected: Any.Type)
32 | 	case illegalValue(found: Any, for: Any.Type)
   |       `- warning: associated value 'illegalValue(found:for:)' of 'Sendable'-conforming enum 'DefaultsError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
33 | 	case missingValue(key: String)
34 | }
[16/19] Compiling UserDefault NSCoding.swift
[17/19] Compiling UserDefault Optional.swift
[18/19] Compiling UserDefault Array.swift
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:3:13: warning: let 'encoder' is not concurrency-safe because non-'Sendable' type 'JSONEncoder' may have shared mutable state; this is an error in the Swift 6 language mode
 1 | import Foundation
 2 |
 3 | private let encoder = JSONEncoder()
   |             `- warning: let 'encoder' is not concurrency-safe because non-'Sendable' type 'JSONEncoder' may have shared mutable state; this is an error in the Swift 6 language mode
 4 | private let decoder = JSONDecoder()
 5 | public extension DefaultsValueConvertible where Self: Codable {
Foundation.JSONEncoder:1:12: note: class 'JSONEncoder' does not conform to the 'Sendable' protocol
 1 | open class JSONEncoder {
   |            `- note: class 'JSONEncoder' does not conform to the 'Sendable' protocol
 2 |     public struct OutputFormatting : OptionSet {
 3 |         public let rawValue: UInt
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:1:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 1 | import Foundation
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 2 |
 3 | private let encoder = JSONEncoder()
   |             |- note: annotate 'encoder' 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 | private let decoder = JSONDecoder()
 5 | public extension DefaultsValueConvertible where Self: Codable {
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:4:13: warning: let 'decoder' is not concurrency-safe because non-'Sendable' type 'JSONDecoder' may have shared mutable state; this is an error in the Swift 6 language mode
 2 |
 3 | private let encoder = JSONEncoder()
 4 | private let decoder = JSONDecoder()
   |             |- warning: let 'decoder' is not concurrency-safe because non-'Sendable' type 'JSONDecoder' may have shared mutable state; this is an error in the Swift 6 language mode
   |             |- note: annotate 'decoder' 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 | public extension DefaultsValueConvertible where Self: Codable {
 6 | 	init(defaultsRepresentation: Data) throws {
Foundation.JSONDecoder:1:12: note: class 'JSONDecoder' does not conform to the 'Sendable' protocol
 1 | open class JSONDecoder {
   |            `- note: class 'JSONDecoder' does not conform to the 'Sendable' protocol
 2 |     public enum DateDecodingStrategy {
 3 |         case deferredToDate
[19/19] Compiling UserDefault Codable.swift
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:3:13: warning: let 'encoder' is not concurrency-safe because non-'Sendable' type 'JSONEncoder' may have shared mutable state; this is an error in the Swift 6 language mode
 1 | import Foundation
 2 |
 3 | private let encoder = JSONEncoder()
   |             `- warning: let 'encoder' is not concurrency-safe because non-'Sendable' type 'JSONEncoder' may have shared mutable state; this is an error in the Swift 6 language mode
 4 | private let decoder = JSONDecoder()
 5 | public extension DefaultsValueConvertible where Self: Codable {
Foundation.JSONEncoder:1:12: note: class 'JSONEncoder' does not conform to the 'Sendable' protocol
 1 | open class JSONEncoder {
   |            `- note: class 'JSONEncoder' does not conform to the 'Sendable' protocol
 2 |     public struct OutputFormatting : OptionSet {
 3 |         public let rawValue: UInt
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:1:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 1 | import Foundation
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
 2 |
 3 | private let encoder = JSONEncoder()
   |             |- note: annotate 'encoder' 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 | private let decoder = JSONDecoder()
 5 | public extension DefaultsValueConvertible where Self: Codable {
/host/spi-builder-workspace/Sources/UserDefault/Conditional Conformances/Codable.swift:4:13: warning: let 'decoder' is not concurrency-safe because non-'Sendable' type 'JSONDecoder' may have shared mutable state; this is an error in the Swift 6 language mode
 2 |
 3 | private let encoder = JSONEncoder()
 4 | private let decoder = JSONDecoder()
   |             |- warning: let 'decoder' is not concurrency-safe because non-'Sendable' type 'JSONDecoder' may have shared mutable state; this is an error in the Swift 6 language mode
   |             |- note: annotate 'decoder' 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 | public extension DefaultsValueConvertible where Self: Codable {
 6 | 	init(defaultsRepresentation: Data) throws {
Foundation.JSONDecoder:1:12: note: class 'JSONDecoder' does not conform to the 'Sendable' protocol
 1 | open class JSONDecoder {
   |            `- note: class 'JSONDecoder' does not conform to the 'Sendable' protocol
 2 |     public enum DateDecodingStrategy {
 3 |         case deferredToDate
Build complete! (16.68s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "handyoperators",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "2.0.0",
            "upper_bound" : "3.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/juliand665/HandyOperators.git"
    }
  ],
  "manifest_display_name" : "UserDefault",
  "name" : "UserDefault",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "UserDefault",
      "targets" : [
        "UserDefault"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "UserDefaultTests",
      "module_type" : "SwiftTarget",
      "name" : "UserDefaultTests",
      "path" : "Tests/UserDefaultTests",
      "sources" : [
        "FailureTests.swift",
        "PropertyWrapperTests.swift",
        "SimpleTests.swift",
        "Tests.swift",
        "Types.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "UserDefault"
      ],
      "type" : "test"
    },
    {
      "c99name" : "UserDefault",
      "module_type" : "SwiftTarget",
      "name" : "UserDefault",
      "path" : "Sources/UserDefault",
      "product_dependencies" : [
        "HandyOperators"
      ],
      "product_memberships" : [
        "UserDefault"
      ],
      "sources" : [
        "Conditional Conformances/Array.swift",
        "Conditional Conformances/Codable.swift",
        "Conditional Conformances/Collection.swift",
        "Conditional Conformances/Dictionary.swift",
        "Conditional Conformances/NSCoding.swift",
        "Conditional Conformances/Optional.swift",
        "Conditional Conformances/RawRepresentable.swift",
        "DefaultsValue.swift",
        "DefaultsValueConvertible.swift",
        "IndirectDefaultsValueConvertible.swift",
        "UserDefault.swift",
        "UserDefaultState.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.