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 SwiftCustomLogger, reference 1.1.1 (5eea14), with Swift 6.0 for macOS (SPM) on 18 Apr 2025 19:19:57 UTC.

Swift 6 data race errors: 5

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64 -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

Build Log

========================================
RunAll
========================================
Builder version: 4.60.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/nerzh/swift-custom-logger.git
Reference: 1.1.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/nerzh/swift-custom-logger
 * tag               1.1.1      -> FETCH_HEAD
HEAD is now at 5eea143 Merge pull request #1 from makoni/master
Cloned https://github.com/nerzh/swift-custom-logger.git
Revision (git rev-parse @):
5eea143e6674a7a263b96cdf51e4db8bad07820c
SUCCESS checkout https://github.com/nerzh/swift-custom-logger.git at 1.1.1
Fetching https://github.com/apple/swift-log
[1/3832] Fetching swift-log
Fetched https://github.com/apple/swift-log from cache (1.10s)
Computing version for https://github.com/apple/swift-log
Computed https://github.com/apple/swift-log at 1.6.3 (0.41s)
Creating working copy for https://github.com/apple/swift-log
Working copy of https://github.com/apple/swift-log resolved at 1.6.3
========================================
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": "swift-custom-logger",
      "name": "SwiftCustomLogger",
      "url": "https://github.com/nerzh/swift-custom-logger.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/swift-custom-logger",
      "dependencies": [
        {
          "identity": "swift-log",
          "name": "swift-log",
          "url": "https://github.com/apple/swift-log",
          "version": "1.6.3",
          "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/swift-log",
          "dependencies": [
          ]
        }
      ]
    }
  ]
}
Fetching https://github.com/nerzh/swift-custom-logger.git
[1/37] Fetching swift-custom-logger
Fetched https://github.com/nerzh/swift-custom-logger.git from cache (0.61s)
Fetching https://github.com/apple/swift-log from cache
Fetched https://github.com/apple/swift-log from cache (0.54s)
Computing version for https://github.com/apple/swift-log
Computed https://github.com/apple/swift-log at 1.6.3 (0.03s)
Creating working copy for https://github.com/nerzh/swift-custom-logger.git
Working copy of https://github.com/nerzh/swift-custom-logger.git resolved at 1.1.1 (5eea143)
Creating working copy for https://github.com/apple/swift-log
Working copy of https://github.com/apple/swift-log resolved at 1.6.3
warning: '.resolve-product-dependencies': dependency 'swift-custom-logger' is not used by any target
Found 1 product dependencies
  - swift-log
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/nerzh/swift-custom-logger.git
https://github.com/nerzh/swift-custom-logger.git
{
  "dependencies" : [
    {
      "identity" : "swift-log",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.5.4",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/apple/swift-log"
    }
  ],
  "manifest_display_name" : "SwiftCustomLogger",
  "name" : "SwiftCustomLogger",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "SwiftCustomLogger",
      "targets" : [
        "SwiftCustomLogger"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftCustomLogger",
      "module_type" : "SwiftTarget",
      "name" : "SwiftCustomLogger",
      "path" : "Sources/SwiftCustomLogger",
      "product_dependencies" : [
        "Logging"
      ],
      "product_memberships" : [
        "SwiftCustomLogger"
      ],
      "sources" : [
        "BasicFormatter.swift",
        "CustomHandler.swift",
        "LogFormatter.swift",
        "Printer.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64 -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
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-5BDAB9E9C0126B9D.txt
[4/8] Compiling Logging MetadataProvider.swift
[5/8] Emitting module Logging
[6/8] Compiling Logging Locks.swift
[7/8] Compiling Logging Logging.swift
[8/8] Compiling Logging LogHandler.swift
[9/13] Emitting module SwiftCustomLogger
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/BasicFormatter.swift:56:23: warning: static property 'appleDefault' is not concurrency-safe because non-'Sendable' type 'BasicFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 2 | import Logging
 3 |
 4 | public struct BasicFormatter: LogFormatter {
   |               `- note: consider making struct 'BasicFormatter' conform to the 'Sendable' protocol
 5 |
 6 |     public let timestampFormatter: DateFormatter
   :
54 |     /// [apple/swift-log](https://github.com/apple/swift-log)'s log format
55 |     /// `2024-04-12T10:00:07-0310 error: Test error message`
56 |     public static let appleDefault = BasicFormatter(
   |                       |- warning: static property 'appleDefault' is not concurrency-safe because non-'Sendable' type 'BasicFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'appleDefault' 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
57 |         [
58 |             .timestamp,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/CustomHandler.swift:6:16: warning: stored property 'formatter' of 'Sendable'-conforming struct 'CustomHandler' has non-sendable type 'any LogFormatter'; this is an error in the Swift 6 language mode
 4 | public struct CustomHandler: LogHandler {
 5 |
 6 |     public let formatter: LogFormatter
   |                `- warning: stored property 'formatter' of 'Sendable'-conforming struct 'CustomHandler' has non-sendable type 'any LogFormatter'; this is an error in the Swift 6 language mode
 7 |     public let printer: Printer
 8 |     public var logLevel: Logger.Level = .info
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/LogFormatter.swift:28:17: note: protocol 'LogFormatter' does not conform to the 'Sendable' protocol
26 | }
27 |
28 | public protocol LogFormatter {
   |                 `- note: protocol 'LogFormatter' does not conform to the 'Sendable' protocol
29 |     var timestampFormatter: DateFormatter { get }
30 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/CustomHandler.swift:7:16: warning: stored property 'printer' of 'Sendable'-conforming struct 'CustomHandler' has non-sendable type 'any Printer'; this is an error in the Swift 6 language mode
 5 |
 6 |     public let formatter: LogFormatter
 7 |     public let printer: Printer
   |                `- warning: stored property 'printer' of 'Sendable'-conforming struct 'CustomHandler' has non-sendable type 'any Printer'; this is an error in the Swift 6 language mode
 8 |     public var logLevel: Logger.Level = .info
 9 |     private var prettyMetadata: String?
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/Printer.swift:23:17: note: protocol 'Printer' does not conform to the 'Sendable' protocol
21 | #endif
22 |
23 | public protocol Printer {
   |                 `- note: protocol 'Printer' does not conform to the 'Sendable' protocol
24 |     func handle(_ formattedLogLine: String)
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/CustomHandler.swift:4:15: warning: deprecated default implementation is used to satisfy instance method 'log(level:message:metadata:source:file:function:line:)' required by protocol 'LogHandler': You should implement this method instead of using the default implementation
 2 | import Logging
 3 |
 4 | public struct CustomHandler: LogHandler {
   |               `- warning: deprecated default implementation is used to satisfy instance method 'log(level:message:metadata:source:file:function:line:)' required by protocol 'LogHandler': You should implement this method instead of using the default implementation
 5 |
 6 |     public let formatter: LogFormatter
/Users/admin/builder/spi-builder-workspace/.build/checkouts/swift-log/Sources/Logging/LogHandler.swift:209:17: note: 'log(level:message:metadata:source:file:function:line:)' declared here
133 |     ///     - function: The function the log line was emitted from.
134 |     ///     - line: The line the log message was emitted from.
135 |     func log(
    |          `- note: requirement 'log(level:message:metadata:source:file:function:line:)' declared here
136 |         level: Logger.Level,
137 |         message: Logger.Message,
    :
207 | extension LogHandler {
208 |     @available(*, deprecated, message: "You should implement this method instead of using the default implementation")
209 |     public func log(
    |                 `- note: 'log(level:message:metadata:source:file:function:line:)' declared here
210 |         level: Logger.Level,
211 |         message: Logger.Message,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/Printer.swift:62:16: warning: static property 'stderr' is not concurrency-safe because non-'Sendable' type 'OutputStream' may have shared mutable state; this is an error in the Swift 6 language mode
47 | }
48 |
49 | private struct OutputStream: TextOutputStream {
   |                `- note: consider making struct 'OutputStream' conform to the 'Sendable' protocol
50 |
51 |     public let file: UnsafeMutablePointer<FILE>
   :
60 |
61 |     #if canImport(Darwin.C)
62 |     static let stderr = OutputStream(file: Darwin.stderr)
   |                |- warning: static property 'stderr' is not concurrency-safe because non-'Sendable' type 'OutputStream' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'stderr' 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
63 |     static let stdout = OutputStream(file: Darwin.stdout)
64 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/Printer.swift:63:16: warning: static property 'stdout' is not concurrency-safe because non-'Sendable' type 'OutputStream' may have shared mutable state; this is an error in the Swift 6 language mode
47 | }
48 |
49 | private struct OutputStream: TextOutputStream {
   |                `- note: consider making struct 'OutputStream' conform to the 'Sendable' protocol
50 |
51 |     public let file: UnsafeMutablePointer<FILE>
   :
61 |     #if canImport(Darwin.C)
62 |     static let stderr = OutputStream(file: Darwin.stderr)
63 |     static let stdout = OutputStream(file: Darwin.stdout)
   |                |- warning: static property 'stdout' is not concurrency-safe because non-'Sendable' type 'OutputStream' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'stdout' 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
64 |
65 |     #elseif canImport(Android)
[10/13] Compiling SwiftCustomLogger LogFormatter.swift
[11/13] Compiling SwiftCustomLogger Printer.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/Printer.swift:62:16: warning: static property 'stderr' is not concurrency-safe because non-'Sendable' type 'OutputStream' may have shared mutable state; this is an error in the Swift 6 language mode
47 | }
48 |
49 | private struct OutputStream: TextOutputStream {
   |                `- note: consider making struct 'OutputStream' conform to the 'Sendable' protocol
50 |
51 |     public let file: UnsafeMutablePointer<FILE>
   :
60 |
61 |     #if canImport(Darwin.C)
62 |     static let stderr = OutputStream(file: Darwin.stderr)
   |                |- warning: static property 'stderr' is not concurrency-safe because non-'Sendable' type 'OutputStream' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'stderr' 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
63 |     static let stdout = OutputStream(file: Darwin.stdout)
64 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/Printer.swift:63:16: warning: static property 'stdout' is not concurrency-safe because non-'Sendable' type 'OutputStream' may have shared mutable state; this is an error in the Swift 6 language mode
47 | }
48 |
49 | private struct OutputStream: TextOutputStream {
   |                `- note: consider making struct 'OutputStream' conform to the 'Sendable' protocol
50 |
51 |     public let file: UnsafeMutablePointer<FILE>
   :
61 |     #if canImport(Darwin.C)
62 |     static let stderr = OutputStream(file: Darwin.stderr)
63 |     static let stdout = OutputStream(file: Darwin.stdout)
   |                |- warning: static property 'stdout' is not concurrency-safe because non-'Sendable' type 'OutputStream' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: annotate 'stdout' 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
64 |
65 |     #elseif canImport(Android)
[12/13] Compiling SwiftCustomLogger CustomHandler.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/BasicFormatter.swift:56:23: warning: static property 'appleDefault' is not concurrency-safe because non-'Sendable' type 'BasicFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 2 | import Logging
 3 |
 4 | public struct BasicFormatter: LogFormatter {
   |               `- note: consider making struct 'BasicFormatter' conform to the 'Sendable' protocol
 5 |
 6 |     public let timestampFormatter: DateFormatter
   :
54 |     /// [apple/swift-log](https://github.com/apple/swift-log)'s log format
55 |     /// `2024-04-12T10:00:07-0310 error: Test error message`
56 |     public static let appleDefault = BasicFormatter(
   |                       |- warning: static property 'appleDefault' is not concurrency-safe because non-'Sendable' type 'BasicFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'appleDefault' 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
57 |         [
58 |             .timestamp,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/CustomHandler.swift:6:16: warning: stored property 'formatter' of 'Sendable'-conforming struct 'CustomHandler' has non-sendable type 'any LogFormatter'; this is an error in the Swift 6 language mode
 4 | public struct CustomHandler: LogHandler {
 5 |
 6 |     public let formatter: LogFormatter
   |                `- warning: stored property 'formatter' of 'Sendable'-conforming struct 'CustomHandler' has non-sendable type 'any LogFormatter'; this is an error in the Swift 6 language mode
 7 |     public let printer: Printer
 8 |     public var logLevel: Logger.Level = .info
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/LogFormatter.swift:28:17: note: protocol 'LogFormatter' does not conform to the 'Sendable' protocol
26 | }
27 |
28 | public protocol LogFormatter {
   |                 `- note: protocol 'LogFormatter' does not conform to the 'Sendable' protocol
29 |     var timestampFormatter: DateFormatter { get }
30 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/CustomHandler.swift:7:16: warning: stored property 'printer' of 'Sendable'-conforming struct 'CustomHandler' has non-sendable type 'any Printer'; this is an error in the Swift 6 language mode
 5 |
 6 |     public let formatter: LogFormatter
 7 |     public let printer: Printer
   |                `- warning: stored property 'printer' of 'Sendable'-conforming struct 'CustomHandler' has non-sendable type 'any Printer'; this is an error in the Swift 6 language mode
 8 |     public var logLevel: Logger.Level = .info
 9 |     private var prettyMetadata: String?
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/Printer.swift:23:17: note: protocol 'Printer' does not conform to the 'Sendable' protocol
21 | #endif
22 |
23 | public protocol Printer {
   |                 `- note: protocol 'Printer' does not conform to the 'Sendable' protocol
24 |     func handle(_ formattedLogLine: String)
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/CustomHandler.swift:4:15: warning: deprecated default implementation is used to satisfy instance method 'log(level:message:metadata:source:file:function:line:)' required by protocol 'LogHandler': You should implement this method instead of using the default implementation
 2 | import Logging
 3 |
 4 | public struct CustomHandler: LogHandler {
   |               `- warning: deprecated default implementation is used to satisfy instance method 'log(level:message:metadata:source:file:function:line:)' required by protocol 'LogHandler': You should implement this method instead of using the default implementation
 5 |
 6 |     public let formatter: LogFormatter
/Users/admin/builder/spi-builder-workspace/.build/checkouts/swift-log/Sources/Logging/LogHandler.swift:209:17: note: 'log(level:message:metadata:source:file:function:line:)' declared here
133 |     ///     - function: The function the log line was emitted from.
134 |     ///     - line: The line the log message was emitted from.
135 |     func log(
    |          `- note: requirement 'log(level:message:metadata:source:file:function:line:)' declared here
136 |         level: Logger.Level,
137 |         message: Logger.Message,
    :
207 | extension LogHandler {
208 |     @available(*, deprecated, message: "You should implement this method instead of using the default implementation")
209 |     public func log(
    |                 `- note: 'log(level:message:metadata:source:file:function:line:)' declared here
210 |         level: Logger.Level,
211 |         message: Logger.Message,
[13/13] Compiling SwiftCustomLogger BasicFormatter.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftCustomLogger/BasicFormatter.swift:56:23: warning: static property 'appleDefault' is not concurrency-safe because non-'Sendable' type 'BasicFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 2 | import Logging
 3 |
 4 | public struct BasicFormatter: LogFormatter {
   |               `- note: consider making struct 'BasicFormatter' conform to the 'Sendable' protocol
 5 |
 6 |     public let timestampFormatter: DateFormatter
   :
54 |     /// [apple/swift-log](https://github.com/apple/swift-log)'s log format
55 |     /// `2024-04-12T10:00:07-0310 error: Test error message`
56 |     public static let appleDefault = BasicFormatter(
   |                       |- warning: static property 'appleDefault' is not concurrency-safe because non-'Sendable' type 'BasicFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: annotate 'appleDefault' 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
57 |         [
58 |             .timestamp,
Build complete! (7.20s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "swift-log",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.5.4",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/apple/swift-log"
    }
  ],
  "manifest_display_name" : "SwiftCustomLogger",
  "name" : "SwiftCustomLogger",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "SwiftCustomLogger",
      "targets" : [
        "SwiftCustomLogger"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftCustomLogger",
      "module_type" : "SwiftTarget",
      "name" : "SwiftCustomLogger",
      "path" : "Sources/SwiftCustomLogger",
      "product_dependencies" : [
        "Logging"
      ],
      "product_memberships" : [
        "SwiftCustomLogger"
      ],
      "sources" : [
        "BasicFormatter.swift",
        "CustomHandler.swift",
        "LogFormatter.swift",
        "Printer.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.