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-nuid, reference main (204d41), with Swift 6.0 for macOS (SPM) on 15 Sep 2024 13:13:02 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/Jarema/swift-nuid.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Jarema/swift-nuid
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 204d414 Make names more idiomatic
Cloned https://github.com/Jarema/swift-nuid.git
Revision (git rev-parse @):
204d414f773251458d1b14cc1531bb629875f516
SUCCESS checkout https://github.com/Jarema/swift-nuid.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/Jarema/swift-nuid.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/4] Emitting module Nuid
/Users/admin/builder/spi-builder-workspace/Sources/Nuid/Nuid.swift:83:5: warning: var 'globalNUID' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
81 |
82 | // Global NUID
83 | var globalNUID = LockedNuid()
   |     |- warning: var 'globalNUID' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |     |- note: convert 'globalNUID' to a 'let' constant to make 'Sendable' shared state immutable
   |     |- note: annotate 'globalNUID' 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
84 |
85 | // Generate the next NUID string from the global locked NUID instance.
[4/4] Compiling Nuid Nuid.swift
/Users/admin/builder/spi-builder-workspace/Sources/Nuid/Nuid.swift:83:5: warning: var 'globalNUID' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
81 |
82 | // Global NUID
83 | var globalNUID = LockedNuid()
   |     |- warning: var 'globalNUID' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |     |- note: convert 'globalNUID' to a 'let' constant to make 'Sendable' shared state immutable
   |     |- note: annotate 'globalNUID' 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
84 |
85 | // Generate the next NUID string from the global locked NUID instance.
Build complete! (6.09s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "swift-nuid",
  "name" : "swift-nuid",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Nuid",
      "targets" : [
        "Nuid"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "NuidTests",
      "module_type" : "SwiftTarget",
      "name" : "NuidTests",
      "path" : "Tests/NuidTests",
      "sources" : [
        "NuidTests.swift"
      ],
      "target_dependencies" : [
        "Nuid"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Nuid",
      "module_type" : "SwiftTarget",
      "name" : "Nuid",
      "path" : "Sources/Nuid",
      "product_memberships" : [
        "Nuid"
      ],
      "sources" : [
        "Nuid.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Done.