Skip to content

fix(build): isolate MLX headers from project warnings - #27

Merged
mudler merged 1 commit into
mudler:mainfrom
localai-org-maint-bot:cron/fix-mlx-system-headers
Aug 3, 2026
Merged

fix(build): isolate MLX headers from project warnings#27
mudler merged 1 commit into
mudler:mainfrom
localai-org-maint-bot:cron/fix-mlx-system-headers

Conversation

@localai-org-maint-bot

Copy link
Copy Markdown
Contributor

Summary

  • model MLX as an imported CMake dependency with an explicit SYSTEM include interface
  • remove the translation-unit Clang diagnostic pragma
  • add a focused compiler regression proving dependency warnings are non-fatal while project warnings remain fatal

Root cause

PRs #23 and #24 scoped warning exceptions to metal_mlx_provider.mm, but LocalAI Darwin job 30783379823 still promoted -Wgnu-folding-constant diagnostics originating in MLX 0.29.3 headers through the target-wide -Werror. The durable ownership boundary is the CMake dependency, not one consumer translation unit.

Verification

  • RED-first: missing MLXDependency.cmake failed the new regression before implementation
  • python3 tests/scripts/test_mlx_system_headers.py -v (structural arm passes; compiler arms skip locally because this host lacks CMake/Clang)
  • python3 tests/scripts/test_compiler_pragma_boundaries.py -v
  • python3 tests/scripts/test_doc_checkpoint.py -v
  • python3 scripts/check-readme-structure.py
  • python3 scripts/check-agent-record.py
  • python3 scripts/check-doc-checkpoint.py --commit HEAD
  • git diff HEAD^ --check

Darwin CI is the binding AppleClang compiler verification.

Model MLX as an imported CMake dependency with an explicit SYSTEM include interface. Keep vllm.cpp warnings fatal and remove the translation-unit diagnostic pragma.

FOLLOWING_AGENTS_PROTOCOL

Assisted-by: Codex:gpt-5 [systematic-debugging] [test-driven-development]
@mudler
mudler merged commit 6f9d991 into mudler:main Aug 3, 2026
9 of 10 checks passed
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