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 swift-w3c-trace-context, reference 0.6.0 (9913eb), with Swift 6.0 for macOS (SPM) on 16 Sep 2024 06:08:26 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.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.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/slashmo/swift-w3c-trace-context.git
Reference: 0.6.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/slashmo/swift-w3c-trace-context
 * tag               0.6.0      -> FETCH_HEAD
HEAD is now at 9913eb7 Use 0.6.0 🔖 in installation instructions 📖 (#12)
Cloned https://github.com/slashmo/swift-w3c-trace-context.git
Revision (git rev-parse @):
9913eb786060af7c5699af86857e2292fe32acf8
SUCCESS checkout https://github.com/slashmo/swift-w3c-trace-context.git at 0.6.0
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/slashmo/swift-w3c-trace-context.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.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-117DEE11B69C53C9.txt
[3/8] Compiling W3CTraceContext TraceState.swift
[4/8] Compiling W3CTraceContext TraceParent.swift
[5/8] Emitting module W3CTraceContext
/Users/admin/builder/spi-builder-workspace/Sources/W3CTraceContext/TraceFlags.swift:23:23: warning: static property 'sampled' is not concurrency-safe because non-'Sendable' type 'TraceFlags' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | /// Represents an 8-bit field that controls tracing flags such as sampling.
15 | public struct TraceFlags: OptionSet {
   |               `- note: consider making struct 'TraceFlags' conform to the 'Sendable' protocol
16 |     public let rawValue: UInt8
17 |
   :
21 |
22 |     /// [W3C TraceContext: Sampled flag](https://www.w3.org/TR/2020/REC-trace-context-1-20200206/#sampled-flag)
23 |     public static let sampled = TraceFlags(rawValue: 1 << 0)
   |                       |- warning: static property 'sampled' is not concurrency-safe because non-'Sendable' type 'TraceFlags' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'sampled' 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
24 | }
25 |
[6/8] Compiling W3CTraceContext TraceID.swift
[7/8] Compiling W3CTraceContext TraceContext.swift
/Users/admin/builder/spi-builder-workspace/Sources/W3CTraceContext/TraceFlags.swift:23:23: warning: static property 'sampled' is not concurrency-safe because non-'Sendable' type 'TraceFlags' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | /// Represents an 8-bit field that controls tracing flags such as sampling.
15 | public struct TraceFlags: OptionSet {
   |               `- note: consider making struct 'TraceFlags' conform to the 'Sendable' protocol
16 |     public let rawValue: UInt8
17 |
   :
21 |
22 |     /// [W3C TraceContext: Sampled flag](https://www.w3.org/TR/2020/REC-trace-context-1-20200206/#sampled-flag)
23 |     public static let sampled = TraceFlags(rawValue: 1 << 0)
   |                       |- warning: static property 'sampled' is not concurrency-safe because non-'Sendable' type 'TraceFlags' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'sampled' 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
24 | }
25 |
[8/8] Compiling W3CTraceContext TraceFlags.swift
/Users/admin/builder/spi-builder-workspace/Sources/W3CTraceContext/TraceFlags.swift:23:23: warning: static property 'sampled' is not concurrency-safe because non-'Sendable' type 'TraceFlags' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | /// Represents an 8-bit field that controls tracing flags such as sampling.
15 | public struct TraceFlags: OptionSet {
   |               `- note: consider making struct 'TraceFlags' conform to the 'Sendable' protocol
16 |     public let rawValue: UInt8
17 |
   :
21 |
22 |     /// [W3C TraceContext: Sampled flag](https://www.w3.org/TR/2020/REC-trace-context-1-20200206/#sampled-flag)
23 |     public static let sampled = TraceFlags(rawValue: 1 << 0)
   |                       |- warning: static property 'sampled' is not concurrency-safe because non-'Sendable' type 'TraceFlags' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'sampled' 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
24 | }
25 |
Build complete! (2.68s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "swift-w3c-trace-context",
  "name" : "swift-w3c-trace-context",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "W3CTraceContext",
      "targets" : [
        "W3CTraceContext"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "W3CTraceContextTests",
      "module_type" : "SwiftTarget",
      "name" : "W3CTraceContextTests",
      "path" : "Tests/W3CTraceContextTests",
      "sources" : [
        "TestRandomNumberGenerator.swift",
        "TraceContextTests.swift",
        "TraceIDTests.swift",
        "TraceParentTests.swift",
        "TraceStateTests.swift"
      ],
      "target_dependencies" : [
        "W3CTraceContext"
      ],
      "type" : "test"
    },
    {
      "c99name" : "W3CTraceContext",
      "module_type" : "SwiftTarget",
      "name" : "W3CTraceContext",
      "path" : "Sources/W3CTraceContext",
      "product_memberships" : [
        "W3CTraceContext"
      ],
      "sources" : [
        "TraceContext.swift",
        "TraceFlags.swift",
        "TraceID.swift",
        "TraceParent.swift",
        "TraceState.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
Done.