diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 8a0afad60890eba0469d1ae60f43af45bd36ffb4..f71299997930040c848dd6f5c2819185cf8fee81 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -4562,74 +4562,6 @@ mod tests { }); } - /// Actions that don't build from empty input won't work from command palette invocation. - #[gpui::test] - async fn test_actions_build_with_empty_input(cx: &mut gpui::TestAppContext) { - init_keymap_test(cx); - cx.update(|cx| { - let all_actions = cx.all_action_names(); - let mut failing_names = Vec::new(); - let mut errors = Vec::new(); - for action in all_actions { - match action.to_string().as_str() { - "vim::FindCommand" - | "vim::Literal" - | "vim::ResizePane" - | "vim::PushObject" - | "vim::PushFindForward" - | "vim::PushFindBackward" - | "vim::PushSneak" - | "vim::PushSneakBackward" - | "vim::PushChangeSurrounds" - | "vim::PushJump" - | "vim::PushDigraph" - | "vim::PushLiteral" - | "vim::PushHelixNext" - | "vim::PushHelixPrevious" - | "vim::Number" - | "vim::SelectRegister" - | "git::StageAndNext" - | "git::UnstageAndNext" - | "terminal::SendText" - | "terminal::SendKeystroke" - | "app_menu::OpenApplicationMenu" - | "picker::ConfirmInput" - | "editor::HandleInput" - | "editor::FoldAtLevel" - | "pane::ActivateItem" - | "workspace::ActivatePane" - | "workspace::MoveItemToPane" - | "workspace::MoveItemToPaneInDirection" - | "workspace::NewFileSplit" - | "workspace::OpenTerminal" - | "workspace::SendKeystrokes" - | "agent::NewNativeAgentThreadFromSummary" - | "action::Sequence" - | "zed::OpenBrowser" - | "zed::OpenZedUrl" - | "settings_editor::FocusFile" => {} - _ => { - let result = cx.build_action(action, None); - match &result { - Ok(_) => {} - Err(err) => { - failing_names.push(action); - errors.push(format!("{action} failed to build: {err:?}")); - } - } - } - } - } - if !errors.is_empty() { - panic!( - "Failed to build actions using {{}} as input: {:?}. Errors:\n{}", - failing_names, - errors.join("\n") - ); - } - }); - } - /// Checks that action namespaces are the expected set. The purpose of this is to prevent typos /// and let you know when introducing a new namespace. #[gpui::test] diff --git a/crates/zed_actions/src/lib.rs b/crates/zed_actions/src/lib.rs index 23e3465edd8e780d694b551f95004b556380c296..5cb2903fa653fc765bfb3471aa51b232e4bfadec 100644 --- a/crates/zed_actions/src/lib.rs +++ b/crates/zed_actions/src/lib.rs @@ -116,12 +116,11 @@ pub struct IncreaseBufferFontSize { } /// Increases the font size in the editor buffer. -#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)] +#[derive(PartialEq, Clone, Debug, Deserialize, JsonSchema, Action)] #[action(namespace = zed)] #[serde(deny_unknown_fields)] pub struct OpenSettingsAt { /// A path to a specific setting (e.g. `theme.mode`) - #[serde(default)] pub path: String, }