Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update log usage to be compatible with spdlog 1.15 #80

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

etremel
Copy link
Contributor

@etremel etremel commented Feb 6, 2025

The latest version of spdlog (1.15) depends on a newer version of fmt (11.1) that no longer has a default format behavior for enum types. To maintain compatibility with spdlog 1.15, all enum types must have a formatter specialization, or logger calls with enum values must wrap the enum values in fmt::underlying() to re-enable the old behavior of printing the integer value of the enum.

This change is backward-compatible with spdlog 1.12, so there's no need to increase our minimum required version.

The latest version of spdlog (1.15) bundles a newer version of fmtlib,
which removes its default formatting behavior for enum types. Enum
values must now either have a formatter specialization declared or be
wrapped in a call to fmt::underlying() to print them as integers. (The
previous behavior was to automatically print enum values as integers).
This enum will need a formatter overload if we ever want to print out
its value in a logging statement. The main Cascade branch doesn't
currently do that, but the cascade_chain branch does (to debug member
selection policies in the SignatureStore subgroup), so I know it will be
needed. It seems better to fix it in the main branch and then inherit
the changes in cascade_chain than to fix it in cascade_chain and later
backport the changes to the main branch.
This is unrelated to the logger changes in this branch, but it needs to
be fixed to get the "build check" to pass on GitHub. GitHub recently
updated their build servers to a later version of Ubuntu, which does not
have a "python3.10" package - it has one named "python3.12" instead. The
better way to ensure the latest python is installed in these build
scripts is to install the "python3" package, which always points to the
current Python 3 package in Ubuntu.
Apparently, GitHub's Ubuntu image used to include this package by
default, but now it doesn't so we need to install it from apt. Again,
this is unrelated to my spdlog changes, but needs to be committed to
test if the changes will build on GitHub.
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.

1 participant