The Swift Package Index logo.Swift Package Index

Build Information

Successful build of LiteRTLM, reference v0.19.1 (7a0372), with Swift 6.1 for macOS (SPM) on 6 Nov 2026 05:27:42 UTC.

Swift 6 data race errors: 12

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.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/google-ai-edge/LiteRT-LM.git
Reference: v0.19.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/google-ai-edge/LiteRT-LM
 * tag               v0.19.1    -> FETCH_HEAD
HEAD is now at 7a03724 Update LiteRT-LM Swift package binaries to v0.19.1.
Updating files:  85% (1523/1784)
Updating files:  86% (1535/1784)
Updating files:  87% (1553/1784)
Updating files:  88% (1570/1784)
Updating files:  89% (1588/1784)
Updating files:  90% (1606/1784)
Updating files:  91% (1624/1784)
Updating files:  92% (1642/1784)
Updating files:  93% (1660/1784)
Updating files:  94% (1677/1784)
Updating files:  95% (1695/1784)
Updating files:  96% (1713/1784)
Updating files:  97% (1731/1784)
Updating files:  98% (1749/1784)
Updating files:  99% (1767/1784)
Updating files: 100% (1784/1784)
Updating files: 100% (1784/1784), done.
Cloned https://github.com/google-ai-edge/LiteRT-LM.git
Revision (git rev-parse @):
7a03724cece417f1724c923b3d527b4319730841
SUCCESS checkout https://github.com/google-ai-edge/LiteRT-LM.git at v0.19.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"
}
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] Copying libCLiteRTLM_mac.dylib
[1/4] Write sources
[3/4] Write swift-version-2F0A5646E1D333AE.txt
[5/17] Compiling LiteRTLM ResponseFormat.swift
[6/17] Compiling LiteRTLM Tool.swift
[7/18] Compiling LiteRTLM ModelInfo.swift
[8/18] Compiling LiteRTLM LiteRTLMError.swift
[9/18] Compiling LiteRTLM Message.swift
[10/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 |   /// The value of the deprecated `enableSpeculativeDecoding`, for the engine to read without a
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:153: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
151 |   }
152 |
153 |   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
154 |
155 |   /// The visual token budget.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:181: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
179 |   }
180 |
181 |   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
182 |
183 |   /// Whether to filter channel content from the KV cache.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:195: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
193 |   }
194 |
195 |   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
196 |
197 |   /// Whether to enable Metal residency set on GPU.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:211:22: warning: static property '_enableYnnpack' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
209 |   }
210 |
211 |   private static var _enableYnnpack: Bool? = nil
    |                      |- warning: static property '_enableYnnpack' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableYnnpack' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableYnnpack' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
212 |
213 |   /// Whether YNNPACK should delegate supported CPU operations before XNNPACK.
[11/18] Compiling LiteRTLM EmbeddingEngineConfig.swift
/Users/admin/builder/spi-builder-workspace/swift/Engine.swift:436: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
434 |
435 |   deinit {
436 |     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
437 |       self.handle = nil
438 |       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:437: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
435 |   deinit {
436 |     if let handle = handle {
437 |       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
438 |       litert_lm_engine_delete(handle)
439 |     }
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 Engine.swift
/Users/admin/builder/spi-builder-workspace/swift/Engine.swift:436: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
434 |
435 |   deinit {
436 |     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
437 |       self.handle = nil
438 |       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:437: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
435 |   deinit {
436 |     if let handle = handle {
437 |       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
438 |       litert_lm_engine_delete(handle)
439 |     }
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 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:919: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
917 |       context.pendingToolCalls = []
918 |
919 |       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
920 |         do {
921 |           let toolResponseJson = try await context.conversation.handleToolCalls(toolCalls)
    |                                            |                                    `- note: closure captures non-Sendable 'toolCalls'
    |                                            `- note: closure captures non-Sendable 'context'
922 |           try context.conversation.sendToStream(
923 |             handle: context.conversation.checkIsAlive(),
    :
935 |         // Release the reference for the current (finished) call.
936 |         // The new call from sendToStream created its own retained reference.
937 |         Unmanaged<Conversation.StreamContext>.fromOpaque(userData).release()
    |                                                          `- note: closure captures non-Sendable 'userData'
938 |       }
939 |     } 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)
[14/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:919: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
917 |       context.pendingToolCalls = []
918 |
919 |       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
920 |         do {
921 |           let toolResponseJson = try await context.conversation.handleToolCalls(toolCalls)
    |                                            |                                    `- note: closure captures non-Sendable 'toolCalls'
    |                                            `- note: closure captures non-Sendable 'context'
922 |           try context.conversation.sendToStream(
923 |             handle: context.conversation.checkIsAlive(),
    :
935 |         // Release the reference for the current (finished) call.
936 |         // The new call from sendToStream created its own retained reference.
937 |         Unmanaged<Conversation.StreamContext>.fromOpaque(userData).release()
    |                                                          `- note: closure captures non-Sendable 'userData'
938 |       }
939 |     } 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)
[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 |   /// The value of the deprecated `enableSpeculativeDecoding`, for the engine to read without a
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:153: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
151 |   }
152 |
153 |   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
154 |
155 |   /// The visual token budget.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:181: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
179 |   }
180 |
181 |   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
182 |
183 |   /// Whether to filter channel content from the KV cache.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:195: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
193 |   }
194 |
195 |   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
196 |
197 |   /// Whether to enable Metal residency set on GPU.
/Users/admin/builder/spi-builder-workspace/swift/ExperimentalFlags.swift:211:22: warning: static property '_enableYnnpack' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
209 |   }
210 |
211 |   private static var _enableYnnpack: Bool? = nil
    |                      |- warning: static property '_enableYnnpack' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                      |- note: convert '_enableYnnpack' to a 'let' constant to make 'Sendable' shared state immutable
    |                      |- note: add '@MainActor' to make static property '_enableYnnpack' part of global actor 'MainActor'
    |                      `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
212 |
213 |   /// Whether YNNPACK should delegate supported CPU operations before XNNPACK.
[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] Compiling LiteRTLMFoundationModels CGImagePNG.swift
[21/22] Compiling LiteRTLMFoundationModels LiteRTLanguageModel.swift
[22/22] Emitting module LiteRTLMFoundationModels
Build complete! (16.48s)
Downloading binary artifact https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.19.1/CLiteRTLM.xcframework.zip
Downloading binary artifact https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.19.1/CLiteRTLM_mac.xcframework.zip
[8948/46977594] Downloading https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.19.1/CLiteRTLM_mac.xcframework.zip
[8813878/142776082] Downloading https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.19.1/CLiteRTLM_mac.xcframework.zip, https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.19.1/CLiteRTLM.xcframework.zip
Downloaded https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.19.1/CLiteRTLM_mac.xcframework.zip (4.80s)
[84030531/95798488] Downloading https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.19.1/CLiteRTLM.xcframework.zip
Downloaded https://github.com/google-ai-edge/LiteRT-LM/releases/download/v0.19.1/CLiteRTLM.xcframework.zip (7.46s)
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"
}
Done.