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 LLM, reference main (77a04e), with Swift 6.0 for macOS (SPM) on 16 Apr 2025 20:42:20 UTC.

Swift 6 data race errors: 6

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64 -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

Build Log

========================================
RunAll
========================================
Builder version: 4.60.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/eastriverlee/LLM.swift.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/eastriverlee/LLM.swift
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 77a04eb update update.sh
Cloned https://github.com/eastriverlee/LLM.swift.git
Revision (git rev-parse @):
77a04ebb272f4c9765dac2cebbb8f675ceae9813
SUCCESS checkout https://github.com/eastriverlee/LLM.swift.git at main
========================================
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": "llm.swift",
      "name": "LLM",
      "url": "https://github.com/eastriverlee/LLM.swift.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/LLM.swift",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/eastriverlee/LLM.swift.git
[1/755] Fetching llm.swift
Fetched https://github.com/eastriverlee/LLM.swift.git from cache (4.19s)
Creating working copy for https://github.com/eastriverlee/LLM.swift.git
Working copy of https://github.com/eastriverlee/LLM.swift.git resolved at main (77a04eb)
warning: '.resolve-product-dependencies': dependency 'llm.swift' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/eastriverlee/LLM.swift.git
https://github.com/eastriverlee/LLM.swift.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "LLM",
  "name" : "LLM",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "14.0"
    },
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    },
    {
      "name" : "watchos",
      "version" : "4.0"
    },
    {
      "name" : "tvos",
      "version" : "14.0"
    }
  ],
  "products" : [
    {
      "name" : "LLM",
      "targets" : [
        "LLM"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "llama",
      "module_type" : "BinaryTarget",
      "name" : "llama",
      "path" : "llama.cpp/llama.xcframework",
      "product_memberships" : [
        "LLM"
      ],
      "sources" : [
      ],
      "type" : "binary"
    },
    {
      "c99name" : "LLMTests",
      "module_type" : "SwiftTarget",
      "name" : "LLMTests",
      "path" : "Tests/LLMTests",
      "sources" : [
        "LLMTests.swift"
      ],
      "target_dependencies" : [
        "LLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "LLM",
      "module_type" : "SwiftTarget",
      "name" : "LLM",
      "path" : "Sources/LLM",
      "product_memberships" : [
        "LLM"
      ],
      "sources" : [
        "LLM.swift"
      ],
      "target_dependencies" : [
        "llama"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64 -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
Building for debugging...
[0/3] Write sources
[1/3] Copying llama.framework
[2/3] Write swift-version-5BDAB9E9C0126B9D.txt
[4/5] Emitting module LLM
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:245:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
243 |             }
244 |             preprocess = template.preprocess
245 |             Task { await core.setStopSequence(template.stopSequence) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
246 |         }
247 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:241:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
239 |             guard let template else {
240 |                 preprocess = { input, _ in return input }
241 |                 Task { await core.setStopSequence(nil) }
    |                      |       `- note: closure captures 'self' which is accessible to code in the current task
    |                      `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
242 |                 return
243 |             }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:251:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
249 |     public var seed: UInt32 {
250 |         didSet {
251 |             Task { await core.setParameters(seed: seed) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
252 |         }
253 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:257:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
255 |     public var topK: Int32 {
256 |         didSet {
257 |             Task { await core.setParameters(topK: topK) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
258 |         }
259 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:263:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
261 |     public var topP: Float {
262 |         didSet {
263 |             Task { await core.setParameters(topP: topP) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
264 |         }
265 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:269:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
267 |     public var temp: Float {
268 |         didSet {
269 |             Task { await core.setParameters(temp: temp) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
270 |         }
271 |     }
[5/5] Compiling LLM LLM.swift
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:77:26: warning: cannot access property 'batch' with a non-sendable type 'llama_batch' from nonisolated deinit; this is an error in the Swift 6 language mode
 75 |
 76 |     deinit {
 77 |         llama_batch_free(batch)
    |                          `- warning: cannot access property 'batch' with a non-sendable type 'llama_batch' from nonisolated deinit; this is an error in the Swift 6 language mode
 78 |         llama_free(context)
 79 |     }
llama.llama_batch:1:15: note: struct 'llama_batch' does not conform to the 'Sendable' protocol
 1 | public struct llama_batch {
   |               `- note: struct 'llama_batch' does not conform to the 'Sendable' protocol
 2 |     public init()
 3 |     public init(n_tokens: Int32, token: UnsafeMutablePointer<llama_token>!, embd: UnsafeMutablePointer<Float>!, pos: UnsafeMutablePointer<llama_pos>!, n_seq_id: UnsafeMutablePointer<Int32>!, seq_id: UnsafeMutablePointer<UnsafeMutablePointer<llama_seq_id>?>!, logits: UnsafeMutablePointer<Int8>!)
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'llama'
  1 | import Foundation
  2 | import llama
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'llama'
  3 |
  4 | public typealias Token = llama_token
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:78:20: warning: cannot access property 'context' with a non-sendable type 'OpaquePointer' from nonisolated deinit; this is an error in the Swift 6 language mode
 76 |     deinit {
 77 |         llama_batch_free(batch)
 78 |         llama_free(context)
    |                    `- warning: cannot access property 'context' with a non-sendable type 'OpaquePointer' from nonisolated deinit; this is an error in the Swift 6 language mode
 79 |     }
 80 |
Swift.OpaquePointer:1:23: note: struct 'OpaquePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct OpaquePointer {
  |                       `- note: struct 'OpaquePointer' does not conform to the 'Sendable' protocol
2 | }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:245:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
243 |             }
244 |             preprocess = template.preprocess
245 |             Task { await core.setStopSequence(template.stopSequence) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
246 |         }
247 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:241:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
239 |             guard let template else {
240 |                 preprocess = { input, _ in return input }
241 |                 Task { await core.setStopSequence(nil) }
    |                      |       `- note: closure captures 'self' which is accessible to code in the current task
    |                      `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
242 |                 return
243 |             }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:251:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
249 |     public var seed: UInt32 {
250 |         didSet {
251 |             Task { await core.setParameters(seed: seed) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
252 |         }
253 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:257:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
255 |     public var topK: Int32 {
256 |         didSet {
257 |             Task { await core.setParameters(topK: topK) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
258 |         }
259 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:263:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
261 |     public var topP: Float {
262 |         didSet {
263 |             Task { await core.setParameters(topP: topP) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
264 |         }
265 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:269:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
267 |     public var temp: Float {
268 |         didSet {
269 |             Task { await core.setParameters(temp: temp) }
    |                  |       `- note: closure captures 'self' which is accessible to code in the current task
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
270 |         }
271 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:312:29: warning: sending 'model' risks causing data races; this is an error in the Swift 6 language mode
310 |
311 |         do {
312 |             self.core = try LLMCore(
    |                             |- warning: sending 'model' risks causing data races; this is an error in the Swift 6 language mode
    |                             `- note: sending task-isolated 'model' to actor-isolated initializer 'init(model:path:seed:topK:topP:temp:maxTokenCount:)' risks causing data races between actor-isolated and task-isolated uses
313 |                 model: model,
314 |                 path: self.path,
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:323:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
321 |
322 |             if let stopSequence {
323 |                 Task {
    |                      `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
324 |                     await core.setStopSequence(stopSequence)
    |                           `- note: closure captures 'self' which is accessible to code in the current task
325 |                 }
326 |             }
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:422:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
420 |
421 |     public func stop() {
422 |         Task { await core.stopGeneration() }
    |              |       `- note: closure captures 'self' which is accessible to code in the current task
    |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
423 |     }
424 |
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:470:24: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
468 |             guard let self = self else { return "" }
469 |
470 |             await self.setOutput(to: "")
    |                        |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                        `- note: sending main actor-isolated 'self' to main actor-isolated instance method 'setOutput(to:)' risks causing data races between main actor-isolated and local nonisolated uses
471 |             for await responseDelta in response {
472 |                 self.update(responseDelta)
    |                      `- note: access can happen concurrently
473 |                 await self.setOutput(to: self.output + responseDelta)
474 |             }
475 |             self.update(nil)
    |                  `- note: access can happen concurrently
476 |
477 |             let trimmedOutput = self.output.trimmingCharacters(in: .whitespacesAndNewlines)
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:473:28: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
471 |             for await responseDelta in response {
472 |                 self.update(responseDelta)
473 |                 await self.setOutput(to: self.output + responseDelta)
    |                            |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                            |- note: sending main actor-isolated 'self' to main actor-isolated instance method 'setOutput(to:)' risks causing data races between main actor-isolated and local nonisolated uses
    |                            `- note: access can happen concurrently
474 |             }
475 |             self.update(nil)
/Users/admin/builder/spi-builder-workspace/Sources/LLM/LLM.swift:478:24: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
476 |
477 |             let trimmedOutput = self.output.trimmingCharacters(in: .whitespacesAndNewlines)
478 |             await self.setOutput(to: trimmedOutput.isEmpty ? "..." : trimmedOutput)
    |                        |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                        `- note: sending main actor-isolated 'self' to main actor-isolated instance method 'setOutput(to:)' risks causing data races between main actor-isolated and local nonisolated uses
479 |             return self.output
    |                         `- note: access can happen concurrently
480 |         }
481 |     }
Build complete! (6.18s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "LLM",
  "name" : "LLM",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "14.0"
    },
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    },
    {
      "name" : "watchos",
      "version" : "4.0"
    },
    {
      "name" : "tvos",
      "version" : "14.0"
    }
  ],
  "products" : [
    {
      "name" : "LLM",
      "targets" : [
        "LLM"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "llama",
      "module_type" : "BinaryTarget",
      "name" : "llama",
      "path" : "llama.cpp/llama.xcframework",
      "product_memberships" : [
        "LLM"
      ],
      "sources" : [
      ],
      "type" : "binary"
    },
    {
      "c99name" : "LLMTests",
      "module_type" : "SwiftTarget",
      "name" : "LLMTests",
      "path" : "Tests/LLMTests",
      "sources" : [
        "LLMTests.swift"
      ],
      "target_dependencies" : [
        "LLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "LLM",
      "module_type" : "SwiftTarget",
      "name" : "LLM",
      "path" : "Sources/LLM",
      "product_memberships" : [
        "LLM"
      ],
      "sources" : [
        "LLM.swift"
      ],
      "target_dependencies" : [
        "llama"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.