From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: master 0d5036061b5: Skip Eglot test if using very old clangd Date: Wed, 22 Mar 2023 11:38:22 +0100 Message-ID: <87lejpnk9t.fsf@gmail.com> References: <167942421231.13373.16122455155218245677@vcs2.savannah.gnu.org> <20230321184332.93736C13913@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="472"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 22 11:39:38 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pevsW-000AYy-Et for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Mar 2023 11:39:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pevrp-0000q2-Sj; Wed, 22 Mar 2023 06:38:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pevro-0000pr-41 for emacs-devel@gnu.org; Wed, 22 Mar 2023 06:38:52 -0400 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pevrl-0000wv-GA for emacs-devel@gnu.org; Wed, 22 Mar 2023 06:38:51 -0400 Original-Received: by mail-wr1-x432.google.com with SMTP id y14so16489821wrq.4 for ; Wed, 22 Mar 2023 03:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679481503; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from:from :to:cc:subject:date:message-id:reply-to; bh=MFi15XIABrr+ZjTpS2tkkdXK/NBz7bD24aSmAw3/nRI=; b=IP/56T2G7hwKzvVALOMrxdAbRwBTMa0ipXxTrKd44sVEEg9Y29rkfo7ftfQPIJ3yR2 bvaU9jhKaRNTpIGosNQgxYkV3qwla4FJESI/ftsWfTEEw12Lz7Z1Q6XRKGNIXgnhti4Z nGwzkMEj1gyuUeehuclXuKHd0EzPF4QAVj/t3Nin40BP4dEEHjB+DxohCyOhXdJTU5Uq y44sHvb9PEEszicIuyDweZBPg4WvA1sXZXYbL/LpVLH4OpPeX8X9JSVeSC2Uf47u7hoe DC1KxpLk5xsS7XvL12HmrqaA3NCyUlrdpsgx5e9W+HVlJ/C9TE7x189H8jqKPXmAH2PN RIig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679481503; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MFi15XIABrr+ZjTpS2tkkdXK/NBz7bD24aSmAw3/nRI=; b=04F9GwhWlkXY3f6QsFAwn7FeGs4R0nvlUeUf2nV/Cj5KR41mCpKWl6gRXG2dDVGZBf 4etCsWjF6H0OMV/gVu2+KhO/eFDhfjQWRRReBHJQNelqML/B2Sba2VH1+zmMsGUMXRtQ ouyN5tfhFw43JYgsVMHWgHdHYh1cRdM6cXEiaVKs2tpLLPb+qRgsvs+ciHe1wtBd2dp4 JeSqtC2QHNWplVPs/1I9V8A1jGKW+0KZTXFxAjcWryzUEGHzsK1nVcF8wNPH8hPUShSr RRJxlKaqaooVHjBrLgE3w5tH6hkFZef+yGe4EOWG4mVwrfQv55anvpITX7Gjx4mP9yZq H7cg== X-Gm-Message-State: AO0yUKX3nsY7AZKph//KgauI2ypsUpxsBlV0Cyk8tHNUHcLuw0Q8rn2u HxKb7VdWmmWmmKEn98Y47RhjWNGng8U= X-Google-Smtp-Source: AK7set8yQjoTx6p2G2aq6+UyoRv1wyNBDDF374nLKaBljBs/YUmONcF3qaZ8BtT6KqIYSwwgTbb38Q== X-Received: by 2002:adf:f34c:0:b0:2c8:a44a:bf25 with SMTP id e12-20020adff34c000000b002c8a44abf25mr4752426wrp.50.1679481503129; Wed, 22 Mar 2023 03:38:23 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id y6-20020a05600c364600b003ed2c0a0f37sm16362674wmq.35.2023.03.22.03.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 03:38:22 -0700 (PDT) In-Reply-To: <20230321184332.93736C13913@vcs2.savannah.gnu.org> (=?utf-8?B?Ikpvw4PCo28JVMODwqF2b3JhIidz?= message of "Tue, 21 Mar 2023 14:43:32 -0400 (EDT)") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=rpluim@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304701 Archived-At: >>>>> On Tue, 21 Mar 2023 14:43:32 -0400 (EDT), Jo=C3=83=C2=A3o T=C3=83=C2= =A1vora said: Jo=C3=83=C2=A3o> branch: master Jo=C3=83=C2=A3o> commit 0d5036061b544f5a306ccd275502f608ec9d3f25 Jo=C3=83=C2=A3o> Author: Jo=C3=A3o T=C3=A1vora Jo=C3=83=C2=A3o> Commit: Jo=C3=A3o T=C3=A1vora Jo=C3=83=C2=A3o> Skip Eglot test if using very old clangd =20=20=20=20 Jo=C3=83=C2=A3o> * test/lisp/progmodes/eglot-tests.el (eglot--clang= d-version): New Jo=C3=83=C2=A3o> helper. Jo=C3=83=C2=A3o> (eglot-test-diagnostic-tags-unnecessary-code): Use= it. Jo=C3=83=C2=A3o> --- Jo=C3=83=C2=A3o> test/lisp/progmodes/eglot-tests.el | 7 +++++++ Jo=C3=83=C2=A3o> 1 file changed, 7 insertions(+) Jo=C3=83=C2=A3o> diff --git a/test/lisp/progmodes/eglot-tests.el b/test= /lisp/progmodes/eglot-tests.el Jo=C3=83=C2=A3o> index 7ac26732737..c4b23bfd64e 100644 Jo=C3=83=C2=A3o> --- a/test/lisp/progmodes/eglot-tests.el Jo=C3=83=C2=A3o> +++ b/test/lisp/progmodes/eglot-tests.el Jo=C3=83=C2=A3o> @@ -314,6 +314,12 @@ then restored." Jo=C3=83=C2=A3o> (setq last-command-event char) Jo=C3=83=C2=A3o> (call-interactively (key-binding (vector char)))) =20 Jo=C3=83=C2=A3o> +(defun eglot--clangd-version () Jo=C3=83=C2=A3o> + "Report on the clangd version used in various tests= ." Jo=C3=83=C2=A3o> + (replace-regexp-in-string Jo=C3=83=C2=A3o> + ".*version[[:space:]]+\\(.*\\)" "\\1" Jo=C3=83=C2=A3o> + (car (split-string (shell-command-to-string "clang= d --version") "\n")))) Not all clangd have the version string and only the version string at the end of 'clangd --version'. Here=CA=BCs one I installed from git earlier: clangd version 16.0.0 (https://github.com/llvm/llvm-project.git 08d094a0e45= 7360ad8b94b017d2dc277e697ca76) Features: linux Platform: x86_64-unknown-linux-gnu So how about the following (or we could just say 'everything non-space', but I=CA=BCm assuming clangd versions are always made up of numbers and '.') diff --git c/test/lisp/progmodes/eglot-tests.el i/test/lisp/progmodes/eglot= -tests.el index c4b23bfd64e..557bd899ab7 100644 --- c/test/lisp/progmodes/eglot-tests.el +++ i/test/lisp/progmodes/eglot-tests.el @@ -317,7 +317,7 @@ eglot--simulate-key-event (defun eglot--clangd-version () "Report on the clangd version used in various tests." (replace-regexp-in-string - ".*version[[:space:]]+\\(.*\\)" "\\1" + ".*version[[:space:]]+\\([0-9.]*\\).*" "\\1" (car (split-string (shell-command-to-string "clangd --version") "\n")))) =20 Robert --=20