Skip to content

Relax exact version pins to allow compatibility with mlx-swift-lm #28

Description

@jcalderita

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions