-
Notifications
You must be signed in to change notification settings - Fork 741
Upgrade to libfmt 12 #30171
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
Merged
Merged
Upgrade to libfmt 12 #30171
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4126ed7
base/format_to: add HasFormatToFreeFunction concept and auto-generate…
StephanDollberg bacc953
model: migrate all types from operator<< to format_to
StephanDollberg ddcfa80
raft: migrate all types from operator<< to format_to
StephanDollberg 8c74b64
storage: migrate types from operator<< to format_to
StephanDollberg 3efe814
config: migrate all types from operator<< to format_to
StephanDollberg 4cdda25
kafka/protocol: update generator to emit format_to instead of operator<<
StephanDollberg b8229d3
kafka: migrate types from operator<< to format_to
StephanDollberg 3dede76
security: migrate types from operator<< to format_to
StephanDollberg 2eb3142
misc: migrate remaining subsystems from operator<< to format_to
StephanDollberg 5fe5bf4
cluster: migrate types from operator<< to format_to
StephanDollberg 1a84ed4
misc: add formatters for third-party types
StephanDollberg eda5940
misc: fix remaining call sites and stale includes
StephanDollberg f2c29db
base/format_to: add fmt_streamed() compile-time guard
StephanDollberg 79c81fd
build: upgrade fmt 9.1.0 to 12.1.0, remove FMT_DEPRECATED_OSTREAM
StephanDollberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| diff --git a/lang/c++/include/avro/Types.hh b/lang/c++/include/avro/Types.hh | ||
| index 0000000..0000001 100644 | ||
| --- a/lang/c++/include/avro/Types.hh | ||
| +++ b/lang/c++/include/avro/Types.hh | ||
| @@ -113,7 +113,7 @@ | ||
| template<> | ||
| struct fmt::formatter<avro::Type> : fmt::formatter<std::string> { | ||
| template<typename FormatContext> | ||
| - auto format(avro::Type t, FormatContext &ctx) { | ||
| + auto format(avro::Type t, FormatContext &ctx) const { | ||
| return fmt::formatter<std::string>::format(avro::toString(t), ctx); | ||
| } | ||
| }; | ||
| diff --git a/lang/c++/include/avro/Node.hh b/lang/c++/include/avro/Node.hh | ||
| index 0000000..0000001 100644 | ||
| --- a/lang/c++/include/avro/Node.hh | ||
| +++ b/lang/c++/include/avro/Node.hh | ||
| @@ -232,7 +232,7 @@ | ||
| template<> | ||
| struct fmt::formatter<avro::Name> : fmt::formatter<std::string> { | ||
| template<typename FormatContext> | ||
| - auto format(const avro::Name &n, FormatContext &ctx) { | ||
| + auto format(const avro::Name &n, FormatContext &ctx) const { | ||
| return fmt::formatter<std::string>::format(n.fullname(), ctx); | ||
| } | ||
| }; |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| /* | ||
| * Copyright 2026 Redpanda Data, Inc. | ||
| * | ||
| * Use of this software is governed by the Business Source License | ||
| * included in the file licenses/BSL.md | ||
| * | ||
| * As of the Change Date specified in that file, in accordance with | ||
| * the Business Source License, use of this software will be governed | ||
| * by the Apache License, Version 2.0 | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| /// Formatters for commonly-used external / third-party types that have | ||
| /// operator<< but no fmt::formatter specialization. Include this header | ||
| /// whenever you need to format one of these types with {fmt}. | ||
|
|
||
| #include <boost/beast/http/status.hpp> | ||
| #include <boost/beast/http/verb.hpp> | ||
| #include <boost/filesystem/path.hpp> | ||
| #include <boost/system/error_code.hpp> | ||
| #include <fmt/ostream.h> | ||
|
|
||
| template<> | ||
| struct fmt::formatter<boost::beast::http::status> : fmt::ostream_formatter {}; | ||
|
|
||
| template<> | ||
| struct fmt::formatter<boost::beast::http::verb> : fmt::ostream_formatter {}; | ||
|
|
||
| template<> | ||
| struct fmt::formatter<boost::system::error_code> : fmt::ostream_formatter {}; | ||
|
|
||
| template<> | ||
| struct fmt::formatter<boost::filesystem::path> : fmt::ostream_formatter {}; |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.