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 Linux on 4 Nov 2024 23:50:50 UTC.

Swift 6 data race errors: 5

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1

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 /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
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
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/xcode-actions/clt-logger.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Fetching https://github.com/apple/swift-system.git
Fetching https://github.com/apple/swift-log.git
[1/3660] Fetching swift-log
[3661/7561] Fetching swift-log, swift-system
Fetched https://github.com/apple/swift-log.git from cache (0.32s)
Fetched https://github.com/apple/swift-system.git from cache (0.33s)
Computing version for https://github.com/apple/swift-log.git
Computed https://github.com/apple/swift-log.git at 1.6.1 (0.35s)
Computing version for https://github.com/apple/swift-system.git
Computed https://github.com/apple/swift-system.git at 1.4.0 (0.38s)
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
Creating working copy for https://github.com/apple/swift-system.git
Working copy of https://github.com/apple/swift-system.git resolved at 1.4.0
Building for debugging...
[0/5] Write sources
[3/5] Write swift-version-24593BA9C3E375BF.txt
[3/5] Compiling CSystem shims.c
[6/38] Emitting module SystemPackage
[7/41] Compiling SystemPackage Util+StringArray.swift
[8/41] Compiling SystemPackage Util.swift
[9/41] Compiling SystemPackage UtilConsumers.swift
[10/41] Compiling SystemPackage MachPort.swift
[11/41] Compiling SystemPackage PlatformString.swift
[12/41] Compiling SystemPackage SystemString.swift
[13/41] Compiling SystemPackage FileOperations.swift
[14/41] Compiling SystemPackage FilePath.swift
[15/41] Compiling SystemPackage FilePathComponentView.swift
[16/41] Compiling SystemPackage FilePathComponents.swift
[17/41] Compiling SystemPackage FilePathParsing.swift
[18/41] Compiling SystemPackage FilePathString.swift
[19/41] Compiling SystemPackage FilePathSyntax.swift
[20/41] Compiling SystemPackage FilePathTemp.swift
[21/41] Compiling SystemPackage Errno.swift
[22/41] Compiling SystemPackage ErrnoWindows.swift
[23/41] Compiling SystemPackage FileDescriptor.swift
[24/41] Compiling SystemPackage FileHelpers.swift
[25/41] Compiling SystemPackage FilePathTempPosix.swift
[26/41] Compiling SystemPackage FilePathTempWindows.swift
[27/41] Compiling SystemPackage FilePathWindows.swift
[28/41] Compiling SystemPackage FilePermissions.swift
[29/41] Compiling SystemPackage Backcompat.swift
[30/41] Compiling SystemPackage CInterop.swift
[31/41] Compiling SystemPackage Constants.swift
[32/41] Compiling SystemPackage Exports.swift
[33/41] Compiling SystemPackage Mocking.swift
[34/41] Compiling SystemPackage RawBuffer.swift
[35/41] Compiling SystemPackage Syscalls.swift
[36/41] Compiling SystemPackage WindowsSyscallAdapters.swift
[37/42] Compiling Logging MetadataProvider.swift
[39/42] Compiling Logging LogHandler.swift
[40/42] Compiling Logging Locks.swift
[41/42] Emitting module Logging
[42/42] Compiling Logging Logging.swift
[44/48] Compiling CLTLogger String+Utils.swift
[45/48] Compiling CLTLogger SGR.swift
[46/48] Compiling CLTLogger NSLock+Linux.swift
[47/48] Emitting module CLTLogger
/host/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 |
/host/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]()
/host/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 |
/host/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
/host/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
[48/48] Compiling CLTLogger CLTLogger.swift
/host/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 |
/host/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]()
/host/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 |
/host/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
/host/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! (13.33s)
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"
    },
    {
      "identity" : "swift-system",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.0.0",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/apple/swift-system.git"
    }
  ],
  "manifest_display_name" : "clt-logger",
  "name" : "clt-logger",
  "path" : "/host/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",
        "SystemPackage"
      ],
      "product_memberships" : [
        "CLTLogger"
      ],
      "sources" : [
        "CLTLogger.swift",
        "NSLock+Linux.swift",
        "SGR.swift",
        "String+Utils.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.