Skip to content

fix(swiftbuddy): add MLXVLM and ModelArchitectureProbe to xcodeproj generator#62

Merged
solderzzc merged 2 commits intomainfrom
fix/swiftbuddy-xcodeproj-mlxvlm
Apr 17, 2026
Merged

fix(swiftbuddy): add MLXVLM and ModelArchitectureProbe to xcodeproj generator#62
solderzzc merged 2 commits intomainfrom
fix/swiftbuddy-xcodeproj-mlxvlm

Conversation

@solderzzc
Copy link
Copy Markdown
Member

Summary

PR #57 introduced two new entities to InferenceEngine.swift and MLXInferenceCore:

  • ModelArchitectureProbe.swift (new source file)
  • import MLXVLM (new SPM product dependency)

The SwiftBuddy/generate_xcodeproj.py script that generates the Xcode project for the macOS DMG wrapper was not updated with these additions, causing the Build macOS DMG Wrapper release job to fail with:

error: no such module 'MLXVLM'

Changes

  • Registers MLXVLM as an SPM product dependency (from local mlx-swift-lm package)
  • Adds ModelArchitectureProbe.swift to the MLXInferenceCore source group
  • Confirms the fix locally with a successful xcodebuild run (BUILD SUCCEEDED)

…erator

The release workflow uses xcodebuild via generate_xcodeproj.py to build the macOS DMG wrapper.
PR 57 introduced ModelArchitectureProbe.swift to MLXInferenceCore, and also added an import for MLXVLM in InferenceEngine.swift.
This commit adds both the missing source file and the missing SPM product dependency to generate_xcodeproj.py so that the UI can build successfully.
Copilot AI review requested due to automatic review settings April 17, 2026 14:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Xcode project generator so the macOS DMG wrapper build includes the newly added MLXVLM SPM product dependency and the ModelArchitectureProbe.swift source file, fixing the no such module 'MLXVLM' failure introduced by PR #57.

Changes:

  • Adds MLXVLM as an XCSwiftPackageProductDependency and links it in the Frameworks build phase.
  • Registers ModelArchitectureProbe.swift in the MLXInferenceCore sources list used by the generator.
  • Updates the generator’s console output list to include ModelArchitectureProbe.swift.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 518 to 522
print("📂 MLXInferenceCore sources included directly:")
for p, _, _ in [("ChatMessage", None, None), ("GenerationConfig", None, None),
("ModelCatalog", None, None), ("ModelDownloadManager", None, None),
("InferenceEngine", None, None)]:
("ModelArchitectureProbe", None, None), ("InferenceEngine", None, None)]:
print(f" • {p}.swift")
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The "MLXInferenceCore sources included directly" output is maintained as a hard-coded list, which has already drifted from core_sources and required a manual update for ModelArchitectureProbe. Consider deriving this list from core_sources (e.g., printing Path(path).stem for each entry) so future file additions don’t require updating two places and the output stays accurate.

Copilot uses AI. Check for mistakes.
Comment thread SwiftBuddy/generate_xcodeproj.py Outdated
\t\t\t\t{PROD_MLX} /* MLX */,
\t\t\t\t{PROD_MLXLLM} /* MLXLLM */,
\t\t\t\t{PROD_MLXLMC} /* MLXLMCommon */,
{PROD_MLXVLM} /* MLXVLM */,
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

Same indentation inconsistency as above in the packageProductDependencies list (the MLXVLM entry is not aligned/escaped like adjacent entries). Consider matching the surrounding \t\t\t\t... formatting for readability and stable generated output.

Suggested change
{PROD_MLXVLM} /* MLXVLM */,
\t\t\t\t{PROD_MLXVLM} /* MLXVLM */,

Copilot uses AI. Check for mistakes.
Comment on lines +463 to 468
}};
{PROD_MLXVLM} /* MLXVLM */ = {{
isa = XCSwiftPackageProductDependency;
package = {PKG_MLXLM};
productName = MLXVLM;
\t\t}};
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

In the XCSwiftPackageProductDependency section, the newly added MLXVLM block (and the preceding MLXLMCommon block terminator) use different indentation than the rest of the section. Aligning these lines with the established \t\t... indentation keeps the generator output consistent and easier to maintain.

Suggested change
}};
{PROD_MLXVLM} /* MLXVLM */ = {{
isa = XCSwiftPackageProductDependency;
package = {PKG_MLXLM};
productName = MLXVLM;
\t\t}};
\t\t}};
\t\t{PROD_MLXVLM} /* MLXVLM */ = {{
\t\t\tisa = XCSwiftPackageProductDependency;
\t\t\tpackage = {PKG_MLXLM};
\t\t\tproductName = MLXVLM;
\t\t}};

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@solderzzc solderzzc merged commit eb5a677 into main Apr 17, 2026
8 checks passed
@solderzzc solderzzc deleted the fix/swiftbuddy-xcodeproj-mlxvlm branch April 17, 2026 15:14
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