Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion SwiftBuddy/generate_xcodeproj.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def uid():
PROD_MLX = uid()
PROD_MLXLLM = uid()
PROD_MLXLMC = uid()
PROD_MLXVLM = uid()
PROD_HUB = uid()
PROD_TOKENIZERS = uid()
PROD_HUMMINGBIRD = uid()
Expand All @@ -52,6 +53,7 @@ def uid():
BF_MLX_FWK = uid()
BF_MLXLLM_FWK = uid()
BF_MLXLMC_FWK = uid()
BF_MLXVLM_FWK = uid()
BF_HUB_FWK = uid()
BF_TOKENIZERS_FWK = uid()
BF_HUMMINGBIRD_FWK = uid()
Expand All @@ -74,6 +76,7 @@ def uid():
("../Sources/MLXInferenceCore/ModelDownloader.swift", uid(), uid()),
("../Sources/MLXInferenceCore/ModelDownloadManager.swift", uid(), uid()),
("../Sources/MLXInferenceCore/HFModelSearch.swift", uid(), uid()),
("../Sources/MLXInferenceCore/ModelArchitectureProbe.swift", uid(), uid()),
("../Sources/MLXInferenceCore/InferenceEngine.swift", uid(), uid()),
]

Expand All @@ -89,6 +92,7 @@ def pbxproj():
build_files += f"\t\t{BF_MLX_FWK} /* MLX in Frameworks */ = {{isa = PBXBuildFile; productRef = {PROD_MLX} /* MLX */; }};\n"
build_files += f"\t\t{BF_MLXLLM_FWK} /* MLXLLM in Frameworks */ = {{isa = PBXBuildFile; productRef = {PROD_MLXLLM} /* MLXLLM */; }};\n"
build_files += f"\t\t{BF_MLXLMC_FWK} /* MLXLMCommon in Frameworks */ = {{isa = PBXBuildFile; productRef = {PROD_MLXLMC} /* MLXLMCommon */; }};\n"
build_files += f"\t\t{BF_MLXVLM_FWK} /* MLXVLM in Frameworks */ = {{isa = PBXBuildFile; productRef = {PROD_MLXVLM} /* MLXVLM */; }};\n"
build_files += f"\t\t{BF_HUB_FWK} /* Hub in Frameworks */ = {{isa = PBXBuildFile; productRef = {PROD_HUB} /* Hub */; }};\n"
build_files += f"\t\t{BF_TOKENIZERS_FWK} /* Tokenizers in Frameworks */ = {{isa = PBXBuildFile; productRef = {PROD_TOKENIZERS} /* Tokenizers */; }};\n"
build_files += f"\t\t{BF_HUMMINGBIRD_FWK} /* Hummingbird in Frameworks */ = {{isa = PBXBuildFile; productRef = {PROD_HUMMINGBIRD} /* Hummingbird */; }};\n"
Expand Down Expand Up @@ -153,6 +157,7 @@ def pbxproj():
\t\t\t\t{BF_MLX_FWK} /* MLX in Frameworks */,
\t\t\t\t{BF_MLXLLM_FWK} /* MLXLLM in Frameworks */,
\t\t\t\t{BF_MLXLMC_FWK} /* MLXLMCommon in Frameworks */,
{BF_MLXVLM_FWK} /* MLXVLM in Frameworks */,
Comment thread
solderzzc marked this conversation as resolved.
Outdated
\t\t\t\t{BF_HUB_FWK} /* Hub in Frameworks */,
\t\t\t\t{BF_TOKENIZERS_FWK} /* Tokenizers in Frameworks */,
\t\t\t\t{BF_HUMMINGBIRD_FWK} /* Hummingbird in Frameworks */,
Expand Down Expand Up @@ -233,6 +238,7 @@ def pbxproj():
\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.
\t\t\t\t{PROD_HUB} /* Hub */,
\t\t\t\t{PROD_TOKENIZERS} /* Tokenizers */,
\t\t\t\t{PROD_HUMMINGBIRD} /* Hummingbird */,
Expand Down Expand Up @@ -454,6 +460,11 @@ def pbxproj():
\t\t\tisa = XCSwiftPackageProductDependency;
\t\t\tpackage = {PKG_MLXLM};
\t\t\tproductName = MLXLMCommon;
}};
{PROD_MLXVLM} /* MLXVLM */ = {{
isa = XCSwiftPackageProductDependency;
package = {PKG_MLXLM};
productName = MLXVLM;
\t\t}};
Comment on lines +463 to 468
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.
\t\t{PROD_HUB} /* Hub */ = {{
\t\t\tisa = XCSwiftPackageProductDependency;
Expand Down Expand Up @@ -507,7 +518,7 @@ def main():
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")
Comment on lines 518 to 522
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.
print()
print("🎉 Open SwiftBuddy.xcodeproj in Xcode — no manual package setup needed.")
Expand Down
Loading