Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Show workspace project group keys in workspace debug dump (#53556)
Eric Holkb3bc52e28c91
diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rsindex 57fe5a04ac6..488127eb0bd 100644--- a/crates/sidebar/src/sidebar.rs+++ b/crates/sidebar/src/sidebar.rs@@ -4727,6 +4727,36 @@ pub fn dump_workspace_info().ok();+ // project_group_key_for_workspace internally reads the workspace,+ // so we can only call it for workspaces other than this_entity+ // (which is already being updated).+ if let Some(mw) = &multi_workspace {+ if *ws == this_entity {+ let workspace_key = workspace.project_group_key(cx);+ writeln!(output, "ProjectGroupKey: {workspace_key:?}").ok();+ } else {+ let effective_key = mw.read(cx).project_group_key_for_workspace(ws, cx);+ let workspace_key = ws.read(cx).project_group_key(cx);+ if effective_key != workspace_key {+ writeln!(+ output,+ "ProjectGroupKey (multi_workspace): {effective_key:?}"+ )+ .ok();+ writeln!(+ output,+ "ProjectGroupKey (workspace, DISAGREES): {workspace_key:?}"+ )+ .ok();+ } else {+ writeln!(output, "ProjectGroupKey: {effective_key:?}").ok();+ }+ }+ } else {+ let workspace_key = workspace.project_group_key(cx);+ writeln!(output, "ProjectGroupKey: {workspace_key:?}").ok();+ }+// The action handler is already inside an update on `this_entity`,// so we must avoid a nested read/update on that same entity.if *ws == this_entity {