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 63d69bd1549 07/11: Use new baseline indent rule in c-ts-mode Date: Tue, 03 Dec 2024 03:05:25 -0500 Message-ID: References: <173310542049.252624.8341603519407599366@vcs3.savannah.gnu.org> <20241202021023.2C8B8521785@vcs3.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="2109"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 03 09:06:27 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 1tINvO-0000JZ-4n for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Dec 2024 09:06:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tINuT-0002Mw-Ay; Tue, 03 Dec 2024 03:05:29 -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 1tINuQ-0002Mh-Uz for emacs-devel@gnu.org; Tue, 03 Dec 2024 03:05:26 -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 1tINuP-0007rJ-PQ; Tue, 03 Dec 2024 03:05:26 -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=He+d1/P1Ear/DYjfsEC9o05Dyrq1WoMryxnJNE/ay/s=; b=dbFzJjzfETPsSN/UYaOj I9o7o0eTHUhnzaDtGUQGtawM6Nx2AHLsuebPvSMFJhYF3VdBib7s7KepMSimuPhom0HiA1vAcZJum BbgRf7gZdnDpKbwH1NCG9RaU3kDMRMPrJ+f7IycndDTlvOuEadp6WK+wM75O6il9gF5gOi93Z1qde mKyoGAzZWQVVf0AuNcXXrBttUabOEx1JQ2AYc9oDS5w6j/ljDrvTZwVTLEsLW1dy06AGw5YKXipp1 J1LZRPhtTk6Xmrhi9dzd2MC8zK0XLnl2xB/uQ8clNSTn2jtyKx73gzz9inSoaf/x/IUPu/WxcgW10 nu9xSCMyv4eC7A==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1tINuP-00028c-G6; Tue, 03 Dec 2024 03:05:25 -0500 In-Reply-To: (Yuan Fu's message of "Mon, 2 Dec 2024 16:38:28 -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:325972 Archived-At: Yuan Fu writes: >> On Dec 2, 2024, at 1:02=E2=80=AFPM, Andrea Corallo wr= ote: >> >> Yuan Fu writes: >> >>> branch: master >>> commit 63d69bd154987bcc0434e0f85e09bf5dfa07b827 >>> Author: Yuan Fu >>> Commit: Yuan Fu >>> >>> Use new baseline indent rule in c-ts-mode >>> >>> Rework the indent rules in c-ts-mode using >>> c-ts-common-baseline-indent-rule. Also reworked internal >>> functions for setting indent styles to make it simpler and (more >>> importantly) more readable. Now there's a single function, >>> c-ts-mode--simple-indent-rules, that returns a value that can go >>> straight to treesit-simple-indent-rules. >>> >>> * lisp/progmodes/c-ts-mode.el: >>> (c-ts-mode--indent-style-setter): Simplify. >>> (c-ts-mode--get-indent-style): Remove function. >>> (c-ts-mode--prompt-for-style): Use a hard-coded list of styles. >>> This is a tiny downgrade from the computed lists but is >>> acceptable. >>> (c-ts-mode-set-style): Use c-ts-mode--simple-indent-rules. >>> (c-ts-mode--standalone-grandparent): Docstring change. >>> (c-ts-mode--for-loop-indent-rule): New function. >>> (c-ts-mode--preproc-indent-rules): New variable. Copied from >>> old indent rules and added some new rule. >>> (c-ts-mode--macro-heuristic-rules): >>> (c-ts-mode--simple-indent-rules): >>> (c-ts-mode--parenthesized-expression-indent-rule): >>> (c-ts-mode--label-indent-rules): New functions. >>> (c-ts-mode): >>> (c++-ts-mode): Use c-ts-mode--simple-indent-rules. >>> --- >> >> Hi Yuan, >> >> this commit on my test-bench seems to introduce on master the following >> two failures: c-ts-mode-test-indentation-bsd, >> c-ts-mode-test-indentation. >> >> Could you have a look? >> >> Andrea > > Hey Andrea, sorry about that. The tests do pass on my machine. How does t= he test-bench run the tests? > > Yuan Seems 44fcd37a486399be048fb03b9456497af78632fe fixed c-ts-mode-test-indentation-bsd. I still see: Running 4 tests (2024-12-03 03:51:05+0100, selector `(not (or (tag :expensi= ve-test) (tag :unstable) (tag :nativecomp)))') passed 1/4 c-ts-mode-test-filling (0.033575 sec) Test c-ts-mode-test-indentation backtrace: signal(ert-test-failed (("Mismatch in test \"For Loop with Multi-lin ert-fail(("Mismatch in test \"For Loop with Multi-line Condition (GN ert-test--erts-test(((code lambda nil (c-ts-mode) (setq-local indent ert-test-erts-file("/home/andcor03/emacs-ci/emacs-ci-repo1/test/lisp #f(compiled-function () #)() #f(compiled-function () #)() handler-bind-1(#f(compiled-function () #