From 39e1b4203394b8b3cc58fe2de1cfb430beda0fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Burel?= Date: Tue, 25 Aug 2026 12:19:25 +0200 Subject: [PATCH] Make the package resolvable next to newer swift-syntax, and vend the core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pinning swift-syntax to `from: "600.0.0"` — which SwiftPM reads as 600.0.0..<601.0.0 — makes this package unresolvable in any graph that also contains something requiring a newer one. mlx-swift-lm asks for 602..<604, so the two cannot coexist today, even for a client that only uses the llama backend and never builds the macro targets. Widened to 600..<604. `LocalLLMClientCore` is also vended as its own product. A host that builds its tools from data has no use for the macros, and reaching the core through the umbrella target drags swift-syntax into its dependency graph for nothing. --- Package.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index e58e16f..a2e9655 100644 --- a/Package.swift +++ b/Package.swift @@ -11,7 +11,7 @@ let llamaBuildNumber = String(llamaVersion.dropFirst()) var packageDependencies: [Package.Dependency] = [ .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.4.0")), .package(url: "https://github.com/huggingface/swift-jinja", from: "2.3.5"), - .package(url: "https://github.com/swiftlang/swift-syntax", from: "600.0.0") + .package(url: "https://github.com/swiftlang/swift-syntax", "600.0.0"..<"604.0.0") ] #if os(iOS) || os(macOS) @@ -25,7 +25,11 @@ packageDependencies.append(contentsOf: [ // MARK: - Package Products var packageProducts: [Product] = [ - .library(name: "LocalLLMClient", targets: ["LocalLLMClient"]) + .library(name: "LocalLLMClient", targets: ["LocalLLMClient"]), + // The core module on its own, without the macro layer on top. A host that + // builds its tools from runtime data never uses the macros, and pulling them + // in would drag swift-syntax into its dependency graph for nothing. + .library(name: "LocalLLMClientCore", targets: ["LocalLLMClientCore"]), ] #if os(iOS) || os(macOS)