|
From: | Peter Oliver |
Subject: | Re: Validating tree-sitter major modes and grammar |
Date: | Tue, 24 Dec 2024 12:36:20 +0000 (GMT) |
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). -- Peter Oliver
[Prev in Thread] | Current Thread | [Next in Thread] |