feat(daemon): uninstall manifest-owned files on request
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 8s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 9s

This commit is contained in:
faumaray committed 2026-12-04 03:18:42 +03:00
1 parent 2c602fc3e7
commit 716c049cff
8 files changed
+63 -6

No files matched your search

+13 -4
View File
@@ -1448,10 +1448,6 @@ void build(Void::Build::Project &project) {
Void::Build::Util::json_quote(prefix.string()));
auto installed = request_object(socket, install_request, std::chrono::seconds{120});
auto missing_prefix = request_object(socket, R"({"op":"install"})");
auto shutdown = Void::Build::Daemon::request(socket, R"({"op":"shutdown"})");
Void::Testing::expect(shutdown.has_value());
worker.join();
Void::Testing::expect(run_result.has_value());
Void::Testing::require(installed.has_value());
Void::Testing::expect(bool_field(*installed, "ok"));
@@ -1460,6 +1456,19 @@ void build(Void::Build::Project &project) {
Void::Testing::expect(std::filesystem::exists(str_field(*installed, "manifest")));
Void::Testing::require(missing_prefix.has_value());
Void::Testing::expect(!bool_field(*missing_prefix, "ok", true));
const std::string uninstall_request = std::format(
R"({{"op":"uninstall","prefix":{}}})", Void::Build::Util::json_quote(prefix.string()));
auto uninstalled = request_object(socket, uninstall_request);
auto shutdown = Void::Build::Daemon::request(socket, R"({"op":"shutdown"})");
Void::Testing::expect(shutdown.has_value());
worker.join();
Void::Testing::expect(run_result.has_value());
Void::Testing::require(uninstalled.has_value());
Void::Testing::expect(bool_field(*uninstalled, "ok"));
Void::Testing::expect(int_field(*uninstalled, "removed") >= 1);
Void::Testing::expect(!std::filesystem::exists(prefix / "bin" / "app"));
}
VOID_TEST(Daemon, describe_empty_project_reports_zero_targets) {