File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,6 +132,29 @@ dependencies: [
132132]
133133```
134134
135+ > [ !IMPORTANT]
136+ > Due to a [ Swift Package Manager bug] ( https://github.com/swiftlang/swift-package-manager/issues/9286 ) ,
137+ > dependency resolution may fail when you enable traits,
138+ > producing the error "exhausted attempts to resolve the dependencies graph."
139+ > To work around this issue,
140+ > add the underlying dependencies for each trait directly to your package:
141+ >
142+ > ``` swift
143+ > dependencies: [
144+ > .package (
145+ > url: " https://github.com/mattt/AnyLanguageModel.git" ,
146+ > from: " 0.7.0" ,
147+ > traits: [" CoreML" , " MLX" , " Llama" ]
148+ > ),
149+ > .package (url : " https://github.com/huggingface/swift-transformers" , from : " 1.0.0" ), // CoreML
150+ > .package (url : " https://github.com/ml-explore/mlx-swift-lm" , from : " 2.25.5" ), // MLX
151+ > .package (url : " https://github.com/mattt/llama.swift" , from : " 2.0.0" ), // Llama
152+ > ]
153+ > ```
154+ >
155+ > Include only the dependencies that correspond to the traits you enable.
156+ > For more information, see [issue #135 ](https :// github.com/mattt/AnyLanguageModel/issues/135).
157+
135158### Using Traits in Xcode Projects
136159
137160Xcode doesn't yet provide a built- in way to declare package dependencies with traits.
You can’t perform that action at this time.
0 commit comments