From: Yuan Fu <casouri@gmail.com>
To: Peter Oliver <p.d.oliver@mavit.org.uk>
Cc: "Björn Bidar" <bjorn.bidar@thaodan.de>,
"Emacs Devel" <emacs-devel@gnu.org>
Subject: Re: Validating tree-sitter major modes and grammar
Date: Tue, 24 Dec 2024 14:14:07 -0800 [thread overview]
Message-ID: <66E6F765-CB70-4A4C-82AA-55273B475678@gmail.com> (raw)
In-Reply-To: <b26b0067-152f-1ea3-1989-4061ec30deec@mavit.org.uk>
> On Dec 24, 2024, at 4:36 AM, Peter Oliver <p.d.oliver@mavit.org.uk> wrote:
>
> On Mon, 23 Dec 2024, Yuan Fu wrote:
>
>>> On Dec 22, 2024, at 4:44 PM, Björn Bidar <bjorn.bidar@thaodan.de> wrote:
>>>
>>> Yuan Fu <casouri@gmail.com> writes:
>>>
>>>> Continuing from the tree-sitter maternity thread, I cooked up some
>>>> script to go over each builtin tree-sitter mode, clone the grammars it
>>>> uses, and check whether the font-lock queries are compatible with the
>>>> latest version of the grammar. If everything works fine, the script
>>>> adds some comment in the source file listing the version that was
>>>> checked.
>>>
>>> Oh that sounds very good. This could be a good workaround for the sort
>>> of fast and lose nature of tree-sitter.
>>
>> Great. Do you think the “verified version” comment will be helpful for packagers?
>
> It helps answer the question, “I am building a new Emacs release. Do I need to update these Tree-sitter parsers?”.
>
> However, as a parser packager, I also need to answer the question, “This parser has released a new version. Can I package it now, or do I need to wait for Emacs 30? Emacs 31?”. A static comment in the source code of a released version of Emacs will likely be too out-of-date to answer that.
>
> Other ideas:
>
> - Run these checks regularly (from https://emba.gnu.org/, perhaps?) for the most-recent Emacs release, outputting a report or webpage that can be referred to by packagers.
>
> - Include a function in Emacs that packagers can call themselves to check the compatibility of installed parsers. They could run this check every time they build an updated parser (either manually, as a part of the package build, or as a part of their distribution’s automated CI testing).
I can add another script that finds the latest “version” that’s compatible with a builtin mode. The comments will be helpful for packaging a new Emacs release. And the new script can help with packaging new grammar versions with Emacs.
Yuan
next prev parent reply other threads:[~2024-12-24 22:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 9:09 Validating tree-sitter major modes and grammar Yuan Fu
2024-12-20 12:24 ` Eli Zaretskii
2024-12-20 16:22 ` Yuan Fu
2024-12-23 0:44 ` Björn Bidar
[not found] ` <868qs6vd76.fsf@aarsen.me>
2024-12-24 1:16 ` Yuan Fu
2024-12-24 3:12 ` Yuan Fu
2024-12-24 12:19 ` Eli Zaretskii
2024-12-24 21:30 ` Yuan Fu
2024-12-24 23:09 ` Dmitry Gutov
2024-12-25 8:39 ` Yuan Fu
2024-12-26 2:23 ` Dmitry Gutov
2025-01-02 3:30 ` Yuan Fu
[not found] ` <6768b29d.050a0220.1b40f2.5574SMTPIN_ADDED_BROKEN@mx.google.com>
2024-12-24 3:20 ` Yuan Fu
2024-12-24 12:36 ` Peter Oliver
2024-12-24 14:20 ` Michael Albinus
2024-12-24 22:20 ` Yuan Fu
2024-12-25 8:20 ` Michael Albinus
2024-12-25 9:33 ` Yuan Fu
2024-12-25 13:51 ` Michael Albinus
2024-12-26 12:54 ` Peter Oliver
2024-12-26 17:50 ` Michael Albinus
2024-12-28 12:02 ` Michael Albinus
2024-12-30 8:08 ` Yuan Fu
2025-01-02 16:48 ` Peter Oliver
2025-01-03 12:26 ` Peter Oliver
2025-01-04 8:31 ` Yuan Fu
2024-12-24 22:14 ` Yuan Fu [this message]
2024-12-24 21:36 ` Björn Bidar
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=66E6F765-CB70-4A4C-82AA-55273B475678@gmail.com \
--to=casouri@gmail.com \
--cc=bjorn.bidar@thaodan.de \
--cc=emacs-devel@gnu.org \
--cc=p.d.oliver@mavit.org.uk \
/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).