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 FlightLog, reference main (5f89e3), with Swift 6.0 for macOS (SPM) on 2 Nov 2024 22:15:44 UTC.

Swift 6 data race errors: 3

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

Build Log

========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/453jerry/FlightLog.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/453jerry/FlightLog
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 5f89e3b test(logrecordertest): fix test case to support old version of watchOS and tvOS
Cloned https://github.com/453jerry/FlightLog.git
Revision (git rev-parse @):
5f89e3b4efa7a6f55de5c80d34cc86063bdeeafc
SUCCESS checkout https://github.com/453jerry/FlightLog.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": "flightlog",
      "name": "FlightLog",
      "url": "https://github.com/453jerry/FlightLog.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/FlightLog",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/453jerry/FlightLog.git
[1/78] Fetching flightlog
Fetched https://github.com/453jerry/FlightLog.git from cache (0.67s)
Creating working copy for https://github.com/453jerry/FlightLog.git
Working copy of https://github.com/453jerry/FlightLog.git resolved at main (5f89e3b)
warning: '.resolve-product-dependencies': dependency 'flightlog' 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/453jerry/FlightLog.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
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/8] Compiling FlightLog FileHandleFactory.swift
[4/8] Compiling FlightLog Log.swift
/Users/admin/builder/spi-builder-workspace/Sources/FlightLog/Log.swift:42:16: warning: static property 'ignorLevelValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 |     }
41 |
42 |     static var ignorLevelValue: UInt8 = 0x0
   |                |- warning: static property 'ignorLevelValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'ignorLevelValue' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'ignorLevelValue' 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
43 |
44 |     public static func setIngore(levels: [Log]) {
/Users/admin/builder/spi-builder-workspace/Sources/FlightLog/Log.swift:51:23: warning: static property 'outputMethod' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
49 |     }
50 |
51 |     public static var outputMethod: OutputMethod = .print
   |                       |- warning: static property 'outputMethod' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'outputMethod' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'outputMethod' 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
52 |
53 |     /// 记录日志
[5/8] Compiling FlightLog FileManagerProtocol.swift
[6/8] Compiling FlightLog Utility.swift
[7/8] Emitting module FlightLog
/Users/admin/builder/spi-builder-workspace/Sources/FlightLog/Log.swift:42:16: warning: static property 'ignorLevelValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 |     }
41 |
42 |     static var ignorLevelValue: UInt8 = 0x0
   |                |- warning: static property 'ignorLevelValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'ignorLevelValue' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'ignorLevelValue' 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
43 |
44 |     public static func setIngore(levels: [Log]) {
/Users/admin/builder/spi-builder-workspace/Sources/FlightLog/Log.swift:51:23: warning: static property 'outputMethod' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
49 |     }
50 |
51 |     public static var outputMethod: OutputMethod = .print
   |                       |- warning: static property 'outputMethod' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'outputMethod' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'outputMethod' 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
52 |
53 |     /// 记录日志
/Users/admin/builder/spi-builder-workspace/Sources/FlightLog/LogReorder.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogRecorder' may have shared mutable state; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class LogRecorder {
   |              `- note: class 'LogRecorder' does not conform to the 'Sendable' protocol
11 |     public static let shared = LogRecorder()
   |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogRecorder' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'shared' 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
12 |
13 |     public let rootPath: String
[8/8] Compiling FlightLog LogReorder.swift
/Users/admin/builder/spi-builder-workspace/Sources/FlightLog/LogReorder.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogRecorder' may have shared mutable state; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class LogRecorder {
   |              `- note: class 'LogRecorder' does not conform to the 'Sendable' protocol
11 |     public static let shared = LogRecorder()
   |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogRecorder' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'shared' 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
12 |
13 |     public let rootPath: String
Build complete! (7.81s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "FlightLog",
  "name" : "FlightLog",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "FlightLog",
      "targets" : [
        "FlightLog"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FlightLogTests",
      "module_type" : "SwiftTarget",
      "name" : "FlightLogTests",
      "path" : "Tests/FlightLogTests",
      "sources" : [
        "LogRecorderTests.swift",
        "LogTests.swift"
      ],
      "target_dependencies" : [
        "FlightLog"
      ],
      "type" : "test"
    },
    {
      "c99name" : "FlightLog",
      "module_type" : "SwiftTarget",
      "name" : "FlightLog",
      "path" : "Sources/FlightLog",
      "product_memberships" : [
        "FlightLog"
      ],
      "sources" : [
        "Log.swift",
        "LogReorder.swift",
        "UnitTestSupport/FileHandleFactory.swift",
        "UnitTestSupport/FileManagerProtocol.swift",
        "Utility.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.4"
}
Done.