瀏覽代碼

Complete migration to fmt 7.0

default_compile_flags
vector-of-bool 4 年之前
父節點
當前提交
ef887e644b
共有 17 個檔案被更改,包括 25 行新增23 行删除
  1. +4
    -4
      src/dds/build/builder.cpp
  2. +1
    -1
      src/dds/build/plan/archive.cpp
  3. +1
    -1
      src/dds/build/plan/compile_exec.cpp
  4. +3
    -3
      src/dds/build/plan/exe.cpp
  5. +2
    -2
      src/dds/catalog/import.cpp
  6. +1
    -1
      src/dds/deps.cpp
  7. +1
    -1
      src/dds/error/errors.hpp
  8. +1
    -1
      src/dds/package/id.cpp
  9. +1
    -1
      src/dds/toolchain/from_json.cpp
  10. +1
    -1
      src/dds/usage_reqs.cpp
  11. +1
    -1
      src/dds/util/flock.nix.cpp
  12. +3
    -1
      src/dds/util/flock.win.cpp
  13. +1
    -1
      src/dds/util/fs.cpp
  14. +1
    -1
      src/dds/util/log.hpp
  15. +1
    -1
      src/libman/index.cpp
  16. +1
    -1
      src/libman/package.cpp
  17. +1
    -1
      src/libman/parse.cpp

+ 4
- 4
src/dds/build/builder.cpp 查看文件

@@ -241,19 +241,19 @@ void builder::build(const build_params& params) const {

dds::stopwatch sw;
plan.compile_all(env, params.parallel_jobs);
log::info("Compilation completed in {:n}ms", sw.elapsed_ms().count());
log::info("Compilation completed in {:L}ms", sw.elapsed_ms().count());

sw.reset();
plan.archive_all(env, params.parallel_jobs);
log::info("Archiving completed in {:n}ms", sw.elapsed_ms().count());
log::info("Archiving completed in {:L}ms", sw.elapsed_ms().count());

sw.reset();
plan.link_all(env, params.parallel_jobs);
log::info("Runtime binary linking completed in {:n}ms", sw.elapsed_ms().count());
log::info("Runtime binary linking completed in {:L}ms", sw.elapsed_ms().count());

sw.reset();
auto test_failures = plan.run_all_tests(env, params.parallel_jobs);
log::info("Test execution finished in {:n}ms", sw.elapsed_ms().count());
log::info("Test execution finished in {:L}ms", sw.elapsed_ms().count());

for (auto& fail : test_failures) {
log_failure(fail);

+ 1
- 1
src/dds/build/plan/archive.cpp 查看文件

@@ -42,7 +42,7 @@ void create_archive_plan::archive(const build_env& env) const {
// Do it!
log::info("[{}] Archive: {}", _qual_name, out_relpath);
auto&& [dur_ms, ar_res] = timed<std::chrono::milliseconds>([&] { return run_proc(ar_cmd); });
log::info("[{}] Archive: {} - {:n}ms", _qual_name, out_relpath, dur_ms.count());
log::info("[{}] Archive: {} - {:L}ms", _qual_name, out_relpath, dur_ms.count());

// Check, log, and throw
if (!ar_res.okay()) {

+ 1
- 1
src/dds/build/plan/compile_exec.cpp 查看文件

@@ -58,7 +58,7 @@ do_compile(const compile_file_full& cf, build_env_ref env, compile_counter& coun
auto&& [dur_ms, proc_res]
= timed<std::chrono::milliseconds>([&] { return run_proc(cf.cmd_info.command); });
auto nth = counter.n.fetch_add(1);
log::info("{:60} - {:>7n}ms [{:{}}/{}]",
log::info("{:60} - {:>7L}ms [{:{}}/{}]",
msg,
dur_ms.count(),
nth,

+ 3
- 3
src/dds/build/plan/exe.cpp 查看文件

@@ -51,7 +51,7 @@ void link_executable_plan::link(build_env_ref env, const library_plan& lib) cons
log::info(msg);
auto [dur_ms, proc_res]
= timed<std::chrono::milliseconds>([&] { return run_proc(link_command); });
log::info("{} - {:>6n}ms", msg, dur_ms.count());
log::info("{} - {:>6L}ms", msg, dur_ms.count());

// Check and throw if errant
if (!proc_res.okay()) {
@@ -82,13 +82,13 @@ std::optional<test_failure> link_executable_plan::run_test(build_env_ref env) co
[&] { return run_proc({.command = {exe_path.string()}, .timeout = 10s}); });

if (res.okay()) {
log::info("{} - PASSED - {:>9n}μs", msg, dur.count());
log::info("{} - PASSED - {:>9L}μs", msg, dur.count());
return std::nullopt;
} else {
auto exit_msg = fmt::format(res.signal ? "signalled {}" : "exited {}",
res.signal ? res.signal : res.retc);
auto fail_str = res.timed_out ? "TIMEOUT" : "FAILED ";
log::error("{} - {} - {:>9n}μs [{}]", msg, fail_str, dur.count(), exit_msg);
log::error("{} - {} - {:>9L}μs [{}]", msg, fail_str, dur.count(), exit_msg);
test_failure f;
f.executable_path = exe_path;
f.output = res.output;

+ 2
- 2
src/dds/catalog/import.cpp 查看文件

@@ -2,10 +2,10 @@

#include <dds/error/errors.hpp>

#include <fmt/core.h>
#include <json5/parse_data.hpp>
#include <neo/assert.hpp>
#include <semester/walk.hpp>
#include <spdlog/fmt/fmt.h>

#include <optional>

@@ -31,7 +31,7 @@ struct any_key {
};

template <typename KF, typename... Args>
any_key(KF&&, Args&&...) -> any_key<KF, Args...>;
any_key(KF&&, Args&&...)->any_key<KF, Args...>;

namespace {


+ 1
- 1
src/dds/deps.cpp 查看文件

@@ -6,7 +6,7 @@
#include <json5/parse_data.hpp>
#include <semester/walk.hpp>

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

#include <cctype>
#include <sstream>

+ 1
- 1
src/dds/error/errors.hpp 查看文件

@@ -1,6 +1,6 @@
#pragma once

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

#include <stdexcept>
#include <string_view>

+ 1
- 1
src/dds/package/id.cpp 查看文件

@@ -2,7 +2,7 @@

#include <dds/error/errors.hpp>

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

#include <tuple>


+ 1
- 1
src/dds/toolchain/from_json.cpp 查看文件

@@ -6,9 +6,9 @@
#include <dds/util/algo.hpp>
#include <dds/util/shlex.hpp>

#include <fmt/core.h>
#include <json5/parse_data.hpp>
#include <semester/decomp.hpp>
#include <spdlog/fmt/fmt.h>

#include <string>


+ 1
- 1
src/dds/usage_reqs.cpp 查看文件

@@ -4,7 +4,7 @@
#include <dds/error/errors.hpp>
#include <dds/util/algo.hpp>

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

#include <stdexcept>


+ 1
- 1
src/dds/util/flock.nix.cpp 查看文件

@@ -4,7 +4,7 @@

#include <dds/util/signal.hpp>

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

#include <fcntl.h>
#include <sys/file.h>

+ 3
- 1
src/dds/util/flock.win.cpp 查看文件

@@ -4,9 +4,11 @@

#include <dds/util/signal.hpp>

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>
#include <wil/resource.h>

#include <cassert>

using namespace dds;

namespace {

+ 1
- 1
src/dds/util/fs.cpp 查看文件

@@ -1,6 +1,6 @@
#include "./fs.hpp"

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

#include <sstream>


+ 1
- 1
src/dds/util/log.hpp 查看文件

@@ -26,7 +26,7 @@ concept formattable = requires (const T item) {
};

template <formattable... Args>
void log(level l, std::string_view s, const Args&... args) {
void log(level l, std::string_view s, const Args&... args) noexcept {
if (int(l) >= int(current_log_level)) {
auto message = fmt::format(s, args...);
log_print(l, message);

+ 1
- 1
src/libman/index.cpp 查看文件

@@ -2,7 +2,7 @@

#include <libman/parse.hpp>

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

using namespace lm;


+ 1
- 1
src/libman/package.cpp 查看文件

@@ -2,7 +2,7 @@

#include <libman/parse.hpp>

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

using namespace lm;


+ 1
- 1
src/libman/parse.cpp 查看文件

@@ -2,7 +2,7 @@

#include <libman/util.hpp>

#include <spdlog/fmt/fmt.h>
#include <fmt/core.h>

#include <cctype>
#include <fstream>

Loading…
取消
儲存