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 DictionaryEncoder, reference master (87eef9), with Swift 6.0 for Linux on 26 Nov 2024 10:57:22 UTC.

Swift 6 data race errors: 3

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 -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/adam-fowler/dictionary-encoder.git
Reference: master
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/adam-fowler/dictionary-encoder
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 87eef97 Travis config update
Cloned https://github.com/adam-fowler/dictionary-encoder.git
Revision (git rev-parse @):
87eef97292dc2f058e02a1d4b30c9419e1c99e72
SUCCESS checkout https://github.com/adam-fowler/dictionary-encoder.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/adam-fowler/dictionary-encoder.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 -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 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/4] Emitting module DictionaryEncoder
/host/spi-builder-workspace/Sources/DictionaryEncoder/DictionaryEncoder.swift:75:27: warning: static property 'prettyPrinted' is not concurrency-safe because non-'Sendable' type 'DictionaryEncoder.OutputFormatting' may have shared mutable state; this is an error in the Swift 6 language mode
  63 |
  64 |     /// The formatting of the output dictionary data.
  65 |     public struct OutputFormatting : OptionSet {
     |                   `- note: consider making struct 'OutputFormatting' conform to the 'Sendable' protocol
  66 |         /// The format's default value.
  67 |         public let rawValue: UInt
     :
  73 |
  74 |         /// Produce human-readable text in dictionary with indented output.
  75 |         public static let prettyPrinted = OutputFormatting(rawValue: 1 << 0)
     |                           |- warning: static property 'prettyPrinted' is not concurrency-safe because non-'Sendable' type 'DictionaryEncoder.OutputFormatting' may have shared mutable state; this is an error in the Swift 6 language mode
     |                           |- note: annotate 'prettyPrinted' 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
  76 |
  77 |         /// Produce JSON with dictionary keys sorted in lexicographic order.
/host/spi-builder-workspace/Sources/DictionaryEncoder/DictionaryEncoder.swift:79:27: warning: static property 'sortedKeys' is not concurrency-safe because non-'Sendable' type 'DictionaryEncoder.OutputFormatting' may have shared mutable state; this is an error in the Swift 6 language mode
  63 |
  64 |     /// The formatting of the output dictionary data.
  65 |     public struct OutputFormatting : OptionSet {
     |                   `- note: consider making struct 'OutputFormatting' conform to the 'Sendable' protocol
  66 |         /// The format's default value.
  67 |         public let rawValue: UInt
     :
  77 |         /// Produce JSON with dictionary keys sorted in lexicographic order.
  78 |         @available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *)
  79 |         public static let sortedKeys    = OutputFormatting(rawValue: 1 << 1)
     |                           |- warning: static property 'sortedKeys' is not concurrency-safe because non-'Sendable' type 'DictionaryEncoder.OutputFormatting' may have shared mutable state; this is an error in the Swift 6 language mode
     |                           |- note: annotate 'sortedKeys' 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
  80 |     }
  81 |
/host/spi-builder-workspace/Sources/DictionaryEncoder/DictionaryEncoder.swift:2545:17: warning: var '_iso8601Formatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
2543 | // NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
2544 | @available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
2545 | fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
     |                 |- warning: var '_iso8601Formatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                 |- note: convert '_iso8601Formatter' to a 'let' constant to make 'Sendable' shared state immutable
     |                 |- note: annotate '_iso8601Formatter' 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
2546 |     let formatter = ISO8601DateFormatter()
2547 |     formatter.formatOptions = .withInternetDateTime
[4/4] Compiling DictionaryEncoder DictionaryEncoder.swift
/host/spi-builder-workspace/Sources/DictionaryEncoder/DictionaryEncoder.swift:75:27: warning: static property 'prettyPrinted' is not concurrency-safe because non-'Sendable' type 'DictionaryEncoder.OutputFormatting' may have shared mutable state; this is an error in the Swift 6 language mode
  63 |
  64 |     /// The formatting of the output dictionary data.
  65 |     public struct OutputFormatting : OptionSet {
     |                   `- note: consider making struct 'OutputFormatting' conform to the 'Sendable' protocol
  66 |         /// The format's default value.
  67 |         public let rawValue: UInt
     :
  73 |
  74 |         /// Produce human-readable text in dictionary with indented output.
  75 |         public static let prettyPrinted = OutputFormatting(rawValue: 1 << 0)
     |                           |- warning: static property 'prettyPrinted' is not concurrency-safe because non-'Sendable' type 'DictionaryEncoder.OutputFormatting' may have shared mutable state; this is an error in the Swift 6 language mode
     |                           |- note: annotate 'prettyPrinted' 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
  76 |
  77 |         /// Produce JSON with dictionary keys sorted in lexicographic order.
/host/spi-builder-workspace/Sources/DictionaryEncoder/DictionaryEncoder.swift:79:27: warning: static property 'sortedKeys' is not concurrency-safe because non-'Sendable' type 'DictionaryEncoder.OutputFormatting' may have shared mutable state; this is an error in the Swift 6 language mode
  63 |
  64 |     /// The formatting of the output dictionary data.
  65 |     public struct OutputFormatting : OptionSet {
     |                   `- note: consider making struct 'OutputFormatting' conform to the 'Sendable' protocol
  66 |         /// The format's default value.
  67 |         public let rawValue: UInt
     :
  77 |         /// Produce JSON with dictionary keys sorted in lexicographic order.
  78 |         @available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *)
  79 |         public static let sortedKeys    = OutputFormatting(rawValue: 1 << 1)
     |                           |- warning: static property 'sortedKeys' is not concurrency-safe because non-'Sendable' type 'DictionaryEncoder.OutputFormatting' may have shared mutable state; this is an error in the Swift 6 language mode
     |                           |- note: annotate 'sortedKeys' 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
  80 |     }
  81 |
/host/spi-builder-workspace/Sources/DictionaryEncoder/DictionaryEncoder.swift:2545:17: warning: var '_iso8601Formatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
2543 | // NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
2544 | @available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
2545 | fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
     |                 |- warning: var '_iso8601Formatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                 |- note: convert '_iso8601Formatter' to a 'let' constant to make 'Sendable' shared state immutable
     |                 |- note: annotate '_iso8601Formatter' 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
2546 |     let formatter = ISO8601DateFormatter()
2547 |     formatter.formatOptions = .withInternetDateTime
Build complete! (12.36s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "DictionaryEncoder",
  "name" : "DictionaryEncoder",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "DictionaryEncoder",
      "targets" : [
        "DictionaryEncoder"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "DictionaryEncoderTests",
      "module_type" : "SwiftTarget",
      "name" : "DictionaryEncoderTests",
      "path" : "Tests/DictionaryEncoderTests",
      "sources" : [
        "DictionaryEncoderTests.swift"
      ],
      "target_dependencies" : [
        "DictionaryEncoder"
      ],
      "type" : "test"
    },
    {
      "c99name" : "DictionaryEncoder",
      "module_type" : "SwiftTarget",
      "name" : "DictionaryEncoder",
      "path" : "Sources/DictionaryEncoder",
      "product_memberships" : [
        "DictionaryEncoder"
      ],
      "sources" : [
        "DictionaryEncoder.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.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.