unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: emacs-devel@gnu.org
Subject: Re: [PATCH] Testing strategy for Tree-sitter modes
Date: Sun, 8 Jan 2023 22:14:40 +0100	[thread overview]
Message-ID: <2e370d5d-203e-7b5c-30d2-a3c4d8ca2b2f@secure.kjonigsen.net> (raw)
In-Reply-To: <m1tu112jgi.fsf@yahoo.es>

On 08.01.2023 15:23, Daniel Martín wrote:
> I think the development of Tree-sitter modes would benefit from having a
> regression test suite that ensures that bug fixes for specific cases
> don't regress in the future.
>
> As a start, I've attached to this mail some ERT-based tests for the
> indentation feature of c-ts-mode.  I've used the convenient feature of
> "erts" files to create the tests, which I think make them readable and
> maintainable.
>
> The tests are skipped if the Emacs build does not have Tree-sitter
> enabled, or if the corresponding grammar is not installed.  Perhaps it
> would be a good idea to install these Tree-sitter dependencies in the
> container images used for EMBA (https://emba.gnu.org/emacs), so that
> we're able to run Tree-sitter tests in continuous integration, and even
> play with different versions of Tree-sitter or the Tree-sitter grammars
> to detect incompatibilities.  I'll leave this decision to the people in
> charge of EMBA.
>
> Thanks.
>
I fully support the addition of the possibility to have a test-suite run 
on CI.

When we ported csharp-mode and typescript-mode from ELPA to new ts-based 
major modes in Emacs-core, I always felt like this was the one thing I 
really wished we'd have here as well.

If this can be added easily, it would make it much easier (and safer!) 
to make changes to tree-sitter grammars in major-modes with complex 
grammer, and where it's not always obvious what rule covers what 
use-case(s).

--
Jostein




      parent reply	other threads:[~2023-01-08 21:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1tu112jgi.fsf.ref@yahoo.es>
2023-01-08 14:23 ` [PATCH] Testing strategy for Tree-sitter modes Daniel Martín
2023-01-08 14:56   ` Eli Zaretskii
2023-01-08 17:27   ` Michael Albinus
2023-01-08 21:14   ` Jostein Kjønigsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e370d5d-203e-7b5c-30d2-a3c4d8ca2b2f@secure.kjonigsen.net \
    --to=jostein@secure.kjonigsen.net \
    --cc=emacs-devel@gnu.org \
    --cc=jostein@kjonigsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).