From e422af1fd0dbf6d5a749a7842e93de0ef2c5c89a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 20:23:41 +0000 Subject: [PATCH 1/2] Initial plan From f124e87c26ab08dcc42a92f3686645bed3b48a09 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 20:24:43 +0000 Subject: [PATCH 2/2] Fix timing issue in Emacs test by polling for flymake diagnostics Agent-Logs-Url: https://github.com/PowerShell/PowerShellEditorServices/sessions/19f2e25d-3a5e-4570-97bf-ce36493b9795 Co-authored-by: andyleejordan <2226434+andyleejordan@users.noreply.github.com> --- test/emacs-test.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/emacs-test.el b/test/emacs-test.el index 378c792fc..f085881c2 100644 --- a/test/emacs-test.el +++ b/test/emacs-test.el @@ -61,8 +61,12 @@ (let ((lsp (eglot-current-server))) (should (string= (eglot--project-nickname lsp) "PowerShellEditorServices")) (should (member (cons 'powershell-mode "powershell") (eglot--languages lsp)))) - (sleep-for 5) ; TODO: Wait for "textDocument/publishDiagnostics" instead (flymake-start) + ;; Wait for diagnostics to arrive instead of sleeping a fixed duration + (let ((deadline (time-add (current-time) 30))) + (while (and (time-less-p (current-time) deadline) + (null (flymake-diagnostics))) + (sleep-for 0.5))) (goto-char (point-min)) (flymake-goto-next-error) (should (eq 'flymake-warning (face-at-point))))))