feat(daemon): list workspace members without evaluating them
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 7s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 28s

This commit is contained in:
faumaray committed 2026-12-03 23:27:57 +03:00
1 parent 8f68ec56e9
commit ca9ad1158a
8 files changed
+102 -2

No files matched your search

+10
View File
@@ -1565,6 +1565,8 @@ int execute_daemon_command(std::string_view sub, const DaemonCmdOptions &opts) {
Util::json_quote(opts.graph_format_arg));
} else if (sub == "editor_status") {
request_json = R"({"op":"editor_status"})";
} else if (sub == "workspace_members") {
request_json = R"({"op":"workspace_members"})";
} else if (sub == "compdb_entries") {
request_json =
std::format(R"({{"op":"compdb_entries","limit":{}{}}})", opts.limit_arg,
@@ -2662,6 +2664,11 @@ int main(int argc, char **argv) {
.option_default("--profile", "-p", "Profile to export", daemon_opts.profile_arg, "debug")
.option("--member", "", "Workspace member (required for workspace roots)",
daemon_opts.member_arg);
auto &daemon_workspace_cmd =
daemon_cmd.subcommand("workspace", "Workspace metadata served by the daemon");
auto &daemon_workspace_members_cmd =
daemon_workspace_cmd.subcommand("members", "List declared workspace members");
configure_daemon_common(daemon_workspace_members_cmd);
auto &daemon_graph_cmd =
daemon_cmd.subcommand("graph", "Export the target dependency graph via the daemon");
configure_daemon_common(daemon_graph_cmd);
@@ -2821,6 +2828,9 @@ int main(int argc, char **argv) {
} else if (daemon_sub == "compdb" && parsed.matched_command_path.size() > 2 &&
parsed.matched_command_path[2] == "use") {
daemon_sub = "compdb_use";
} else if (daemon_sub == "workspace" && parsed.matched_command_path.size() > 2 &&
parsed.matched_command_path[2] == "members") {
daemon_sub = "workspace_members";
}
return execute_daemon_command(daemon_sub, daemon_opts);
}