emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eglot-test-diagnostic-tags-unnecessary-code fails with certain clang


From: Robert Pluim
Subject: Re: eglot-test-diagnostic-tags-unnecessary-code fails with certain clangd versions
Date: Tue, 21 Mar 2023 14:49:29 +0100

>>>>> On Tue, 21 Mar 2023 14:08:39 +0100, Robert Pluim <rpluim@gmail.com> said:

>>>>> On Tue, 21 Mar 2023 08:48:04 +0100, Robert Pluim <rpluim@gmail.com> said:
>>>>> On Mon, 20 Mar 2023 17:34:22 +0000, João Távora <joaotavora@gmail.com> 
>>>>> said:

    João> _If_ I understand correctly, Robert, your run of
    João> eglot-test-diagnostic-tags-unnecessary-code is failing
    João> because of a face mismatch, presumably because only
    João> clangd-11 is installed in your system, but if you install
    João> a more recent clangd it goes away?  If so, yes, I think a
    João> version check is appropriate, yes.

    Robert> Yes. Version 11 fails, version 17 works, I donʼt know where the 
cutoff
    Robert> point is. Which version do you use?

    Robert> So version 11 fails, version 13 fails, version 14 works, so I guess 
>=
    Robert> 14 should do the trick.

João, would this be ok for you for master? (this test is currently
failing on EMBA 😀)

diff --git a/test/lisp/progmodes/eglot-tests.el 
b/test/lisp/progmodes/eglot-tests.el
index 7ac26732737..dfe969cf9f6 100644
--- a/test/lisp/progmodes/eglot-tests.el
+++ b/test/lisp/progmodes/eglot-tests.el
@@ -452,6 +452,14 @@ eglot-test-basic-diagnostics
 (ert-deftest eglot-test-diagnostic-tags-unnecessary-code ()
   "Test rendering of diagnostics tagged \"unnecessary\"."
   (skip-unless (executable-find "clangd"))
+  (skip-unless (>=
+                (string-to-number
+                 (string-trim
+                  (replace-regexp-in-string
+                  "\\`.*version \\([0-9]+\\).*"
+                  "\\1"
+                  (shell-command-to-string "clangd --version"))))
+                14))
   (eglot--with-fixture
       `(("diag-project" .
          (("main.cpp" . "int main(){float a = 42.2; return 0;}"))))

Robert
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]