From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: master 44fcd37a486 08/11: Add more c-ts-mode indent tests Date: Wed, 11 Dec 2024 18:50:46 -0500 Message-ID: References: <173310542049.252624.8341603519407599366@vcs3.savannah.gnu.org> <20241202021023.5060A521787@vcs3.savannah.gnu.org> <87plm7zwqx.fsf@gmx.de> <87jzce7f6y.fsf@gmx.de> <86ttbgj5k7.fsf@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="12078"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Michael Albinus , Emacs Devel To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 12 00:51:25 2024 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 1tLWUH-00031T-Hx for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Dec 2024 00:51:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLWTi-0008Q0-Bc; Wed, 11 Dec 2024 18:50:50 -0500 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 1tLWTf-0008PQ-MQ for emacs-devel@gnu.org; Wed, 11 Dec 2024 18:50:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLWTe-00013d-Vg; Wed, 11 Dec 2024 18:50:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=wlwPtUdMazG//s1R7b5RYWPYdjtjIcBlLq9CsbLlI4I=; b=QZS8RVElCgHGkcQ3XX08 myukII6JqyZ26nX1IahOct0Vv5Sh62RCVZcKMsfOSWtLjYN/1yDG0v7bmjy9iBEbDUETN12hjBDvO QjgXE0TJ3Z8NUAiK04uQHTjhsyJfrpSgcSy0nqjMz+1+WTsPVNshXCyqEcTw/pW38mCJ/rgS52YLM u0JQJsIJ2UUB3y+URR+rT0FFd+O2g2wNtSmNhpeT0dwMZWyEysThB4TxvVFgfJgFUb2Dr0mSc03Jg EeSht1wet7t3VBwHriRcYYFfuw3QYiSTrQNr8aMQIC/VFszsAkvUr9XJWjAeRx3pgw2y06bhNtUdN CkGIHYa9glwj3A==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1tLWTe-0008MO-EI; Wed, 11 Dec 2024 18:50:46 -0500 In-Reply-To: (Yuan Fu's message of "Tue, 10 Dec 2024 22:15:32 -0800") 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:326388 Archived-At: Yuan Fu writes: >> On Dec 6, 2024, at 11:49=E2=80=AFPM, Eli Zaretskii wrote: >>=20 >>> From: Yuan Fu >>> Date: Fri, 6 Dec 2024 17:04:42 -0800 >>> Cc: Emacs Devel , >>> Andrea Corallo >>>=20 >>>=20 >>>=20 >>>> On Dec 5, 2024, at 11:30=E2=80=AFPM, Yuan Fu wrote: >>>>=20 >>>>=20 >>>>=20 >>>>> On Dec 4, 2024, at 11:37=E2=80=AFPM, Michael Albinus wrote: >>>>>=20 >>>>> Yuan Fu writes: >>>>>=20 >>>>> Hi Yuan, >>>>>=20 >>>>>> This is baffling. I assume the pipeline build the latest >>>>>> tree-sitter-c/cpp grammar right? I just updated my grammar and >>>>>> tree-sitter lib to the latest and the tests still pass on my >>>>>> machine. Is tree-sitter version also the latest? >>>>>=20 >>>>> See test/infra/Dockerfile.emba. The emacs-tree-sitter container image= is >>>>> created prior every run, the treesitter grammars mentioned there are >>>>> installed. >>>>=20 >>>> Ah, so the image uses Debian bookworm, which AFAIK is the current >>>> stable release, so it probably doesn=E2=80=99t have the latest tree-si= tter >>>> library. Let me try to run the pipeline with tree-sitter built >>>> from upstream. >>>>=20 >>>> Yuan >>>=20 >>> I didn=E2=80=99t run the pipeline built from upstream, but I tried runn= ing >>> the tests locally with the tree-sitter library used in the >>> pipeline. The pipeline uses tree-sitter provided by bookworm, which >>> is v0.20.7, a pretty old version. And indeed, with that version of >>> tree-sitter I can see the test failure. >>>=20 >>> Andrea, which version of tree-sitter do you have on your test bench? >>>=20 >>> Since tree-sitter is still relatively unstable, maybe we want to use up= stream tree-sitter for the test suite? >>=20 >> I don't think this is practical. I'd rather mark that test as >> expected failure or "unstable", if we cannot know the version of the >> tree-sitter library used for the test. >>=20 >> Or maybe you could rewrite the test so that it works in both old and >> new versions of the library. >>=20 >> (FWIW, I use 0.20.8, with the latest grammar libraries, and the test >> fails here as well. Due to the issues with ABI breakage in the >> tree-sitter library, I decided that I will upgrade only when 0.25 is >> released, because it also bumps the language ABI version, which we can >> detect in Emacs.) > > I dug into it, and the culprit is a bug in older tree-sitter versions > where (the C equivalent of) treesit-node-field-name-for-child gives > the wrong field name. I rewrote the indent function so it uses child > node index instead of field name to match indentation rules. Now the > tests should pass. > > Yuan Confirm Thanks Andrea