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 Money, reference main (dbce8a), with Swift 6.0 for macOS (SPM) on 29 Nov 2024 01:35:41 UTC.

Swift 6 data race errors: 5

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/flight-school/money.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/flight-school/money
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at dbce8a7 Make it easier to specify custom coding keys (#21)
Cloned https://github.com/flight-school/money.git
Revision (git rev-parse @):
dbce8a736db4f6d3a46b501732e74a29efed534d
SUCCESS checkout https://github.com/flight-school/money.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": "money",
      "name": "Money",
      "url": "https://github.com/flight-school/money.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/money",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/flight-school/money.git
[5/470] Fetching money
Fetched https://github.com/flight-school/money.git from cache (0.84s)
Creating working copy for https://github.com/flight-school/money.git
Working copy of https://github.com/flight-school/money.git resolved at main (dbce8a7)
warning: '.resolve-product-dependencies': dependency 'money' 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/flight-school/money.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/7] Compiling Money JSONEncoder+Extensions.swift
[4/7] Compiling Money JSONDecoder+Extensions.swift
[5/7] Compiling Money Currency.swift
[6/7] Compiling Money Money.swift
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:275:23: warning: static property 'requireExplicitCurrency' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
259 |  in the decoder's `userInfo` property.
260 |  */
261 | public struct MoneyDecodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyDecodingOptions' conform to the 'Sendable' protocol
262 |     public let rawValue: Int
263 |
    :
273 |      using the associated `Currency` type.
274 |      */
275 |     public static let requireExplicitCurrency = MoneyDecodingOptions(rawValue: 1 << 0)
    |                       |- warning: static property 'requireExplicitCurrency' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'requireExplicitCurrency' 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
276 |
277 |     /**
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:288:23: warning: static property 'requireStringAmount' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
259 |  in the decoder's `userInfo` property.
260 |  */
261 | public struct MoneyDecodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyDecodingOptions' conform to the 'Sendable' protocol
262 |     public let rawValue: Int
263 |
    :
286 |      - Bug: See https://bugs.swift.org/browse/SR-7054.
287 |      */
288 |     public static let requireStringAmount = MoneyDecodingOptions(rawValue: 1 << 1)
    |                       |- warning: static property 'requireStringAmount' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'requireStringAmount' 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
289 |
290 |     /**
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:294:23: warning: static property 'roundFloatingPointAmount' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
259 |  in the decoder's `userInfo` property.
260 |  */
261 | public struct MoneyDecodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyDecodingOptions' conform to the 'Sendable' protocol
262 |     public let rawValue: Int
263 |
    :
292 |      when decoding from a floating-point number.
293 |      */
294 |     public static let roundFloatingPointAmount = MoneyDecodingOptions(rawValue: 1 << 2)
    |                       |- warning: static property 'roundFloatingPointAmount' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'roundFloatingPointAmount' 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
295 | }
296 |
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:316:23: warning: static property 'omitCurrency' is not concurrency-safe because non-'Sendable' type 'MoneyEncodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
303 |  in the encoder's `userInfo` property.
304 |  */
305 | public struct MoneyEncodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyEncodingOptions' conform to the 'Sendable' protocol
306 |     public let rawValue: Int
307 |
    :
314 |      without specifying a currency.
315 |      */
316 |     public static let omitCurrency = MoneyEncodingOptions(rawValue: 1 << 0)
    |                       |- warning: static property 'omitCurrency' is not concurrency-safe because non-'Sendable' type 'MoneyEncodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'omitCurrency' 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
317 |
318 |
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:323:23: warning: static property 'encodeAmountAsString' is not concurrency-safe because non-'Sendable' type 'MoneyEncodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
303 |  in the encoder's `userInfo` property.
304 |  */
305 | public struct MoneyEncodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyEncodingOptions' conform to the 'Sendable' protocol
306 |     public let rawValue: Int
307 |
    :
321 |      instead of the built-in `Decimal` encoding.
322 |     */
323 |     public static let encodeAmountAsString = MoneyEncodingOptions(rawValue: 1 << 1)
    |                       |- warning: static property 'encodeAmountAsString' is not concurrency-safe because non-'Sendable' type 'MoneyEncodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'encodeAmountAsString' 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
324 | }
325 |
[7/7] Emitting module Money
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:275:23: warning: static property 'requireExplicitCurrency' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
259 |  in the decoder's `userInfo` property.
260 |  */
261 | public struct MoneyDecodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyDecodingOptions' conform to the 'Sendable' protocol
262 |     public let rawValue: Int
263 |
    :
273 |      using the associated `Currency` type.
274 |      */
275 |     public static let requireExplicitCurrency = MoneyDecodingOptions(rawValue: 1 << 0)
    |                       |- warning: static property 'requireExplicitCurrency' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'requireExplicitCurrency' 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
276 |
277 |     /**
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:288:23: warning: static property 'requireStringAmount' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
259 |  in the decoder's `userInfo` property.
260 |  */
261 | public struct MoneyDecodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyDecodingOptions' conform to the 'Sendable' protocol
262 |     public let rawValue: Int
263 |
    :
286 |      - Bug: See https://bugs.swift.org/browse/SR-7054.
287 |      */
288 |     public static let requireStringAmount = MoneyDecodingOptions(rawValue: 1 << 1)
    |                       |- warning: static property 'requireStringAmount' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'requireStringAmount' 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
289 |
290 |     /**
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:294:23: warning: static property 'roundFloatingPointAmount' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
259 |  in the decoder's `userInfo` property.
260 |  */
261 | public struct MoneyDecodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyDecodingOptions' conform to the 'Sendable' protocol
262 |     public let rawValue: Int
263 |
    :
292 |      when decoding from a floating-point number.
293 |      */
294 |     public static let roundFloatingPointAmount = MoneyDecodingOptions(rawValue: 1 << 2)
    |                       |- warning: static property 'roundFloatingPointAmount' is not concurrency-safe because non-'Sendable' type 'MoneyDecodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'roundFloatingPointAmount' 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
295 | }
296 |
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:316:23: warning: static property 'omitCurrency' is not concurrency-safe because non-'Sendable' type 'MoneyEncodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
303 |  in the encoder's `userInfo` property.
304 |  */
305 | public struct MoneyEncodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyEncodingOptions' conform to the 'Sendable' protocol
306 |     public let rawValue: Int
307 |
    :
314 |      without specifying a currency.
315 |      */
316 |     public static let omitCurrency = MoneyEncodingOptions(rawValue: 1 << 0)
    |                       |- warning: static property 'omitCurrency' is not concurrency-safe because non-'Sendable' type 'MoneyEncodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'omitCurrency' 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
317 |
318 |
/Users/admin/builder/spi-builder-workspace/Sources/Money/Money.swift:323:23: warning: static property 'encodeAmountAsString' is not concurrency-safe because non-'Sendable' type 'MoneyEncodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
303 |  in the encoder's `userInfo` property.
304 |  */
305 | public struct MoneyEncodingOptions: OptionSet {
    |               `- note: consider making struct 'MoneyEncodingOptions' conform to the 'Sendable' protocol
306 |     public let rawValue: Int
307 |
    :
321 |      instead of the built-in `Decimal` encoding.
322 |     */
323 |     public static let encodeAmountAsString = MoneyEncodingOptions(rawValue: 1 << 1)
    |                       |- warning: static property 'encodeAmountAsString' is not concurrency-safe because non-'Sendable' type 'MoneyEncodingOptions' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: annotate 'encodeAmountAsString' 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
324 | }
325 |
Build complete! (7.03s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Money",
  "name" : "Money",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Money",
      "targets" : [
        "Money"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "MoneyTests",
      "module_type" : "SwiftTarget",
      "name" : "MoneyTests",
      "path" : "Tests/MoneyTests",
      "sources" : [
        "CurrencyTests.swift",
        "DecodingTests.swift",
        "EncodingTests.swift",
        "MoneyTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "Money"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Money",
      "module_type" : "SwiftTarget",
      "name" : "Money",
      "path" : "Sources/Money",
      "product_memberships" : [
        "Money"
      ],
      "sources" : [
        "Currency.swift",
        "Extensions/JSONDecoder+Extensions.swift",
        "Extensions/JSONEncoder+Extensions.swift",
        "Money.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "4.0"
}
Done.