fix: declare MLXFast as KokoroSwift target dependency#36
Open
rodexyh wants to merge 1 commit into
Open
Conversation
BuildingBlocks/LayerNormInference.swift imports MLXFast and calls
MLXFast.layerNorm(...), but Package.swift never declares MLXFast as a
target dependency. macOS `swift build` can resolve via transitive caching;
Xcode iOS device builds fail at module resolution:
error: No such module 'MLXFast'
import MLXFast
^
Add MLXFast to the KokoroSwift target's dependencies (the package is
already pulled in via mlx-swift, this just exposes it to imports).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
`BuildingBlocks/LayerNormInference.swift` imports `MLXFast` and calls `MLXFast.layerNorm(weight:bias:eps:)`, but `Package.swift` never declares `MLXFast` as a target dependency.
`swift build` on macOS appears to resolve via transitive caching (1.0.11 builds clean for me), but Xcode iOS device builds fail at module resolution:
```
error: No such module 'MLXFast'
import MLXFast
^
```
This affects every tagged release (1.0.10, 1.0.11) and `main`.
Fix
Add one product reference to the KokoroSwift target dependencies:
```swift
.product(name: "MLXFast", package: "mlx-swift"),
```
`MLXFast` already lives in the `mlx-swift` package that's pulled in here — this just exposes it to imports.
Test plan
Thanks for the great library — found this while integrating KokoroSwift into a vocab learning iOS app. Happy to add a regression test if you'd like.