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 Linux on 2 Nov 2024 18:00:20 UTC.

Swift 6 data race errors: 5

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" 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.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/flight-school/money.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/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
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/flight-school/money.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" 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
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/7] Compiling Money Money.swift
/host/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 |     /**
/host/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 |     /**
/host/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 |
/host/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 |
/host/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 |
[4/7] Compiling Money JSONDecoder+Extensions.swift
[5/7] Compiling Money Currency.swift
[6/7] Emitting module Money
/host/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 |     /**
/host/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 |     /**
/host/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 |
/host/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 |
/host/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] Compiling Money JSONEncoder+Extensions.swift
Build complete! (9.56s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Money",
  "name" : "Money",
  "path" : "/host/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"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.