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 12:12:20 +0100 Message-ID: <87h6udnip7.fsf@gmail.com> References: <167942421231.13373.16122455155218245677@vcs2.savannah.gnu.org> <20230321184332.93736C13913@vcs2.savannah.gnu.org> <87lejpnk9t.fsf@gmail.com> 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="20706"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 22 12:12:59 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 1pewOo-0005G2-Tc for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Mar 2023 12:12:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pewOK-00047Y-1Z; Wed, 22 Mar 2023 07:12:28 -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 1pewOH-00047P-SS for emacs-devel@gnu.org; Wed, 22 Mar 2023 07:12:26 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pewOG-00082Y-22 for emacs-devel@gnu.org; Wed, 22 Mar 2023 07:12:25 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id p16so11242625wmq.5 for ; Wed, 22 Mar 2023 04:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679483542; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4/7rH4YuHmZllkIS8WhedK473Up5uVLJtZZrhmem8TE=; b=Wf+/8ITSlJzjKyV6KCs1GCdx/9dVTHXN99sgnmF5w0U8uyXA26aUe7kuYi6AHrT4Vx BV8iyuv/shTMBHJikm7Yamt9tbqS9CZ5DYesPz+NpdVpV8VERuDLqahxGAQEUJ2vm2sk 9ceiG7mG01ILjUF/N4vQW4sbuz5wIQl6T/qhzGC3V0tiGAxBsIYLnVD8KDBe5lT4imVF 9ssn8ShUBRM5A6frLU1gc3FSkI8AZbpy+kxb5yV1ds/GP3iQT9vPy2dIHBqB5pZkOHQw d+1OciB2EW4msDPIMt/ztkGNmz5D0aoaRAgpEN6yugrUfIwlN2mLrYluHdMSHLMIMCQH pHXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679483542; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4/7rH4YuHmZllkIS8WhedK473Up5uVLJtZZrhmem8TE=; b=2zJG3k/0OHJOOxZYyUXSQ9I5HXWxcXRtt7sVEb7VaqRtRbSq6XQemU5HK1xLn71Yo+ 7nFKwlsYlqt05h1fctuSTXXnAsxAQlZbndSj+LWqtMhIxBKZ/EUo9/JBLVXMDT1iwxM+ aWpq1yv22nGS8fbwCRAhCFeRpyvHicaY6tFPjhoh/NTgCDZjb5ZOwDYfb/x85+TwayVC AgvNj++YOzRQK2ICBzbM6A3+Kodfa6eSOuUN8A6i9GfQ4zPmWnr5CxletU/ktp1+2mO7 GMouNFuWhDsCQgpas1CwXzeAxhD6RnVyApThlHT08Pl9Vg2nWOf6kT1LlhNPRLD7+Trx qd5g== X-Gm-Message-State: AO0yUKUh6ZWU3S++unYgHhoEVUyf5TG2ecfKv6w/VTK+Lr4ha3/3GWxN h1DDPJSmzctRg1oolmWNdRrNbHX4Ab8= X-Google-Smtp-Source: AK7set9DP7EUoah0zpqnAdMSjAQUXsxShzPpy6EGO+AyR9TYFAfZm/eSwRH5kkfEV9/2PqwiOncKlQ== X-Received: by 2002:a05:600c:b43:b0:3ed:af6b:7faa with SMTP id k3-20020a05600c0b4300b003edaf6b7faamr4873289wmr.17.1679483541877; Wed, 22 Mar 2023 04:12:21 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id hu21-20020a05600ca29500b003ee65e7acbcsm1229801wmb.20.2023.03.22.04.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 04:12:21 -0700 (PDT) In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Wed, 22 Mar 2023 10:49:41 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=rpluim@gmail.com; helo=mail-wm1-x32d.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:304704 Archived-At: >>>>> On Wed, 22 Mar 2023 10:49:41 +0000, Jo=C3=A3o T=C3=A1vora said: Jo=C3=A3o> On Wed, Mar 22, 2023 at 10:38=E2=80=AFAM Robert Pluim wrote: >> 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: >>=20 >> clangd version 16.0.0 (https://github.com/llvm/llvm-project.git 08d0= 94a0e457360ad8b94b017d2dc277e697ca76) >> Features: linux >> Platform: x86_64-unknown-linux-gnu >>=20 >> 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 '.') >>=20 >> diff --git c/test/lisp/progmodes/eglot-tests.el i/test/lisp/progmode= s/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"= )))) Jo=C3=A3o> Sure, thanks. Bonus points for getting rid of the split-str= ing Jo=C3=A3o> and using a regexp that looks at the whole string and Jo=C3=A3o> catches the version. I tried and failed. This doesn=CA=BCt care where 'version ' appears: (defun eglot--clangd-version () "Report on the clangd version used in various tests." (let ((version (shell-command-to-string "clangd --version"))) (when (string-match "version[[:space:]]+\\([0-9.]*\\)" version) (match-string 1 version)))) Robert --=20