Update vendored fmt from 10.2.1 to 12.1.0#377
Open
Nicolas-nwb wants to merge 1 commit intoml-explore:mainfrom
Open
Update vendored fmt from 10.2.1 to 12.1.0#377Nicolas-nwb wants to merge 1 commit intoml-explore:mainfrom
Nicolas-nwb wants to merge 1 commit intoml-explore:mainfrom
Conversation
Fix compilation with Clang 21 (Xcode 26.4) which rejects consteval expressions in fmt 10.x format string parser. Only the compiled/included files are updated (headers + format.cc). Test, doc, and support files are left unchanged as they are excluded from the SwiftPM build. fmt 12.1.0 includes the consteval fix (PR fmtlib/fmt#4552) and is fully compatible with the existing mlx fmt usage (fmt::format, fmt::runtime).
218b2f7 to
09b8d0c
Compare
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.
Proposed changes
Update the vendored
fmtlibrary from version 10.2.1 to 12.1.0 to fix compilation errors with Clang 21 (shipped in Xcode 26.4).Clang 21 tightened
constevalrules and rejects expressions in fmt 10.x's format string parser (FMT_STRINGmacro), causing build failures informat.ccandformat-inl.h:fmt 12.1.0 includes the fix (fmtlib/fmt#4552, fmtlib/fmt#4546) and is fully backward-compatible with the fmt API surface used by mlx (
fmt::format,fmt::runtime,fmt::literals).Changes
Source/Cmlx/fmt/include/fmt/*.h(headers only)Source/Cmlx/fmt/src/format.cc(sole compiled source file)Source/Cmlx/vendor-README.mdto reflect the new versionNotes
base.hand madecore.ha backward-compatible shim — no impact since mlx only includes<fmt/format.h>swift buildpasses successfullyChecklist
pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes