From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: master 44fcd37a486 08/11: Add more c-ts-mode indent tests Date: Tue, 10 Dec 2024 22:15:32 -0800 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 (Mac OS X Mail 16.0 \(3776.700.51\)) 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="18810"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Albinus , Emacs Devel , acorallo@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 11 07:16:49 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 1tLG1h-0004j1-KS for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Dec 2024 07:16:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLG0l-0001qH-9d; Wed, 11 Dec 2024 01:15:51 -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 1tLG0k-0001q7-DK for emacs-devel@gnu.org; Wed, 11 Dec 2024 01:15:50 -0500 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLG0i-0006hL-JH; Wed, 11 Dec 2024 01:15:50 -0500 Original-Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-21670dce0a7so19485915ad.1; Tue, 10 Dec 2024 22:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733897745; x=1734502545; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wvyIVRnxsDYvO1Dw5vzTdz5ciYd3HL1E9Xj8ZiEjjoc=; b=P8jiH8iWK60/vYM13Qdeh8sQVM8wMWzTCof69SbtOkEEFjvcA0oaWI0apQyuxib86O R9Oyn8z0T/CsGCM15uXsiTjuVN/DymEn9Jt+svNhz/J38p5pywE3L4ICFmAAV4u0nFjL nxtSRsklkyP9QItcinHtkqx5qKPnst2E2qZetiNvmixqao+KJP/1qo6P5JM3GeR6+lg1 GI/fuNS6Nsr7RE5WpEW9KjExmWkBXmDErplygdlk1INN/UHih7aTBwSUYUw+IMFo9O6T X8NVrmdHK62xwje9URtCfHSv2MlYjR+yq0xmOfHE3CdVINu5E0kTaJ4vVI2qXL8bx/xx Kj2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733897745; x=1734502545; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wvyIVRnxsDYvO1Dw5vzTdz5ciYd3HL1E9Xj8ZiEjjoc=; b=ltFD2ZrAeqnT0gh4axQi6UUcRABo6GSinSfDOpR2snKv1AFH5dCDwcuEa+0BNK0CS3 xmbxnpR2iX2uZK3Ta1U8VT35O9oWLCOdOYyNCWgpfPlfkunvll/+o9+7iuMnJVSMJWxV fbr3lEZiJdIP73r0ReqeKi6t/L8MTXx9LDgdiuGpyhMezfBtchpMg9ipT/d+qg9+3Y6N g95cO/oBaWBYN0x7GHAgPySs3ANGr51+1+4yk7NyFE/4qjg4yJ2DHFeRV9xUVXPOXtWp +XuQub4GGNvcwfgmUhkLy/p2q+ssmOTPQ+DAjVKxEOZJy+0OD/JiS8MQGuDN/rUvMfLf lZkw== X-Forwarded-Encrypted: i=1; AJvYcCVi8usUSkkSxP6RIQKmmGdhud19l4BcddofRj4M+ExRdJMMa/kJKt69MA3UjOEStqYIww7KWLRbPTWJ7hw=@gnu.org, AJvYcCVsWWe4kWJt7WVh03K6mXnljKkDJ/V93Bm7LQ6j0Ch7YiGu522ZCOEybdO4GpRpi5SjoFmhIBDpGQ==@gnu.org X-Gm-Message-State: AOJu0Yyj3iSLz/0MmrUbAihtOAXyg54H+UapIjkS4SxBP6ixftDfaW7L sGdUptcCsMiqd8DT3aLdFjmjcn53jk2tjTWk+YC/FgGo5UF3aqs1/dYSqQ== X-Gm-Gg: ASbGncssug86MCY60yD8DjNasSDb48ENo2WnKcoPuq8uRpX49YWE5lMxk0DBulcW1gR wJs5b75B4UPdVhehfoj/03VOmcy4IBobBCsH7HE1QBLkZXlsbOpI0CLQh03w90pnPKd2eexgwB2 jZOtO8CBmz9MniY56+qC5hLmcr2sI0WpdKMZoHhG26gCftlUrtbfr6GkdGkk/xRIEHU6jDpBbP6 Mo5mOybxNjNpuyD36w8MmCGM/9gA/0ZL2xm4l52ezllW6RfdimhbWmox5Z5XCVZso28nVVTRF3E YQ== X-Google-Smtp-Source: AGHT+IEMF1jLZp25kFLOBCBwcioSQuvbU/c5aZOrUcI1kzWqAinhIUtggflghT8Qlcre5Vx8JQ/lGQ== X-Received: by 2002:a17:902:ec83:b0:215:7421:262 with SMTP id d9443c01a7336-2177851e81dmr29121315ad.12.1733897744623; Tue, 10 Dec 2024 22:15:44 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:f90e:3b71:6ee2:6197]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21649ad2bb0sm47450905ad.254.2024.12.10.22.15.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2024 22:15:44 -0800 (PST) In-Reply-To: <86ttbgj5k7.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=casouri@gmail.com; helo=mail-pl1-x635.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:326328 Archived-At: > 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-sitter 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 = running 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 = upstream 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=