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 Chalk, reference 0.2.1 (8a9d33), with Swift 6.0 for Linux on 1 Nov 2024 09:57:46 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/luoxiu/Chalk.git
Reference: 0.2.1
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/luoxiu/Chalk
 * tag               0.2.1      -> FETCH_HEAD
HEAD is now at 8a9d337 remove executable product
Cloned https://github.com/luoxiu/Chalk.git
Revision (git rev-parse @):
8a9d3373bd754fb62f7881d9f639d376f5e4d5a5
SUCCESS checkout https://github.com/luoxiu/Chalk.git at 0.2.1
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/luoxiu/Chalk.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/luoxiu/Rainbow
[1/234] Fetching rainbow
Fetched https://github.com/luoxiu/Rainbow from cache (0.17s)
Computing version for https://github.com/luoxiu/Rainbow
Computed https://github.com/luoxiu/Rainbow at 0.1.1 (0.66s)
Creating working copy for https://github.com/luoxiu/Rainbow
Working copy of https://github.com/luoxiu/Rainbow resolved at 0.1.1
Building for debugging...
[0/9] Write sources
[3/9] Write swift-version-24593BA9C3E375BF.txt
[5/15] Emitting module Rainbow
[6/15] Compiling Rainbow Color+Cocoa.swift
[7/15] Compiling Rainbow NSRegularExpression.swift
[8/15] Compiling Rainbow Colors.swift
[9/15] Compiling Rainbow Double.swift
[10/15] Compiling Rainbow Color.swift
[11/16] Wrapping AST for Rainbow for debugging
[13/24] Compiling Chalk String+RegRxp.swift
[14/24] Compiling Chalk TerminalSupportedColor.swift
/host/spi-builder-workspace/Sources/Chalk/TerminalSupportedColor.swift:11:5: warning: var '__preset_supported_color__' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | // test
11 | var __preset_supported_color__: TerminalSupportedColor?
   |     |- warning: var '__preset_supported_color__' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |     |- note: convert '__preset_supported_color__' to a 'let' constant to make 'Sendable' shared state immutable
   |     |- note: annotate '__preset_supported_color__' 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 | // https://github.com/chalk/supports-color
/host/spi-builder-workspace/Sources/Chalk/TerminalSupportedColor.swift:21:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
19 |     case ansi16m
20 |
21 |     public static var current: TerminalSupportedColor = {
   |                       |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'current' 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
22 |         if let color = __preset_supported_color__ {
23 |             return color
/host/spi-builder-workspace/Sources/Chalk/TerminalSupportedColor.swift:26:26: warning: reference to var 'stdout' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
24 |         }
25 |
26 |         if isatty(fileno(stdout)) == 0 {
   |                          `- warning: reference to var 'stdout' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
27 |             return .none
28 |         }
SwiftGlibc.stdout:1:12: note: var declared here
1 | public var stdout: UnsafeMutablePointer<FILE>!
  |            `- note: var declared here
[15/24] Compiling Chalk TerminalStringConvertible.swift
[16/24] Compiling Chalk TerminalString.swift
/host/spi-builder-workspace/Sources/Chalk/TerminalSupportedColor.swift:21:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
19 |     case ansi16m
20 |
21 |     public static var current: TerminalSupportedColor = {
   |                       |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'current' 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
22 |         if let color = __preset_supported_color__ {
23 |             return color
[17/24] Compiling Chalk Modifier.swift
[18/24] Compiling Chalk Style.swift
/host/spi-builder-workspace/Sources/Chalk/Style.swift:10:12: warning: let 'chalk' is not concurrency-safe because non-'Sendable' type 'Style' may have shared mutable state; this is an error in the Swift 6 language mode
  8 | import Foundation
  9 |
 10 | public let chalk = Style()
    |            |- warning: let 'chalk' is not concurrency-safe because non-'Sendable' type 'Style' may have shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: annotate 'chalk' 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
 11 | public let ck = Style()
 12 |
 13 | public struct Style {
    |               `- note: consider making struct 'Style' conform to the 'Sendable' protocol
 14 |
 15 |     public var fgColor: TerminalColor?
/host/spi-builder-workspace/Sources/Chalk/Style.swift:11:12: warning: let 'ck' is not concurrency-safe because non-'Sendable' type 'Style' may have shared mutable state; this is an error in the Swift 6 language mode
  9 |
 10 | public let chalk = Style()
 11 | public let ck = Style()
    |            |- warning: let 'ck' is not concurrency-safe because non-'Sendable' type 'Style' may have shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: annotate 'ck' 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 struct Style {
    |               `- note: consider making struct 'Style' conform to the 'Sendable' protocol
 14 |
 15 |     public var fgColor: TerminalColor?
[19/24] Compiling Chalk Color.swift
/host/spi-builder-workspace/Sources/Chalk/TerminalSupportedColor.swift:21:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
19 |     case ansi16m
20 |
21 |     public static var current: TerminalSupportedColor = {
   |                       |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'current' 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
22 |         if let color = __preset_supported_color__ {
23 |             return color
[20/24] Emitting module Chalk
/host/spi-builder-workspace/Sources/Chalk/Style.swift:10:12: warning: let 'chalk' is not concurrency-safe because non-'Sendable' type 'Style' may have shared mutable state; this is an error in the Swift 6 language mode
  8 | import Foundation
  9 |
 10 | public let chalk = Style()
    |            |- warning: let 'chalk' is not concurrency-safe because non-'Sendable' type 'Style' may have shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: annotate 'chalk' 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
 11 | public let ck = Style()
 12 |
 13 | public struct Style {
    |               `- note: consider making struct 'Style' conform to the 'Sendable' protocol
 14 |
 15 |     public var fgColor: TerminalColor?
/host/spi-builder-workspace/Sources/Chalk/Style.swift:11:12: warning: let 'ck' is not concurrency-safe because non-'Sendable' type 'Style' may have shared mutable state; this is an error in the Swift 6 language mode
  9 |
 10 | public let chalk = Style()
 11 | public let ck = Style()
    |            |- warning: let 'ck' is not concurrency-safe because non-'Sendable' type 'Style' may have shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: annotate 'ck' 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 struct Style {
    |               `- note: consider making struct 'Style' conform to the 'Sendable' protocol
 14 |
 15 |     public var fgColor: TerminalColor?
/host/spi-builder-workspace/Sources/Chalk/TerminalSupportedColor.swift:11:5: warning: var '__preset_supported_color__' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | // test
11 | var __preset_supported_color__: TerminalSupportedColor?
   |     |- warning: var '__preset_supported_color__' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |     |- note: convert '__preset_supported_color__' to a 'let' constant to make 'Sendable' shared state immutable
   |     |- note: annotate '__preset_supported_color__' 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 | // https://github.com/chalk/supports-color
/host/spi-builder-workspace/Sources/Chalk/TerminalSupportedColor.swift:21:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
19 |     case ansi16m
20 |
21 |     public static var current: TerminalSupportedColor = {
   |                       |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'current' 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
22 |         if let color = __preset_supported_color__ {
23 |             return color
/host/spi-builder-workspace/Sources/Chalk/TerminalSupportedColor.swift:26:26: warning: reference to var 'stdout' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
24 |         }
25 |
26 |         if isatty(fileno(stdout)) == 0 {
   |                          `- warning: reference to var 'stdout' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
27 |             return .none
28 |         }
SwiftGlibc.stdout:1:12: note: var declared here
1 | public var stdout: UnsafeMutablePointer<FILE>!
  |            `- note: var declared here
[21/25] Wrapping AST for Chalk for debugging
[23/27] Compiling chalk_app main.swift
[24/27] Emitting module chalk_app
[25/28] Wrapping AST for chalk-app for debugging
[26/28] Write Objects.LinkFileList
[27/28] Linking chalk-app
Build complete! (16.22s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "rainbow",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "0.1.0",
            "upper_bound" : "1.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/luoxiu/Rainbow"
    }
  ],
  "manifest_display_name" : "Chalk",
  "name" : "Chalk",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Chalk",
      "targets" : [
        "Chalk"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "chalk-app",
      "targets" : [
        "chalk-app"
      ],
      "type" : {
        "executable" : null
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "chalk_app",
      "module_type" : "SwiftTarget",
      "name" : "chalk-app",
      "path" : "Sources/chalk-app",
      "product_memberships" : [
        "chalk-app"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "Chalk"
      ],
      "type" : "executable"
    },
    {
      "c99name" : "ChalkTests",
      "module_type" : "SwiftTarget",
      "name" : "ChalkTests",
      "path" : "Tests/ChalkTests",
      "sources" : [
        "ChalkTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "Chalk"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Chalk",
      "module_type" : "SwiftTarget",
      "name" : "Chalk",
      "path" : "Sources/Chalk",
      "product_dependencies" : [
        "Rainbow"
      ],
      "product_memberships" : [
        "Chalk",
        "chalk-app"
      ],
      "sources" : [
        "Color.swift",
        "Modifier.swift",
        "Style.swift",
        "TerminalString.swift",
        "TerminalStringConvertible.swift",
        "TerminalSupportedColor.swift",
        "Utils/String+RegRxp.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.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
Done.