emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tree-sitter maturity


From: Eli Zaretskii
Subject: Re: Tree-sitter maturity
Date: Thu, 19 Dec 2024 10:17:20 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Wed, 18 Dec 2024 17:40:39 -0800
> Cc: Björn Bidar <bjorn.bidar@thaodan.de>,
>  Peter Oliver <p.d.oliver@mavit.org.uk>,
>  Stefan Kangas <stefankangas@gmail.com>,
>  emacs-devel@gnu.org
> 
> 
> 
> > On Dec 18, 2024, at 5:34 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > 
> >> I especially want built-in major modes to give a version, so that 
> >> packagers can package Emacs with the right version of tree-sitter grammar. 
> >> I know Eli has problems with pinning a grammar version for builtin modes 
> >> before, but I wonder what’s he’s stance now?
> > 
> > What's changed?
> 
> People are starting to package tree-sitter and tree-sitter grammars. If Emacs 
> can be packaged with the right grammars, then tree-sitter modes will work 
> out-of-the-box.
> 
> > 
> > Many language grammars don't make official releases and thus don't
> > have versions.  Moreover, AFAIK there's no API to determine the
> > version of the grammar library we load.  So how can we manage such
> > version-pinning in a way that (a) is up-to-date, and (b) doesn't
> > preclude people from using a grammar library due to false negatives?
> 
> I’m talking about a softer pin. We’re basically providing a “known to work” 
> version. This way packagers can package Emacs with a known-to-work version of 
> grammar, so the builtin modes work out-of-the-box. This doesn’t prevent 
> people from using a newer version and sending us a bug report, and we still 
> try our best to make the major modes work with the newest grammar.
> 
> If the grammar doesn’t have an explicit version, then we can just use a 
> commit hash. I believe all the packaging systems support that?

If you are suggesting to have the known version in some comment, and
we don't have to guarantee that it's always up-to-date (this should be
stated in the comment), then I don't object.  As long as users know
they should take that with a grain of salt, I'm okay with it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]