Subject: Re: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode

From: Eli Zaretskii <[email-masked]>
Date: Thu, 13 Jun 2024 11:24:27 +0300

> From: Yuan Fu <[email-masked]>
> Date: Wed, 12 Jun 2024 23:51:21 -0700
> Cc: [email-masked],
>  Bug Report Emacs <[email-masked]>,
>  Eli Zaretskii <[email-masked]>
> 
> So it seems “virtual” is now a named node rather than an anonymous node, which is a little odd. I asked the author about it in the GitHub issue, let me clear that up before fixing c-ts-mode.

Thanks.

> And, Eli, we really really should pin tree-sitter grammars. As more people start using tree-sitter modes, they will found out about the breakage before we do and the tree-sitter major mode would be unusable for them before they upgrade their grammar. Most of them will not know how to do it and which commit to downgrade to. And I really don’t want to chase the random changes these grammars make all the time. Fixing for these breakages is arguably a heavier maintenance burden than pinning tree-sitter grammars.

But we've been through this already: pinning versions is impractical,
except for those of us who build their own grammar libraries and can
checkout and build the specific pinned revision.  The rest of the
users, who rely on grammars compiled by someone else, will have no
practical way of using the TS modes, unless that someone happens to
provide the pinned version.

And what is the mechanism of selecting the pinned version?  Who and
how will determine which version to pin, and how will we indicate
those versions in Emacs?  This was never finalized, and is not trivial
at all.

When we discussed that, there was a question of how the various
distros handle these libraries, if they at all distribute that.  Did
we learn something new about this?

If nothing has changed since we discussed that, why are you saying now
that we "really should pin"?  That other editors use pinned versions
doesn't mean it's a good solution, for us or in general.  It
definitely has a disadvantage of preventing users to upgrade the
grammar libraries until the next Emacs release (which could be several
months or even a year away), and the advantage is quite illusory.
yes, without pinning we have a maintenance headache on our hands, but
if there's no better alternative, what else can we do?