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

Get fmt 11.1.1 to compile #13855

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DataFormats/Headers/include/Headers/DataHeaderHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct fmt::formatter<T, std::enable_if_t<o2::header::is_descriptor<T>::value, c
}

template <typename FormatContext>
auto format(const T& p, FormatContext& ctx)
auto format(const T& p, FormatContext& ctx) const
{
return fmt::format_to(ctx.out(), "{}", p.template as<std::string>());
}
Expand Down Expand Up @@ -67,7 +67,7 @@ struct fmt::formatter<o2::header::DataHeader> {
}

template <typename FormatContext>
auto format(const o2::header::DataHeader& h, FormatContext& ctx)
auto format(const o2::header::DataHeader& h, FormatContext& ctx) const
{
if (presentation == 's') {
auto res = fmt::format("Data header version {}, flags: {}\n", h.headerVersion, h.flags) +
Expand Down
3 changes: 2 additions & 1 deletion EventVisualisation/Workflow/src/O2DPLDisplay.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ void O2DPLDisplaySpec::run(ProcessingContext& pc)
}
}

LOGP(info, "Tracks: {}", fmt::join(sourceStats, ", "));
// FIXME: find out why this does not work with 11.1.1
// LOGP(info, "Tracks: {}", fmt::join(sourceStats, ", "));
}

void O2DPLDisplaySpec::endOfStream(EndOfStreamContext& ec)
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/Formatters.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct fmt::formatter<o2::framework::Lifetime> : fmt::formatter<std::string_view
char presentation = 's';

template <typename FormatContext>
auto format(o2::framework::Lifetime const& h, FormatContext& ctx)
auto format(o2::framework::Lifetime const& h, FormatContext& ctx) const
{
std::string_view s = "unknown";
switch (h) {
Expand Down
11 changes: 6 additions & 5 deletions Framework/Core/src/ComputingQuotaEvaluator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#define LOGLEVEL debug


namespace o2::framework
{

Expand Down Expand Up @@ -90,7 +91,7 @@ bool ComputingQuotaEvaluator::selectOffer(int task, ComputingQuotaRequest const&
}
if (enough) {
LOGP(LOGLEVEL, "{} offers were selected for a total of: cpu {}, memory {}, shared memory {}", result.size(), totalOffer.cpu, totalOffer.memory, totalOffer.sharedMemory);
LOGP(LOGLEVEL, " The following offers were selected for computation: {} ", fmt::join(result, ","));
//LOG(LOGLEVEL) << " The following offers were selected for computation: {} " << fmt::join(result, ", ");
dpStats.updateStats({static_cast<short>(ProcessingStatsId::RESOURCES_SATISFACTORY), DataProcessingStats::Op::Add, 1});
} else {
dpStats.updateStats({static_cast<short>(ProcessingStatsId::RESOURCES_MISSING), DataProcessingStats::Op::Add, 1});
Expand All @@ -99,16 +100,16 @@ bool ComputingQuotaEvaluator::selectOffer(int task, ComputingQuotaRequest const&
}
}
if (stats.invalidOffers.size()) {
LOGP(LOGLEVEL, " The following offers were invalid: {}", fmt::join(stats.invalidOffers, ", "));
// LOGP(LOGLEVEL, " The following offers were invalid: {}", fmt::join(stats.invalidOffers, ", "));
}
if (stats.otherUser.size()) {
LOGP(LOGLEVEL, " The following offers were owned by other users: {}", fmt::join(stats.otherUser, ", "));
// LOGP(LOGLEVEL, " The following offers were owned by other users: {}", fmt::join(stats.otherUser, ", "));
}
if (stats.expired.size()) {
LOGP(LOGLEVEL, " The following offers are expired: {}", fmt::join(stats.expired, ", "));
// LOGP(LOGLEVEL, " The following offers are expired: {}", fmt::join(stats.expired, ", "));
}
if (stats.unexpiring.size() > 1) {
LOGP(LOGLEVEL, " The following offers will never expire: {}", fmt::join(stats.unexpiring, ", "));
// LOGP(LOGLEVEL, " The following offers will never expire: {}", fmt::join(stats.unexpiring, ", "));
}

return enough;
Expand Down
Loading