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 1.0.3 (e92c79), with Swift 6.0 for Linux on 31 Oct 2024 15:53:52 UTC.

Swift 6 data race errors: 4

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/bannzai/swdifft.git
Reference: 1.0.3
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
 * tag               1.0.3      -> FETCH_HEAD
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 1.0.3
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/bannzai/swdifft.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
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/9] Compiling Swdifft Swdifft.swift
[4/9] Compiling Swdifft longestCommonSubsequence.swift
[5/9] Compiling Swdifft Formatter.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: annotate 'beginLHSMark' 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 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: annotate 'endLHSMark' 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 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: annotate 'beginRHSMark' 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
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: annotate 'endRHSMark' 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
15 |
16 |
[7/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: annotate 'beginLHSMark' 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 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: annotate 'endLHSMark' 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 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: annotate 'beginRHSMark' 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
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: annotate 'endRHSMark' 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
15 |
16 |
[8/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 |
/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: annotate 'beginLHSMark' 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 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: annotate 'endLHSMark' 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 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: annotate 'beginRHSMark' 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
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: annotate 'endRHSMark' 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
15 |
16 |
[9/9] Compiling Swdifft StringExtension.swift
Build complete! (9.70s)
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.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.