feat(daemon): clean generated build outputs on request
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 8s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 21s

This commit is contained in:
faumaray committed 2026-12-04 02:10:53 +03:00
1 parent 7fdda96553
commit cf06b427b7
13 files changed
+198 -25

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <Void/Functional/Error.hpp>
#include <Void/Functional/Result.hpp>
#include <cstddef>
#include <filesystem>
namespace Void::Build::Config {
struct CleanReport {
bool build_root_exists{false};
bool removed_entire_root{false};
std::size_t removed_paths{0};
};
// Removes generated build outputs under `build_root`.
// - all == false: removes `profiles/` and the root compile_commands.json alias, preserving the
// shared `.vbs` cache/state.
// - all == true: removes the entire build root.
[[nodiscard]] Void::Result::Result<CleanReport, Void::Result::Error>
clean_build_tree(const std::filesystem::path &build_root, bool all = false);
} // namespace Void::Build::Config