#pragma once
-#include <util/NonCopyable.hpp>
-
#include <deque>
#include <optional>
#include <string>
-// Copyright (C) 2019-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <util/string.hpp>
#include <util/wincompat.hpp>
-#include <sys/types.h>
-
#ifdef HAVE_PWD_H
# include <pwd.h>
#endif
#include <core/Sloppiness.hpp>
#include <util/NonCopyable.hpp>
-#include <util/filesystem.hpp>
#include <util/string.hpp>
#include <sys/types.h>
#include <cstdint>
+#include <filesystem>
#include <functional>
-#include <limits>
#include <optional>
#include <string>
#include <unordered_map>
#include "Args.hpp"
#include "ArgsInfo.hpp"
#include "Config.hpp"
-#include "MiniTrace.hpp"
+#ifdef MTR_ENABLED
+# include "MiniTrace.hpp"
+#endif
#include <util/FileStream.hpp>
#include <util/NonCopyable.hpp>
#include <Hash.hpp>
#include <core/Manifest.hpp>
#include <storage/Storage.hpp>
+#include <util/Bytes.hpp>
#include <util/TimePoint.hpp>
+#include <sys/types.h>
+
#include <ctime>
+#include <filesystem>
#include <optional>
#include <string>
-#include <string_view>
#include <unordered_map>
#include <vector>
-// Copyright (C) 2020-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#pragma once
class Context;
-class Hash;
#include <optional>
#include <string>
-// Copyright (C) 2020-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <array>
#include <cstdint>
#include <cstdio>
+#include <string>
#include <string_view>
// This class represents a hash state.
-// Copyright (C) 2020-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <util/MemoryMap.hpp>
#include <util/TimePoint.hpp>
+#include <sys/types.h>
+
#include <cstdint>
#include <functional>
#include <optional>
#include <utility>
class Config;
-class Context;
class InodeCache
{
#pragma once
-#include <util/TimePoint.hpp>
-
-#include <cstdint>
#include <filesystem>
-#include <functional>
-#include <memory>
-#include <optional>
#include <string>
#include <string_view>
-#include <utility>
-#include <vector>
-class Config;
class Context;
namespace Util {
// Copyright (C) 2002-2007 Andrew Tridgell
-// Copyright (C) 2009-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2009-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <filesystem>
#include <functional>
#include <string>
-#include <string_view>
#include <vector>
class Context;
#include <core/exceptions.hpp>
#include <core/types.hpp>
#include <util/TimePoint.hpp>
+#include <util/XXH3_128.hpp>
#include <util/expected.hpp>
#include <util/file.hpp>
+#include <util/filesystem.hpp>
#include <util/fmtmacros.hpp>
#include <util/logging.hpp>
#include <util/zstd.hpp>
#include <core/Serializer.hpp>
#include <core/types.hpp>
#include <util/Bytes.hpp>
-#include <util/XXH3_128.hpp>
#include <third_party/nonstd/span.hpp>
-// Copyright (C) 2022-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2022-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <atomic>
#include <cstdint>
-#include <mutex>
#include <optional>
-#include <string>
namespace core {
-// Copyright (C) 2009-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2009-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <Hash.hpp>
#include <core/Serializer.hpp>
+#include <util/Bytes.hpp>
#include <util/TimePoint.hpp>
#include <third_party/nonstd/span.hpp>
#include <cstdint>
+#include <cstdio>
#include <functional>
#include <optional>
#include <string>
-// Copyright (C) 2019-2022 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#pragma once
#include <core/Serializer.hpp>
-#include <util/types.hpp>
+#include <util/Bytes.hpp>
#include <third_party/nonstd/span.hpp>
-// Copyright (C) 2020-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <core/Result.hpp>
+#include <third_party/nonstd/span.hpp>
+
+#include <cstdint>
#include <functional>
#include <optional>
#include <string>
-// Copyright (C) 2020-2022 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <core/Result.hpp>
+#include <third_party/nonstd/span.hpp>
+
#include <cstdint>
#include <cstdio>
-// Copyright (C) 2020-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <core/Result.hpp>
#include <core/exceptions.hpp>
+#include <third_party/nonstd/span.hpp>
+
+#include <cstdint>
#include <optional>
+#include <string>
class Context;
#pragma once
+#include <core/Statistic.hpp>
#include <core/StatisticsCounters.hpp>
#include <util/TimePoint.hpp>
#include <cstdint>
-#include <ctime>
#include <string>
#include <unordered_map>
#include <utility>
-// Copyright (C) 2020-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
-// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <core/types.hpp>
#include <storage/local/LocalStorage.hpp>
#include <storage/remote/RemoteStorage.hpp>
-#include <storage/types.hpp>
#include <util/Bytes.hpp>
#include <third_party/nonstd/span.hpp>
+#include <cstdint>
#include <functional>
#include <memory>
-#include <optional>
#include <string>
+#include <string_view>
#include <vector>
namespace storage {
-// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <Hash.hpp>
#include <core/Result.hpp>
+#include <core/Statistic.hpp>
#include <core/StatisticsCounters.hpp>
#include <core/types.hpp>
#include <storage/local/StatsFile.hpp>
#include <storage/local/util.hpp>
-#include <storage/types.hpp>
#include <util/Bytes.hpp>
+#include <util/DirEntry.hpp>
#include <util/LockFile.hpp>
+#include <util/LongLivedLockFileManager.hpp>
#include <util/TimePoint.hpp>
#include <third_party/nonstd/span.hpp>
#include <cstdint>
#include <filesystem>
#include <optional>
+#include <string>
#include <string_view>
+#include <utility>
#include <vector>
class Config;
-// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <storage/remote/RemoteStorage.hpp>
+#include <third_party/url.hpp>
+
+#include <memory>
+#include <vector>
+
namespace storage::remote {
class FileStorage : public RemoteStorage
-// Copyright (C) 2021-2022 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <storage/remote/RemoteStorage.hpp>
+#include <third_party/url.hpp>
+
+#include <memory>
+#include <vector>
+
namespace storage::remote {
class HttpStorage : public RemoteStorage
-// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <storage/remote/RemoteStorage.hpp>
+#include <third_party/url.hpp>
+
+#include <memory>
+#include <vector>
+
namespace storage::remote {
class RedisStorage : public RemoteStorage
-// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#pragma once
#include <Hash.hpp>
-#include <storage/types.hpp>
#include <util/Bytes.hpp>
#include <third_party/nonstd/span.hpp>
#include <chrono>
#include <memory>
#include <optional>
+#include <stdexcept>
#include <string>
#include <vector>
-// Copyright (C) 2019-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <util/wincompat.hpp>
#include <sys/stat.h>
-#include <sys/types.h>
#include <cstdint>
-#include <ctime>
#include <filesystem>
namespace util {
#include <third_party/tl/expected.hpp>
+#include <cstddef>
#include <string>
namespace util {
-// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#pragma once
+#include <cstddef>
#include <cstdint>
#include <string>
#include <string_view>
-// Copyright (C) 2019-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#pragma once
#include <condition_variable>
+#include <cstddef>
#include <functional>
#include <limits>
#include <mutex>
#include <queue>
#include <thread>
+#include <vector>
namespace util {
-// Copyright (C) 2022-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2022-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
-// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <util/assertions.hpp>
+#include <cstddef>
#include <string_view>
namespace util {
-// Copyright (C) 2023 Joel Rosdahl and other contributors
+// Copyright (C) 2023-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#pragma once
-#include <cstdint>
-#include <string>
+#ifdef _WIN32
-namespace util {
+# include <cstdint>
+# include <string>
-#ifdef _WIN32
+namespace util {
// Return the error message corresponding to `error_code`.
std::string win32_error_message(uint32_t error_code);
-#endif
-
} // namespace util
+
+#endif
-// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <cstddef>
#include <cstdint>
-#include <ctime>
#include <filesystem>
#include <functional>
#include <optional>
#include <third_party/tl/expected.hpp>
+#include <cstdint>
#include <filesystem>
#include <system_error>
-// Copyright (C) 2020-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <third_party/fmt/core.h>
#include <third_party/fmt/format.h>
-#include <third_party/fmt/std.h>
#include <string>
#include <string_view>
} \
} while (false)
-class Config;
-
namespace util::logging {
// Initialize global logging state. Must be called once before using the other
#pragma once
-#include <util/string.hpp>
-
#include <filesystem>
#include <string>
#include <string_view>
-#include <vector>
+#ifdef _WIN32
+# include <util/string.hpp>
+#endif
namespace util {
#include <algorithm>
#include <cctype>
-#include <iostream>
namespace {
#pragma once
-#include <util/Bytes.hpp>
#include <util/Tokenizer.hpp>
#include <util/conversion.hpp>
-// Copyright (C) 2022-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2022-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <third_party/nonstd/span.hpp>
#include <third_party/tl/expected.hpp>
+#include <cstddef>
#include <cstdint>
#include <string>
#include <tuple>