Problem
Package.swift uses exact: version pins for all dependencies:
.package(url: "https://github.com/ml-explore/mlx-swift", exact: "0.30.2"),
.package(url: "https://github.com/mlalma/MisakiSwift", exact: "1.0.6"),
.package(url: "https://github.com/mlalma/MLXUtilsLibrary.git", exact: "0.0.6")
This makes it impossible to use KokoroSwift alongside other packages that depend on mlx-swift (e.g., mlx-swift-lm), because SPM cannot resolve exact: "0.30.2" and >= 0.30.3 at the same time.
This is the same category of issue as #26 — constraints in Package.swift that prevent KokoroSwift from being used as a dependency in projects with other MLX-based packages.
Suggested fix
Change exact: to from: for all dependencies:
.package(url: "https://github.com/ml-explore/mlx-swift", from: "0.30.2"),
.package(url: "https://github.com/mlalma/MisakiSwift", from: "1.0.6"),
.package(url: "https://github.com/mlalma/MLXUtilsLibrary.git", from: "0.0.6")
The same change would be needed in MisakiSwift's Package.swift as well.
This allows SPM to resolve a compatible version across all packages while still respecting semver lower bounds.
Context
I'm building a Swift CLI that uses mlx-swift-lm for LLM inference and would like to add Kokoro TTS. Currently the only workaround is forking both repos to relax the pins.
Problem
Package.swiftusesexact:version pins for all dependencies:This makes it impossible to use KokoroSwift alongside other packages that depend on mlx-swift (e.g., mlx-swift-lm), because SPM cannot resolve
exact: "0.30.2"and>= 0.30.3at the same time.This is the same category of issue as #26 — constraints in
Package.swiftthat prevent KokoroSwift from being used as a dependency in projects with other MLX-based packages.Suggested fix
Change
exact:tofrom:for all dependencies:The same change would be needed in MisakiSwift's Package.swift as well.
This allows SPM to resolve a compatible version across all packages while still respecting semver lower bounds.
Context
I'm building a Swift CLI that uses mlx-swift-lm for LLM inference and would like to add Kokoro TTS. Currently the only workaround is forking both repos to relax the pins.