Skip to content

Make the package resolvable next to newer swift-syntax, and vend the core module - #99

Merged
tattn merged 1 commit into
tattn:mainfrom
sebastien-burel:packaging-fixes
Aug 25, 2026
Merged

Make the package resolvable next to newer swift-syntax, and vend the core module#99
tattn merged 1 commit into
tattn:mainfrom
sebastien-burel:packaging-fixes

Conversation

@sebastien-burel

Copy link
Copy Markdown
Contributor

Two small packaging changes, found while depending on LocalLLMClientLlama from a package that also uses MLX.

swift-syntax range

from: "600.0.0" means 600.0.0..<601.0.0. Any graph that also contains a package requiring a newer swift-syntax cannot resolve:

error: Dependencies could not be resolved because 'mlx-swift-lm' depends on
'swift-syntax' 602.0.0..<604.0.0 and 'localllmclient' depends on
'swift-syntax' 600.0.0..<601.0.0.

This bites even when the client only uses the llama backend and never builds the macro targets, since SwiftPM resolves the whole package graph. Widened to 600..<604.

LocalLLMClientCore as a product

A host that builds its tools from data rather than from the @Tool macros has no use for the macro layer, but the only way to reach AnyLLMTool today is through the LocalLLMClient umbrella target, which depends on LocalLLMClientMacros and so pulls swift-syntax in for nothing. Vending the core target as its own product lets such a client depend on just what it uses.

Both LocalLLMClientCore and LocalLLMClientLlama build clean on this branch.

…core

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.

@tattn tattn left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.
I think this is a good change, so I'll go ahead and merge it.

@tattn
tattn merged commit 1daacf8 into tattn:main Aug 25, 2026
8 of 10 checks passed
sebastien-burel added a commit to sebastien-burel/KaozKit that referenced this pull request Aug 25, 2026
tattn/LocalLLMClient#99 — the swift-syntax range that collided with
mlx-swift-lm's, and vending LocalLLMClientCore — was merged upstream
within the hour, which is what splitting the work into two PRs was for.

Rebasing the fork onto the new upstream main drops that commit as already
applied, so the delta KaozKit carries is now only the runtime tool
schemas of #100: three files, no packaging changes. Drop the fork
entirely when that one lands too.
@sebastien-burel

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review and merge. For context: I hit the swift-syntax range while depending on LocalLLMClientLlama from a package that also uses mlx-swift-lm, and the llama backend has been working well for local GGUF inference since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants