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 clt-logger, reference 0.9.0 (d2d2be), with Swift 6.0 for macOS (SPM) on 4 Nov 2024 23:59:57 UTC.

Swift 6 data race errors: 5

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/xcode-actions/clt-logger.git
Reference: 0.9.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/xcode-actions/clt-logger
 * tag               0.9.0      -> FETCH_HEAD
HEAD is now at d2d2be7 Use a better Xcode detection
Cloned https://github.com/xcode-actions/clt-logger.git
Revision (git rev-parse @):
d2d2be799fde3e564f6f2c35b708403bf609a0fb
SUCCESS checkout https://github.com/xcode-actions/clt-logger.git at 0.9.0
Fetching https://github.com/apple/swift-log.git
[1/3660] Fetching swift-log
Fetched https://github.com/apple/swift-log.git from cache (1.09s)
Computing version for https://github.com/apple/swift-log.git
Computed https://github.com/apple/swift-log.git at 1.5.1 (0.71s)
Creating working copy for https://github.com/apple/swift-log.git
Working copy of https://github.com/apple/swift-log.git resolved at 1.5.1
========================================
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": "clt-logger",
      "name": "clt-logger",
      "url": "https://github.com/xcode-actions/clt-logger.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/clt-logger",
      "dependencies": [
        {
          "identity": "swift-log",
          "name": "swift-log",
          "url": "https://github.com/apple/swift-log.git",
          "version": "1.6.1",
          "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/swift-log",
          "dependencies": [
          ]
        }
      ]
    }
  ]
}
Fetching https://github.com/xcode-actions/clt-logger.git
[1/518] Fetching clt-logger
Fetched https://github.com/xcode-actions/clt-logger.git from cache (1.15s)
Fetching https://github.com/apple/swift-log.git from cache
Fetched https://github.com/apple/swift-log.git from cache (0.55s)
Computing version for https://github.com/apple/swift-log.git
Computed https://github.com/apple/swift-log.git at 1.6.1 (0.52s)
Creating working copy for https://github.com/xcode-actions/clt-logger.git
Working copy of https://github.com/xcode-actions/clt-logger.git resolved at 0.9.0 (d2d2be7)
Creating working copy for https://github.com/apple/swift-log.git
Working copy of https://github.com/apple/swift-log.git resolved at 1.6.1
warning: '.resolve-product-dependencies': dependency 'clt-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/xcode-actions/clt-logger.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/3] Write sources
[2/3] Write swift-version--7754E27361AE5C74.txt
[4/8] Compiling Logging LogHandler.swift
[5/8] Compiling Logging MetadataProvider.swift
[6/8] Compiling Logging Logging.swift
[7/8] Emitting module Logging
[8/8] Compiling Logging Locks.swift
[9/13] Compiling CLTLogger String+Utils.swift
[10/13] Compiling CLTLogger NSLock+Linux.swift
[11/13] Compiling CLTLogger CLTLogger.swift
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:99:21: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CLTLogger.MultilineMode' may have shared mutable state; this is an error in the Swift 6 language mode
 65 |
 66 | 	 For now there is no option to allow multilines metadata. */
 67 | 	public enum MultilineMode {
    |              `- note: consider making enum 'MultilineMode' conform to the 'Sendable' protocol
 68 | 		/**
 69 | 		 The new lines in logs are replaced by the given value, the metadata are printed on the same line as the log.
    :
 97 | 		case allMultiline
 98 |
 99 | 		public static let `default` = Self.disallowMultiline
    |                     |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CLTLogger.MultilineMode' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: annotate 'default' 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
100 | 	}
101 |
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:233:21: warning: static property 'lock' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
231 | 	 *  <https://twitter.com/grynspan/status/1392080373752995849>.
232 | 	 * There is OSAllocatedUnfairLock which exists and is good, but is also not available on Linux. */
233 | 	private static var lock = NSLock()
    |                     |- warning: static property 'lock' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: convert 'lock' to a 'let' constant to make 'Sendable' shared state immutable
    |                     |- note: annotate 'lock' 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
234 |
235 | 	private var flatMetadataCache = [String]()
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:134:13: warning: stored property 'multilineMode' of 'Sendable'-conforming struct 'CLTLogger' has non-sendable type 'CLTLogger.MultilineMode'; this is an error in the Swift 6 language mode
 65 |
 66 | 	 For now there is no option to allow multilines metadata. */
 67 | 	public enum MultilineMode {
    |              `- note: consider making enum 'MultilineMode' conform to the 'Sendable' protocol
 68 | 		/**
 69 | 		 The new lines in logs are replaced by the given value, the metadata are printed on the same line as the log.
    :
132 |
133 | 	public let outputFileDescriptor: FileDescriptor
134 | 	public let multilineMode: MultilineMode
    |             `- warning: stored property 'multilineMode' of 'Sendable'-conforming struct 'CLTLogger' has non-sendable type 'CLTLogger.MultilineMode'; this is an error in the Swift 6 language mode
135 | 	public let constantsByLevel: [Logger.Level: Constants]
136 |
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:242:13: warning: static property 'defaultConstantsByLogLevelForText' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
240 | public extension CLTLogger {
241 |
242 | 	static var defaultConstantsByLogLevelForText: [Logger.Level: Constants] = {
    |             |- warning: static property 'defaultConstantsByLogLevelForText' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'defaultConstantsByLogLevelForText' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'defaultConstantsByLogLevelForText' 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
243 | 		func addMeta(_ str: String) -> Constants {
244 | 			let len1 = str.count - 2
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:307:13: warning: static property 'defaultConstantsByLogLevelForColors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
305 |
306 | 	/* Terminal does not support RGB colors, so we use 255-color palette. */
307 | 	static var defaultConstantsByLogLevelForColors: [Logger.Level: Constants] = {
    |             |- warning: static property 'defaultConstantsByLogLevelForColors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'defaultConstantsByLogLevelForColors' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'defaultConstantsByLogLevelForColors' 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
308 | 		func str(_ spaces: String, _ str: String, _ mods1: [SGR.Modifier], _ mods2: [SGR.Modifier]) -> Constants {
309 | 			let bgColor = SGR.Modifier.reset
[12/13] Compiling CLTLogger SGR.swift
[13/13] Emitting module CLTLogger
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:99:21: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CLTLogger.MultilineMode' may have shared mutable state; this is an error in the Swift 6 language mode
 65 |
 66 | 	 For now there is no option to allow multilines metadata. */
 67 | 	public enum MultilineMode {
    |              `- note: consider making enum 'MultilineMode' conform to the 'Sendable' protocol
 68 | 		/**
 69 | 		 The new lines in logs are replaced by the given value, the metadata are printed on the same line as the log.
    :
 97 | 		case allMultiline
 98 |
 99 | 		public static let `default` = Self.disallowMultiline
    |                     |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CLTLogger.MultilineMode' may have shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: annotate 'default' 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
100 | 	}
101 |
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:233:21: warning: static property 'lock' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
231 | 	 *  <https://twitter.com/grynspan/status/1392080373752995849>.
232 | 	 * There is OSAllocatedUnfairLock which exists and is good, but is also not available on Linux. */
233 | 	private static var lock = NSLock()
    |                     |- warning: static property 'lock' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                     |- note: convert 'lock' to a 'let' constant to make 'Sendable' shared state immutable
    |                     |- note: annotate 'lock' 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
234 |
235 | 	private var flatMetadataCache = [String]()
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:134:13: warning: stored property 'multilineMode' of 'Sendable'-conforming struct 'CLTLogger' has non-sendable type 'CLTLogger.MultilineMode'; this is an error in the Swift 6 language mode
 65 |
 66 | 	 For now there is no option to allow multilines metadata. */
 67 | 	public enum MultilineMode {
    |              `- note: consider making enum 'MultilineMode' conform to the 'Sendable' protocol
 68 | 		/**
 69 | 		 The new lines in logs are replaced by the given value, the metadata are printed on the same line as the log.
    :
132 |
133 | 	public let outputFileDescriptor: FileDescriptor
134 | 	public let multilineMode: MultilineMode
    |             `- warning: stored property 'multilineMode' of 'Sendable'-conforming struct 'CLTLogger' has non-sendable type 'CLTLogger.MultilineMode'; this is an error in the Swift 6 language mode
135 | 	public let constantsByLevel: [Logger.Level: Constants]
136 |
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:242:13: warning: static property 'defaultConstantsByLogLevelForText' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
240 | public extension CLTLogger {
241 |
242 | 	static var defaultConstantsByLogLevelForText: [Logger.Level: Constants] = {
    |             |- warning: static property 'defaultConstantsByLogLevelForText' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'defaultConstantsByLogLevelForText' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'defaultConstantsByLogLevelForText' 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
243 | 		func addMeta(_ str: String) -> Constants {
244 | 			let len1 = str.count - 2
/Users/admin/builder/spi-builder-workspace/Sources/CLTLogger.swift:307:13: warning: static property 'defaultConstantsByLogLevelForColors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
305 |
306 | 	/* Terminal does not support RGB colors, so we use 255-color palette. */
307 | 	static var defaultConstantsByLogLevelForColors: [Logger.Level: Constants] = {
    |             |- warning: static property 'defaultConstantsByLogLevelForColors' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'defaultConstantsByLogLevelForColors' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'defaultConstantsByLogLevelForColors' 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
308 | 		func str(_ spaces: String, _ str: String, _ mods1: [SGR.Modifier], _ mods2: [SGR.Modifier]) -> Constants {
309 | 			let bgColor = SGR.Modifier.reset
Build complete! (8.55s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "swift-log",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.5.1",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/apple/swift-log.git"
    }
  ],
  "manifest_display_name" : "clt-logger",
  "name" : "clt-logger",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "14.0"
    },
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "watchos",
      "version" : "7.0"
    }
  ],
  "products" : [
    {
      "name" : "CLTLogger",
      "targets" : [
        "CLTLogger"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "CLTLoggerTests",
      "module_type" : "SwiftTarget",
      "name" : "CLTLoggerTests",
      "path" : "Tests",
      "sources" : [
        "CLTLoggerTests.swift",
        "SGRTests.swift",
        "StringEscapingTests.swift"
      ],
      "target_dependencies" : [
        "CLTLogger"
      ],
      "type" : "test"
    },
    {
      "c99name" : "CLTLogger",
      "module_type" : "SwiftTarget",
      "name" : "CLTLogger",
      "path" : "Sources",
      "product_dependencies" : [
        "Logging"
      ],
      "product_memberships" : [
        "CLTLogger"
      ],
      "sources" : [
        "CLTLogger.swift",
        "NSLock+Linux.swift",
        "SGR.swift",
        "String+Utils.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Done.