From e2f2ad7ca463b55954f2e47b0063de81c3326004 Mon Sep 17 00:00:00 2001 From: Dan Wang Date: Thu, 14 Dec 2023 20:05:33 +0800 Subject: [PATCH] fix: use boost::filesystem::path instead of std::filesystem::path --- src/shell/commands/debugger.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shell/commands/debugger.cpp b/src/shell/commands/debugger.cpp index 8bfe9b2958..1080c15060 100644 --- a/src/shell/commands/debugger.cpp +++ b/src/shell/commands/debugger.cpp @@ -18,6 +18,11 @@ */ // IWYU pragma: no_include +// TODO(wangdan): Since std::filesystem was first introduced in +// gcc 8 and clang 10, we could only use boost::filesystem for +// now. Once the minimum version of all the compilers we support +// has reached these versions, use #include instead. +#include // TODO(yingchun): refactor this after libfmt upgraded #include // IWYU pragma: keep #include // IWYU pragma: keep @@ -35,7 +40,6 @@ #include // IWYU pragma: no_include // IWYU pragma: no_include -#include #include #include #include @@ -109,7 +113,7 @@ bool mlog_dump(command_executor *e, shell_context *sc, arguments args) return false; } - const auto replica_path = std::filesystem::path(plog_dir).parent_path(); + const auto replica_path = boost::filesystem::path(plog_dir).parent_path(); const auto name = replica_path.filename().string(); if (name.empty()) { fmt::print(stderr, "ERROR: '{}' is not a valid plog directory\n", plog_dir);