Skip to content

Add <fmt/format.h> for fmt 11+ compatibility - #756

Merged
rhaschke merged 2 commits into
moveit:masterfrom
idesign0:macos-fmt-pr
Aug 14, 2026
Merged

Add <fmt/format.h> for fmt 11+ compatibility#756
rhaschke merged 2 commits into
moveit:masterfrom
idesign0:macos-fmt-pr

Conversation

@idesign0

Copy link
Copy Markdown
Contributor

What

fmt 11 (2024) reorganized its headers: fmt::format and the other formatting functions moved out of <fmt/core.h> into <fmt/format.h> (core.h became a lightweight base). Files that include only <fmt/core.h> and call fmt::format(...) fail to compile against fmt 11 / 12 with:

error: no member named 'format' in namespace 'fmt'

Homebrew now ships fmt 12.2.0, so this surfaces on macOS / Apple-clang builds.

Fix

Add #include <fmt/format.h> to the affected file(s):

  • core/include/moveit/task_constructor/fmt_p.h
  • core/include/moveit/task_constructor/stage_p.h
  • visualization/visualization_tools/src/display_solution.cpp

<fmt/format.h> provides fmt::format in every fmt release (it pulls in the base header), so this is backward-compatible — no minimum-fmt bump and no behaviour change on older fmt.

Tested on

  • macOS 26 (Apple Silicon / arm64) — GitHub Actions macos-26 runners
  • Apple clang 21.0.0 (clang-2100.1.1.101, target arm64-apple-darwin25.5.0), C++17, libc++
  • fmt 12.2.0 (Homebrew)
  • Built from source in a ROS 2 (Humble / Jazzy / Kilted) workspace, CMake 4.3

🤖 Generated with Claude Code

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.93%. Comparing base (722d7b0) to head (6b87e21).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #756   +/-   ##
=======================================
  Coverage   52.93%   52.93%           
=======================================
  Files         138      138           
  Lines       10651    10651           
  Branches     1129     1129           
=======================================
  Hits         5637     5637           
  Misses       5006     5006           
  Partials        8        8           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@idesign0
idesign0 force-pushed the macos-fmt-pr branch 2 times, most recently from 770fe85 to 6fc5b05 Compare August 14, 2026 10:00
@idesign0

Copy link
Copy Markdown
Contributor Author

fyi, @traversaro.

Signed-off-by: idesign0 <dhruvpatel2991998@gmail.com>
@rhaschke
rhaschke merged commit 1c1194a into moveit:master Aug 14, 2026
7 checks passed
@idesign0
idesign0 deleted the macos-fmt-pr branch August 14, 2026 12:05
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