Skip to content

Commit

Permalink
fix compatibility issues with libfmt 10+
Browse files Browse the repository at this point in the history
  • Loading branch information
Tectu committed Sep 21, 2023
1 parent 51807d6 commit d08dd24
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/malloy/core/external.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ find_package(
if (MALLOY_DEPENDENCY_FMT_DOWNLOAD)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt
GIT_TAG 9.1.0 # Supported by spdlog 1.11.0
GIT_REPOSITORY https://github.com/fmtlib/fmt
GIT_TAG 10.1.1
)
FetchContent_GetProperties(fmt)
if (NOT fmt_POPULATED)
Expand Down
8 changes: 4 additions & 4 deletions lib/malloy/server/http/connection_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class router_adaptor :
{
conn->logger()->info(
"WS request: {} {}",
req->header().method_string(),
req->header().target()
std::string_view{req->header().method_string()},
std::string_view{req->header().target()}
);

handle<true>(root, req, conn);
Expand All @@ -56,8 +56,8 @@ class router_adaptor :
conn,
spdlog::level::info,
"HTTP request: {} {}",
req->header().method_string(),
req->header().target()
std::string_view{req->header().method_string()},
std::string_view{req->header().target()}
);

handle<false>(root, req, conn);
Expand Down
10 changes: 6 additions & 4 deletions lib/malloy/server/routing/router.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,9 @@ namespace malloy::server
// Log
if (m_logger) {
m_logger->trace("handling HTTP request: {} {}",
req->header().method_string(),
req->header().target());
std::string_view{req->header().method_string()},
std::string_view{req->header().target()}
);
}

const auto& header = req->header();
Expand Down Expand Up @@ -576,8 +577,9 @@ namespace malloy::server
{
const auto res_string = malloy::http::resource_string(gen->header());
m_logger->trace("handling WS request: {} {}",
gen->header().method_string(),
res_string);
std::string_view{gen->header().method_string()},
res_string
);

// Check routes
for (const auto& ep : m_endpoints_websocket) {
Expand Down

0 comments on commit d08dd24

Please sign in to comment.