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 Swdifft, reference master (e92c79), with Swift 6.1 for Linux on 25 Apr 2025 15:05:29 UTC.

Swift 6 data race errors: 4

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/bannzai/swdifft.git
Reference: master
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/bannzai/swdifft
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at e92c79b Merge pull request #5 from bannzai/enhancement/performance/index
Cloned https://github.com/bannzai/swdifft.git
Revision (git rev-parse @):
e92c79b9da9d2f87b3bfc6411eccf936b72db51e
SUCCESS checkout https://github.com/bannzai/swdifft.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.1
Building package at path:  $PWD
https://github.com/bannzai/swdifft.git
https://github.com/bannzai/swdifft.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Swdifft",
  "name" : "Swdifft",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Swdifft",
      "targets" : [
        "Swdifft"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwdifftTests",
      "module_type" : "SwiftTarget",
      "name" : "SwdifftTests",
      "path" : "Tests/SwdifftTests",
      "sources" : [
        "SwdifftTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "Swdifft"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Swdifft",
      "module_type" : "SwiftTarget",
      "name" : "Swdifft",
      "path" : "Sources/Swdifft",
      "product_memberships" : [
        "Swdifft"
      ],
      "sources" : [
        "Formatter.swift",
        "InternalDiffFunction.swift",
        "Marks.swift",
        "StringExtension.swift",
        "Swdifft.swift",
        "longestCommonSubsequence.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/9] Compiling Swdifft Marks.swift
/host/spi-builder-workspace/Sources/Swdifft/Marks.swift:10:12: warning: var 'beginLHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public var beginLHSMark = "`"
   |            |- warning: var 'beginLHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'beginLHSMark' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: add '@MainActor' to make var 'beginLHSMark' part of global actor 'MainActor'
   |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | public var endLHSMark = "`"
12 |
/host/spi-builder-workspace/Sources/Swdifft/Marks.swift:11:12: warning: var 'endLHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | public var beginLHSMark = "`"
11 | public var endLHSMark = "`"
   |            |- warning: var 'endLHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'endLHSMark' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: add '@MainActor' to make var 'endLHSMark' part of global actor 'MainActor'
   |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | public var beginRHSMark = "*"
/host/spi-builder-workspace/Sources/Swdifft/Marks.swift:13:12: warning: var 'beginRHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 | public var endLHSMark = "`"
12 |
13 | public var beginRHSMark = "*"
   |            |- warning: var 'beginRHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'beginRHSMark' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: add '@MainActor' to make var 'beginRHSMark' part of global actor 'MainActor'
   |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | public var endRHSMark = "*"
15 |
/host/spi-builder-workspace/Sources/Swdifft/Marks.swift:14:12: warning: var 'endRHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
12 |
13 | public var beginRHSMark = "*"
14 | public var endRHSMark = "*"
   |            |- warning: var 'endRHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'endRHSMark' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: add '@MainActor' to make var 'endRHSMark' part of global actor 'MainActor'
   |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 |
[4/9] Compiling Swdifft Swdifft.swift
[5/9] Compiling Swdifft longestCommonSubsequence.swift
[6/9] Emitting module Swdifft
/host/spi-builder-workspace/Sources/Swdifft/Marks.swift:10:12: warning: var 'beginLHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public var beginLHSMark = "`"
   |            |- warning: var 'beginLHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'beginLHSMark' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: add '@MainActor' to make var 'beginLHSMark' part of global actor 'MainActor'
   |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | public var endLHSMark = "`"
12 |
/host/spi-builder-workspace/Sources/Swdifft/Marks.swift:11:12: warning: var 'endLHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 9 |
10 | public var beginLHSMark = "`"
11 | public var endLHSMark = "`"
   |            |- warning: var 'endLHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'endLHSMark' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: add '@MainActor' to make var 'endLHSMark' part of global actor 'MainActor'
   |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | public var beginRHSMark = "*"
/host/spi-builder-workspace/Sources/Swdifft/Marks.swift:13:12: warning: var 'beginRHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 | public var endLHSMark = "`"
12 |
13 | public var beginRHSMark = "*"
   |            |- warning: var 'beginRHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'beginRHSMark' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: add '@MainActor' to make var 'beginRHSMark' part of global actor 'MainActor'
   |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | public var endRHSMark = "*"
15 |
/host/spi-builder-workspace/Sources/Swdifft/Marks.swift:14:12: warning: var 'endRHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
12 |
13 | public var beginRHSMark = "*"
14 | public var endRHSMark = "*"
   |            |- warning: var 'endRHSMark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |            |- note: convert 'endRHSMark' to a 'let' constant to make 'Sendable' shared state immutable
   |            |- note: add '@MainActor' to make var 'endRHSMark' part of global actor 'MainActor'
   |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 |
[7/9] Compiling Swdifft Formatter.swift
[8/9] Compiling Swdifft StringExtension.swift
[9/9] Compiling Swdifft InternalDiffFunction.swift
/host/spi-builder-workspace/Sources/Swdifft/InternalDiffFunction.swift:56:33: warning: capture of 'extract(target:commonCharacter:diffWords:beginIndex:)' with non-sendable type '(Content, Character, (begin: String, end: String), inout Int) -> Result' (aka '(String, Character, (begin: String, end: String), inout Int) -> Result') in a '@Sendable' closure; this is an error in the Swift 6 language mode
54 |         DispatchQueue.global().async {
55 |             let r = lcs.reduce("") { (result, commonCharacter) in
56 |                 return result + extract(target: target, commonCharacter: commonCharacter, diffWords: (begin: diffWords.begin, end: diffWords.end), beginIndex: &beginIndex).stack
   |                                 |- warning: capture of 'extract(target:commonCharacter:diffWords:beginIndex:)' with non-sendable type '(Content, Character, (begin: String, end: String), inout Int) -> Result' (aka '(String, Character, (begin: String, end: String), inout Int) -> Result') in a '@Sendable' closure; this is an error in the Swift 6 language mode
   |                                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
57 |             }
58 |
/host/spi-builder-workspace/Sources/Swdifft/InternalDiffFunction.swift:59:13: warning: capture of 'closure' with non-sendable type '(Content) -> ()' (aka '(String) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
57 |             }
58 |
59 |             closure(r)
   |             |- warning: capture of 'closure' with non-sendable type '(Content) -> ()' (aka '(String) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
   |             `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
60 |         }
61 |     }
/host/spi-builder-workspace/Sources/Swdifft/InternalDiffFunction.swift:56:33: warning: capture of 'extract(target:commonCharacter:diffWords:beginIndex:)' with non-sendable type '(Content, Character, (begin: String, end: String), inout Int) -> Result' (aka '(String, Character, (begin: String, end: String), inout Int) -> Result') in an isolated closure; this is an error in the Swift 6 language mode
54 |         DispatchQueue.global().async {
55 |             let r = lcs.reduce("") { (result, commonCharacter) in
56 |                 return result + extract(target: target, commonCharacter: commonCharacter, diffWords: (begin: diffWords.begin, end: diffWords.end), beginIndex: &beginIndex).stack
   |                                 |- warning: capture of 'extract(target:commonCharacter:diffWords:beginIndex:)' with non-sendable type '(Content, Character, (begin: String, end: String), inout Int) -> Result' (aka '(String, Character, (begin: String, end: String), inout Int) -> Result') in an isolated closure; this is an error in the Swift 6 language mode
   |                                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
57 |             }
58 |
/host/spi-builder-workspace/Sources/Swdifft/InternalDiffFunction.swift:20:10: warning: concurrently-executed local function 'extract(target:commonCharacter:diffWords:beginIndex:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
18 |     }
19 |
20 |     func extract(target: Content, commonCharacter: Character, diffWords: (begin: String, end: String), beginIndex step: inout Int) -> Result {
   |          `- warning: concurrently-executed local function 'extract(target:commonCharacter:diffWords:beginIndex:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
21 |         var result = Result()
22 |
/host/spi-builder-workspace/Sources/Swdifft/InternalDiffFunction.swift:56:161: warning: mutation of captured var 'beginIndex' in concurrently-executing code; this is an error in the Swift 6 language mode
54 |         DispatchQueue.global().async {
55 |             let r = lcs.reduce("") { (result, commonCharacter) in
56 |                 return result + extract(target: target, commonCharacter: commonCharacter, diffWords: (begin: diffWords.begin, end: diffWords.end), beginIndex: &beginIndex).stack
   |                                                                                                                                                                 `- warning: mutation of captured var 'beginIndex' in concurrently-executing code; this is an error in the Swift 6 language mode
57 |             }
58 |
Build complete! (7.82s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Swdifft",
  "name" : "Swdifft",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Swdifft",
      "targets" : [
        "Swdifft"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwdifftTests",
      "module_type" : "SwiftTarget",
      "name" : "SwdifftTests",
      "path" : "Tests/SwdifftTests",
      "sources" : [
        "SwdifftTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "Swdifft"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Swdifft",
      "module_type" : "SwiftTarget",
      "name" : "Swdifft",
      "path" : "Sources/Swdifft",
      "product_memberships" : [
        "Swdifft"
      ],
      "sources" : [
        "Formatter.swift",
        "InternalDiffFunction.swift",
        "Marks.swift",
        "StringExtension.swift",
        "Swdifft.swift",
        "longestCommonSubsequence.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Done.