The Swift Package Index logo.Swift Package Index

Build Information

Successful build of LiteRTLM, reference v0.18.1 (bda624), with Swift 6.1 for macOS (SPM) on 20 Oct 2026 23:28:02 UTC.

Swift 6 data race errors: 11

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.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: 5.1.3
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/google-ai-edge/LiteRT-LM.git
Reference: v0.18.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/google-ai-edge/LiteRT-LM
 * tag               v0.18.1    -> FETCH_HEAD
HEAD is now at bda6248 Update LiteRT-LM Swift package to v0.18.1.
Updating files:  79% (1292/1628)
Updating files:  79% (1297/1628)
Updating files:  79% (1299/1628)
Updating files:  80% (1303/1628)
Updating files:  81% (1319/1628)
Updating files:  82% (1335/1628)
Updating files:  83% (1352/1628)
Updating files:  84% (1368/1628)
Updating files:  85% (1384/1628)
Updating files:  86% (1401/1628)
Updating files:  86% (1413/1628)
Updating files:  87% (1417/1628)
Updating files:  88% (1433/1628)
Updating files:  89% (1449/1628)
Updating files:  90% (1466/1628)
Updating files:  91% (1482/1628)
Updating files:  92% (1498/1628)
Updating files:  93% (1515/1628)
Updating files:  94% (1531/1628)
Updating files:  95% (1547/1628)
Updating files:  96% (1563/1628)
Updating files:  97% (1580/1628)
Updating files:  98% (1596/1628)
Updating files:  99% (1612/1628)
Updating files: 100% (1628/1628)
Updating files: 100% (1628/1628), done.
Cloned https://github.com/google-ai-edge/LiteRT-LM.git
Revision (git rev-parse @):
bda624851d74be34d4e1f7fac1fc4155939539c7
SUCCESS checkout https://github.com/google-ai-edge/LiteRT-LM.git at v0.18.1
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/google-ai-edge/LiteRT-LM.git
https://github.com/google-ai-edge/LiteRT-LM.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "LiteRTLM",
  "name" : "LiteRTLM",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "macos",
      "version" : "12.0"
    }
  ],
  "products" : [
    {
      "name" : "LiteRTLM",
      "targets" : [
        "LiteRTLM"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "LiteRTLMFoundationModels",
      "targets" : [
        "LiteRTLMFoundationModels"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "ToolTests",
      "module_type" : "SwiftTarget",
      "name" : "ToolTests",
      "path" : "swift",
      "sources" : [
        "ToolTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "ModelInfoTests",
      "module_type" : "SwiftTarget",
      "name" : "ModelInfoTests",
      "path" : "swift",
      "sources" : [
        "ModelInfoTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "MessageTests",
      "module_type" : "SwiftTarget",
      "name" : "MessageTests",
      "path" : "swift",
      "sources" : [
        "MessageTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "LiteRTLMFoundationModels",
      "module_type" : "SwiftTarget",
      "name" : "LiteRTLMFoundationModels",
      "path" : "swift/apple_fm",
      "product_memberships" : [
        "LiteRTLMFoundationModels"
      ],
      "sources" : [
        "CGImagePNG.swift",
        "LiteRTLanguageModel.swift",
        "LiteRTSegments.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "library"
    },
    {
      "c99name" : "LiteRTLM",
      "module_type" : "SwiftTarget",
      "name" : "LiteRTLM",
      "path" : "swift",
      "product_memberships" : [
        "LiteRTLM",
        "LiteRTLMFoundationModels"
      ],
      "sources" : [
        "Benchmark.swift",
        "Config.swift",
        "Conversation.swift",
        "EmbeddingEngine.swift",
        "EmbeddingEngineConfig.swift",
        "Engine.swift",
        "ExperimentalFlags.swift",
        "LiteRTLMError.swift",
        "Message.swift",
        "ModelInfo.swift",
        "ResponseFormat.swift",
        "Tool.swift",
        "ToolManager.swift"
      ],
      "target_dependencies" : [
        "CLiteRTLM",
        "CLiteRTLM_mac"
      ],
      "type" : "library"
    },
    {
      "c99name" : "EngineTests",
      "module_type" : "SwiftTarget",
      "name" : "EngineTests",
      "path" : "swift",
      "sources" : [
        "EngineTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "EmbeddingEngineTests",
      "module_type" : "SwiftTarget",
      "name" : "EmbeddingEngineTests",
      "path" : "swift",
      "sources" : [
        "EmbeddingEngineTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "ConversationTests",
      "module_type" : "SwiftTarget",
      "name" : "ConversationTests",
      "path" : "swift",
      "sources" : [
        "ConversationTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "CLiteRTLM_mac",
      "module_type" : "BinaryTarget",
      "name" : "CLiteRTLM_mac",
      "path" : "remote/archive/CLiteRTLM_mac.xcframework.zip",
      "product_memberships" : [
        "LiteRTLM",
        "LiteRTLMFoundationModels"
      ],
      "sources" : [
      ],
      "type" : "binary"
    },
    {
      "c99name" : "CLiteRTLM",
      "module_type" : "BinaryTarget",
      "name" : "CLiteRTLM",
      "path" : "remote/archive/CLiteRTLM.xcframework.zip",
      "product_memberships" : [
        "LiteRTLM",
        "LiteRTLMFoundationModels"
      ],
      "sources" : [
      ],
      "type" : "binary"
    }
  ],
  "tools_version" : "5.9"
}
warning: 'spi-builder-workspace': Invalid Exclude '/Users/admin/builder/spi-builder-workspace/swift/device_tests': File not found.
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.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/4] Write sources
[1/4] Copying libCLiteRTLM_mac.dylib
[1/4] Write sources
[3/4] Write swift-version-2F0A5646E1D333AE.txt
[5/17] Compiling LiteRTLM Tool.swift
[6/18] Compiling LiteRTLM ResponseFormat.swift
[7/18] Compiling LiteRTLM ModelInfo.swift
[8/18] Compiling LiteRTLM Message.swift
[9/18] Compiling LiteRTLM ExperimentalFlags.swift
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:22:34: warning: static property 'optedIn' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 20 | /// To use any experimental flags, first call `ExperimentalFlags.optIntoExperimentalAPIs()`.
 21 | public struct ExperimentalFlags {
 22 |   public private(set) static var optedIn = false
    |                                  |- warning: static property 'optedIn' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                                  |- note: convert 'optedIn' to a 'let' constant to make 'Sendable' shared state immutable
    |                                  |- note: add '@MainActor' to make static property 'optedIn' part of global actor 'MainActor'
    |                                  `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 23 |
 24 |   private static let logger = Logger(
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:35:22: warning: static property '_enableBenchmark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 33 |   }
 34 |
 35 |   private static var _enableBenchmark: Bool = false
    |                      |- warning: static property '_enableBenchmark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableBenchmark' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableBenchmark' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 36 |
 37 |   public static var enableBenchmark: Bool {
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:48:22: warning: static property '_convertCamelToSnakeCaseInToolDescription' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 46 |   }
 47 |
 48 |   private static var _convertCamelToSnakeCaseInToolDescription: Bool = true
    |                      |- warning: static property '_convertCamelToSnakeCaseInToolDescription' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_convertCamelToSnakeCaseInToolDescription' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_convertCamelToSnakeCaseInToolDescription' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 49 |
 50 |   /// Whether to convert the function and parameter names in to snake case for
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:78:22: warning: static property '_enableConversationConstrainedDecoding' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 76 |   }
 77 |
 78 |   private static var _enableConversationConstrainedDecoding: Bool = false
    |                      |- warning: static property '_enableConversationConstrainedDecoding' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableConversationConstrainedDecoding' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableConversationConstrainedDecoding' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 79 |
 80 |   /// Whether to enable conversation constrained decoding. This is primarily
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:96:22: warning: static property '_enableConversationToolCallStreaming' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 94 |   }
 95 |
 96 |   private static var _enableConversationToolCallStreaming: Bool = false
    |                      |- warning: static property '_enableConversationToolCallStreaming' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableConversationToolCallStreaming' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableConversationToolCallStreaming' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 97 |
 98 |   /// Whether to enable conversation tool call streaming.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:113:22: warning: static property '_conversationToolCallStreamingChannelName' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
111 |   }
112 |
113 |   private static var _conversationToolCallStreamingChannelName: String = "tool_call"
    |                      |- warning: static property '_conversationToolCallStreamingChannelName' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_conversationToolCallStreamingChannelName' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_conversationToolCallStreamingChannelName' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
114 |
115 |   /// The channel name used for tool call tokens when streaming tool calls is enabled.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:127:22: warning: static property '_enableSpeculativeDecoding' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
125 |   }
126 |
127 |   private static var _enableSpeculativeDecoding: Bool? = nil
    |                      |- warning: static property '_enableSpeculativeDecoding' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableSpeculativeDecoding' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableSpeculativeDecoding' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
128 |
129 |   /// Whether to enable speculative decoding.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:147:22: warning: static property '_visualTokenBudget' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
145 |   }
146 |
147 |   private static var _visualTokenBudget: Int32? = nil
    |                      |- warning: static property '_visualTokenBudget' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_visualTokenBudget' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_visualTokenBudget' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
148 |
149 |   /// The visual token budget.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:175:22: warning: static property '_filterChannelContentFromKvCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
173 |   }
174 |
175 |   private static var _filterChannelContentFromKvCache: Bool? = nil
    |                      |- warning: static property '_filterChannelContentFromKvCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_filterChannelContentFromKvCache' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_filterChannelContentFromKvCache' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
176 |
177 |   /// Whether to filter channel content from the KV cache.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:189:22: warning: static property '_gpuEnableMetalResidencySet' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
187 |   }
188 |
189 |   private static var _gpuEnableMetalResidencySet: Bool? = nil
    |                      |- warning: static property '_gpuEnableMetalResidencySet' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_gpuEnableMetalResidencySet' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_gpuEnableMetalResidencySet' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
190 |
191 |   /// Whether to enable Metal residency set on GPU.
[10/18] Compiling LiteRTLM LiteRTLMError.swift
[11/18] Compiling LiteRTLM Conversation.swift
/Users/admin/builder/spi-builder-workspace/swift/Conversation.swift:63:15: warning: stored property 'handle' of 'Sendable'-conforming class 'Conversation' has non-sendable type 'CConversationHandle?' (aka 'Optional<OpaquePointer>'); this is an error in the Swift 6 language mode
 61 |   )
 62 |
 63 |   private let handle: CConversationHandle?
    |               `- warning: stored property 'handle' of 'Sendable'-conforming class 'Conversation' has non-sendable type 'CConversationHandle?' (aka 'Optional<OpaquePointer>'); this is an error in the Swift 6 language mode
 64 |   private let toolManager: ToolManager
 65 |   private let automaticToolCalling: Bool
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/swift/Conversation.swift:835:12: 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
833 |       context.pendingToolCalls = []
834 |
835 |       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
836 |         do {
837 |           let toolResponseJson = try await context.conversation.handleToolCalls(toolCalls)
    |                                            |                                    `- note: closure captures non-Sendable 'toolCalls'
    |                                            `- note: closure captures non-Sendable 'context'
838 |           try context.conversation.sendToStream(
839 |             handle: context.conversation.checkIsAlive(),
    :
851 |         // Release the reference for the current (finished) call.
852 |         // The new call from sendToStream created its own retained reference.
853 |         Unmanaged<Conversation.StreamContext>.fromOpaque(userData).release()
    |                                                          `- note: closure captures non-Sendable 'userData'
854 |       }
855 |     } else {
/Users/admin/builder/spi-builder-workspace/swift/EmbeddingEngine.swift:48:5: warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
 46 |
 47 |   deinit {
 48 |     if let handle {
    |     `- warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
 49 |       self.handle = nil
 50 |       litert_lm_embedding_engine_delete(handle)
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/swift/EmbeddingEngine.swift:49:19: warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
 47 |   deinit {
 48 |     if let handle {
 49 |       self.handle = nil
    |                   `- warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
 50 |       litert_lm_embedding_engine_delete(handle)
 51 |     }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
[12/18] Compiling LiteRTLM EmbeddingEngine.swift
/Users/admin/builder/spi-builder-workspace/swift/Conversation.swift:63:15: warning: stored property 'handle' of 'Sendable'-conforming class 'Conversation' has non-sendable type 'CConversationHandle?' (aka 'Optional<OpaquePointer>'); this is an error in the Swift 6 language mode
 61 |   )
 62 |
 63 |   private let handle: CConversationHandle?
    |               `- warning: stored property 'handle' of 'Sendable'-conforming class 'Conversation' has non-sendable type 'CConversationHandle?' (aka 'Optional<OpaquePointer>'); this is an error in the Swift 6 language mode
 64 |   private let toolManager: ToolManager
 65 |   private let automaticToolCalling: Bool
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/swift/Conversation.swift:835:12: 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
833 |       context.pendingToolCalls = []
834 |
835 |       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
836 |         do {
837 |           let toolResponseJson = try await context.conversation.handleToolCalls(toolCalls)
    |                                            |                                    `- note: closure captures non-Sendable 'toolCalls'
    |                                            `- note: closure captures non-Sendable 'context'
838 |           try context.conversation.sendToStream(
839 |             handle: context.conversation.checkIsAlive(),
    :
851 |         // Release the reference for the current (finished) call.
852 |         // The new call from sendToStream created its own retained reference.
853 |         Unmanaged<Conversation.StreamContext>.fromOpaque(userData).release()
    |                                                          `- note: closure captures non-Sendable 'userData'
854 |       }
855 |     } else {
/Users/admin/builder/spi-builder-workspace/swift/EmbeddingEngine.swift:48:5: warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
 46 |
 47 |   deinit {
 48 |     if let handle {
    |     `- warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
 49 |       self.handle = nil
 50 |       litert_lm_embedding_engine_delete(handle)
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/swift/EmbeddingEngine.swift:49:19: warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
 47 |   deinit {
 48 |     if let handle {
 49 |       self.handle = nil
    |                   `- warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
 50 |       litert_lm_embedding_engine_delete(handle)
 51 |     }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
[13/18] Compiling LiteRTLM EmbeddingEngineConfig.swift
/Users/admin/builder/spi-builder-workspace/swift/Engine.swift:338:5: warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
336 |
337 |   deinit {
338 |     if let handle = handle {
    |     `- warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
339 |       self.handle = nil
340 |       litert_lm_engine_delete(handle)
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/swift/Engine.swift:339:19: warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
337 |   deinit {
338 |     if let handle = handle {
339 |       self.handle = nil
    |                   `- warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
340 |       litert_lm_engine_delete(handle)
341 |     }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
[14/18] Compiling LiteRTLM Engine.swift
/Users/admin/builder/spi-builder-workspace/swift/Engine.swift:338:5: warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
336 |
337 |   deinit {
338 |     if let handle = handle {
    |     `- warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
339 |       self.handle = nil
340 |       litert_lm_engine_delete(handle)
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/swift/Engine.swift:339:19: warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
337 |   deinit {
338 |     if let handle = handle {
339 |       self.handle = nil
    |                   `- warning: cannot access property 'handle' with a non-sendable type 'OpaquePointer?' from nonisolated deinit; this is an error in the Swift 6 language mode
340 |       litert_lm_engine_delete(handle)
341 |     }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
[15/18] Emitting module LiteRTLM
/Users/admin/builder/spi-builder-workspace/swift/Conversation.swift:63:15: warning: stored property 'handle' of 'Sendable'-conforming class 'Conversation' has non-sendable type 'CConversationHandle?' (aka 'Optional<OpaquePointer>'); this is an error in the Swift 6 language mode
 61 |   )
 62 |
 63 |   private let handle: CConversationHandle?
    |               `- warning: stored property 'handle' of 'Sendable'-conforming class 'Conversation' has non-sendable type 'CConversationHandle?' (aka 'Optional<OpaquePointer>'); this is an error in the Swift 6 language mode
 64 |   private let toolManager: ToolManager
 65 |   private let automaticToolCalling: Bool
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:22:34: warning: static property 'optedIn' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 20 | /// To use any experimental flags, first call `ExperimentalFlags.optIntoExperimentalAPIs()`.
 21 | public struct ExperimentalFlags {
 22 |   public private(set) static var optedIn = false
    |                                  |- warning: static property 'optedIn' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                                  |- note: convert 'optedIn' to a 'let' constant to make 'Sendable' shared state immutable
    |                                  |- note: add '@MainActor' to make static property 'optedIn' part of global actor 'MainActor'
    |                                  `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 23 |
 24 |   private static let logger = Logger(
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:35:22: warning: static property '_enableBenchmark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 33 |   }
 34 |
 35 |   private static var _enableBenchmark: Bool = false
    |                      |- warning: static property '_enableBenchmark' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableBenchmark' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableBenchmark' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 36 |
 37 |   public static var enableBenchmark: Bool {
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:48:22: warning: static property '_convertCamelToSnakeCaseInToolDescription' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 46 |   }
 47 |
 48 |   private static var _convertCamelToSnakeCaseInToolDescription: Bool = true
    |                      |- warning: static property '_convertCamelToSnakeCaseInToolDescription' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_convertCamelToSnakeCaseInToolDescription' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_convertCamelToSnakeCaseInToolDescription' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 49 |
 50 |   /// Whether to convert the function and parameter names in to snake case for
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:78:22: warning: static property '_enableConversationConstrainedDecoding' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 76 |   }
 77 |
 78 |   private static var _enableConversationConstrainedDecoding: Bool = false
    |                      |- warning: static property '_enableConversationConstrainedDecoding' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableConversationConstrainedDecoding' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableConversationConstrainedDecoding' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 79 |
 80 |   /// Whether to enable conversation constrained decoding. This is primarily
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:96:22: warning: static property '_enableConversationToolCallStreaming' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 94 |   }
 95 |
 96 |   private static var _enableConversationToolCallStreaming: Bool = false
    |                      |- warning: static property '_enableConversationToolCallStreaming' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableConversationToolCallStreaming' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableConversationToolCallStreaming' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 97 |
 98 |   /// Whether to enable conversation tool call streaming.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:113:22: warning: static property '_conversationToolCallStreamingChannelName' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
111 |   }
112 |
113 |   private static var _conversationToolCallStreamingChannelName: String = "tool_call"
    |                      |- warning: static property '_conversationToolCallStreamingChannelName' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_conversationToolCallStreamingChannelName' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_conversationToolCallStreamingChannelName' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
114 |
115 |   /// The channel name used for tool call tokens when streaming tool calls is enabled.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:127:22: warning: static property '_enableSpeculativeDecoding' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
125 |   }
126 |
127 |   private static var _enableSpeculativeDecoding: Bool? = nil
    |                      |- warning: static property '_enableSpeculativeDecoding' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableSpeculativeDecoding' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableSpeculativeDecoding' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
128 |
129 |   /// Whether to enable speculative decoding.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:147:22: warning: static property '_visualTokenBudget' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
145 |   }
146 |
147 |   private static var _visualTokenBudget: Int32? = nil
    |                      |- warning: static property '_visualTokenBudget' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_visualTokenBudget' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_visualTokenBudget' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
148 |
149 |   /// The visual token budget.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:175:22: warning: static property '_filterChannelContentFromKvCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
173 |   }
174 |
175 |   private static var _filterChannelContentFromKvCache: Bool? = nil
    |                      |- warning: static property '_filterChannelContentFromKvCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_filterChannelContentFromKvCache' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_filterChannelContentFromKvCache' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
176 |
177 |   /// Whether to filter channel content from the KV cache.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:189:22: warning: static property '_gpuEnableMetalResidencySet' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
187 |   }
188 |
189 |   private static var _gpuEnableMetalResidencySet: Bool? = nil
    |                      |- warning: static property '_gpuEnableMetalResidencySet' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_gpuEnableMetalResidencySet' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_gpuEnableMetalResidencySet' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
190 |
191 |   /// Whether to enable Metal residency set on GPU.
[16/18] Compiling LiteRTLM Benchmark.swift
[17/18] Compiling LiteRTLM Config.swift
[18/18] Compiling LiteRTLM ToolManager.swift
[19/22] Compiling LiteRTLMFoundationModels LiteRTSegments.swift
[20/22] Emitting module LiteRTLMFoundationModels
[21/22] Compiling LiteRTLMFoundationModels LiteRTLanguageModel.swift
[22/22] Compiling LiteRTLMFoundationModels CGImagePNG.swift
Build complete! (9.81s)
Downloading binary artifact https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.18.1/CLiteRTLM_mac.xcframework.zip
Downloading binary artifact https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.18.1/CLiteRTLM.xcframework.zip
[16148/45202375] Downloading https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.18.1/CLiteRTLM_mac.xcframework.zip
[31665/169332025] Downloading https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.18.1/CLiteRTLM_mac.xcframework.zip, https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.18.1/CLiteRTLM.xcframework.zip
Downloaded https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.18.1/CLiteRTLM_mac.xcframework.zip (2.90s)
Downloaded https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.18.1/CLiteRTLM.xcframework.zip (3.50s)
warning: 'spi-builder-workspace': Invalid Exclude '/Users/admin/builder/spi-builder-workspace/swift/device_tests': File not found.
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "LiteRTLM",
  "name" : "LiteRTLM",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "macos",
      "version" : "12.0"
    }
  ],
  "products" : [
    {
      "name" : "LiteRTLM",
      "targets" : [
        "LiteRTLM"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "LiteRTLMFoundationModels",
      "targets" : [
        "LiteRTLMFoundationModels"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "ToolTests",
      "module_type" : "SwiftTarget",
      "name" : "ToolTests",
      "path" : "swift",
      "sources" : [
        "ToolTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "ModelInfoTests",
      "module_type" : "SwiftTarget",
      "name" : "ModelInfoTests",
      "path" : "swift",
      "sources" : [
        "ModelInfoTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "MessageTests",
      "module_type" : "SwiftTarget",
      "name" : "MessageTests",
      "path" : "swift",
      "sources" : [
        "MessageTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "LiteRTLMFoundationModels",
      "module_type" : "SwiftTarget",
      "name" : "LiteRTLMFoundationModels",
      "path" : "swift/apple_fm",
      "product_memberships" : [
        "LiteRTLMFoundationModels"
      ],
      "sources" : [
        "CGImagePNG.swift",
        "LiteRTLanguageModel.swift",
        "LiteRTSegments.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "library"
    },
    {
      "c99name" : "LiteRTLM",
      "module_type" : "SwiftTarget",
      "name" : "LiteRTLM",
      "path" : "swift",
      "product_memberships" : [
        "LiteRTLM",
        "LiteRTLMFoundationModels"
      ],
      "sources" : [
        "Benchmark.swift",
        "Config.swift",
        "Conversation.swift",
        "EmbeddingEngine.swift",
        "EmbeddingEngineConfig.swift",
        "Engine.swift",
        "ExperimentalFlags.swift",
        "LiteRTLMError.swift",
        "Message.swift",
        "ModelInfo.swift",
        "ResponseFormat.swift",
        "Tool.swift",
        "ToolManager.swift"
      ],
      "target_dependencies" : [
        "CLiteRTLM",
        "CLiteRTLM_mac"
      ],
      "type" : "library"
    },
    {
      "c99name" : "EngineTests",
      "module_type" : "SwiftTarget",
      "name" : "EngineTests",
      "path" : "swift",
      "sources" : [
        "EngineTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "EmbeddingEngineTests",
      "module_type" : "SwiftTarget",
      "name" : "EmbeddingEngineTests",
      "path" : "swift",
      "sources" : [
        "EmbeddingEngineTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "ConversationTests",
      "module_type" : "SwiftTarget",
      "name" : "ConversationTests",
      "path" : "swift",
      "sources" : [
        "ConversationTests.swift"
      ],
      "target_dependencies" : [
        "LiteRTLM"
      ],
      "type" : "test"
    },
    {
      "c99name" : "CLiteRTLM_mac",
      "module_type" : "BinaryTarget",
      "name" : "CLiteRTLM_mac",
      "path" : "remote/archive/CLiteRTLM_mac.xcframework.zip",
      "product_memberships" : [
        "LiteRTLM",
        "LiteRTLMFoundationModels"
      ],
      "sources" : [
      ],
      "type" : "binary"
    },
    {
      "c99name" : "CLiteRTLM",
      "module_type" : "BinaryTarget",
      "name" : "CLiteRTLM",
      "path" : "remote/archive/CLiteRTLM.xcframework.zip",
      "product_memberships" : [
        "LiteRTLM",
        "LiteRTLMFoundationModels"
      ],
      "sources" : [
      ],
      "type" : "binary"
    }
  ],
  "tools_version" : "5.9"
}
warning: 'spi-builder-workspace': Invalid Exclude '/Users/admin/builder/spi-builder-workspace/swift/device_tests': File not found.
Done.