Skip to content

fix: xmake spdlog force non-system#299

Merged
16bit-ykiko merged 1 commit into
clice-io:mainfrom
ClSlaid:fix/logging/fmt
Nov 5, 2025
Merged

fix: xmake spdlog force non-system#299
16bit-ykiko merged 1 commit into
clice-io:mainfrom
ClSlaid:fix/logging/fmt

Conversation

@ClSlaid

@ClSlaid ClSlaid commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

This fixes #298 on my WSL machine.

Summary by CodeRabbit

  • Chores
    • Reorganized build dependency declarations for clearer resolution.
    • Explicitly set the logging library to a fixed version with defined configuration.
    • Separated remaining third-party dependencies into a distinct declaration for more granular control.

@coderabbitai

coderabbitai Bot commented Nov 4, 2025

Copy link
Copy Markdown

Walkthrough

Refactors xmake.lua dependency declarations: replaces a single composite add_requires call that included spdlog[header_only=n,std_format,noexcept] with an explicit add_requires("spdlog", {system=false, version="1.15.3", configs = {...}}) and moves toml++, croaring, and flatbuffers into a separate add_requires call.

Changes

Cohort / File(s) Summary
Build configuration: spdlog and other deps
xmake.lua
Rewrote spdlog requirement from inline spec ("spdlog[header_only=n,std_format,noexcept]") to explicit declaration: add_requires("spdlog", { system=false, version="1.15.3", configs = { header_only = false, std_format = true, noexcept = true } }). Separated remaining packages into a second call: add_requires(libuv_require, "toml++", "croaring", "flatbuffers").

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to: version="1.15.3" vs. system-provided spdlog versions (compatibility with linked issue #298).
  • Verify the configs keys map correctly to the package manager's expected names and boolean types.
  • Confirm that splitting add_requires calls preserves intended resolution order when libuv_require is present.

Poem

🐇 I hopped into xmake, tidy and spry,
Spdlog sorted, no more stringy sky,
Versions set and configs neat,
Toml, roaring, flatbuffers meet,
A rabbit signs off — build logs complete.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR refactors spdlog dependency specification with system=false and explicit version 1.15.3 to prevent system library version conflicts, but does not address the actual code-level template mismatch in Logging.h that causes the build failure. Modify include/Support/Logging.h to use spdlog::fmt::format_string instead of std::format_string, or update the spdlog::log call to match the overload signature (level before source_loc).
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Out of Scope Changes check ✅ Passed All changes are scoped to the xmake.lua dependency configuration and directly relate to resolving the spdlog/fmt version conflict; no out-of-scope modifications detected.
Title check ✅ Passed The title directly describes the main change: making spdlog use non-system packages in xmake configuration to resolve version compatibility issues.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
xmake.lua (1)

43-44: Fix correctly forces non-system spdlog to resolve incompatibility.

The system=false setting directly addresses issue #298 by ensuring xmake builds or fetches a compatible spdlog version instead of using the system-installed spdlog 1.16.0 that caused compilation errors with fmt 12.1.0. The config values are correctly preserved (header_only=false, std_format=true, noexcept=true), and separating spdlog into its own add_requires call is the appropriate way to apply package-specific settings in xmake.

Consider adding a brief comment above line 43 explaining why system=false is required (e.g., -- Force non-system spdlog to avoid compatibility issues with system fmt versions (issue #298)), which would help future maintainers understand this constraint.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 39ec9bf and 1d3ce04.

📒 Files selected for processing (1)
  • xmake.lua (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: macos (macos-15, debug)
  • GitHub Check: linux (ubuntu-24.04, release)
  • GitHub Check: macos (macos-15, release)
  • GitHub Check: linux (ubuntu-24.04, debug)
  • GitHub Check: windows (windows-2025)

Signed-off-by: 蔡略 <cailue@apache.org>
@16bit-ykiko 16bit-ykiko changed the title [fix] xmake spdlog force non-system fix: xmake spdlog force non-system Nov 5, 2025
@16bit-ykiko 16bit-ykiko merged commit 9c43285 into clice-io:main Nov 5, 2025
7 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Dec 28, 2025
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.

Build error on ArchLinux with spdlog 1.16 and fmt 12.0.1

2 participants