From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: casouri@gmail.com, emacs-devel@gnu.org, danny@dfreeman.email,
theo@thornhill.no, jostein@secure.kjonigsen.net, dev@rjt.dev,
wkirschbaum@gmail.com, pedz@easesoftware.com
Subject: Re: Update on tree-sitter structure navigation
Date: Sat, 09 Sep 2023 14:38:15 +0300 [thread overview]
Message-ID: <83a5tvvaoo.fsf@gnu.org> (raw)
In-Reply-To: <580010af-7328-768d-b1c2-d80d7099a290@yandex.ru> (message from Dmitry Gutov on Sat, 9 Sep 2023 13:24:46 +0300)
> Date: Sat, 9 Sep 2023 13:24:46 +0300
> Cc: casouri@gmail.com, emacs-devel@gnu.org, danny@dfreeman.email,
> theo@thornhill.no, jostein@secure.kjonigsen.net, dev@rjt.dev,
> wkirschbaum@gmail.com, pedz@easesoftware.com
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> On 09/09/2023 09:32, Eli Zaretskii wrote:
> >> Date: Fri, 8 Sep 2023 23:52:48 +0300
> >> Cc: emacs-devel@gnu.org, danny@dfreeman.email, theo@thornhill.no,
> >> jostein@secure.kjonigsen.net, dev@rjt.dev, wkirschbaum@gmail.com,
> >> pedz@easesoftware.com
> >> From: Dmitry Gutov <dgutov@yandex.ru>
> >>
> >>> FTR, I have nothing against this technique, I just said that it will
> >>> need volunteers to assume this non-trivial job for each major mode,
> >>> and therefore I personally don't believe this to be a reliable
> >>> solution in practice. But if volunteers step forward to do this, I
> >>> don't object.
> >>
> >> I don't see a way around it, if the grammars continue to add breaking
> >> changes.
> >
> > If the only way we see is impractical, this doesn't help, does it?
>
> Is it definitely impractical if it's known to work for NeoVim?
NeoVim is a different editor, with (potentially) different user
audience, different development and release schedules, different
distribution practices, different downstream distros and upgrade
procedures, etc. Without considering all of these aspects and
comparing them to ours, I don't think it's meaningful to say "works"
when we discuss what we should do in our case.
> > No, that'd be worse than what we have now: those commit hashes will
> > quickly become outdated (most grammar libraries are very actively
> > developed), and create the false impression that any later version will
> > not work.
>
> But it's not the first thing the user sees, just internal information:
> we tested with this version last, it's known to work, so if you want to
> have a known well-working configuration, you will install this one.
> Might as well install the latest and try their luck, though.
How is it useful to ask users to use, say, 2-year old versions of
grammar libraries, especially for languages where either the language
or the library (or both) change quickly?
> Further, most important grammars seem to be in a reasonably complete
> state by now.
They add features and fix problems all the time. So I disagree with
the "reasonably complete" part, and so are the developers of those
libraries, evidently.
> > The job is to track all the commits of the corresponding libraries and
> > keep the last commit known to work constantly up-to-date, with delays
> > that are at most days, not weeks or months.
>
> Consider that js-ts-mode is "broken" in Emacs 29.1 now with the latest
> grammar. If there was the last-known-working hash, we could offer the
> users a friendlier way to install it.
How is it friendlier to downgrade to an older version (which would
require fetching it, building it with a C compiler, and installing it)
than to patch a single Lisp file? Actually, people don't even need to
patch their Emacs installations, they could instead have a fixed
version of the Lisp file in their home directories or in site-lisp.
> >> What I'm saying is in this case not doing this job well (e.g. updating
> >> the commit hashes and font-lock/indent rules very rarely) might still be
> >> better than not doing it at all.
> >
> > I strongly disagree. I think that doing this job not well is _worse_
> > than not doing it. It takes just a few days, sometimes a couple of
> > weeks, from submission of the report about a breakage till a fix is
> > available, so people could install it soon enough and be done (since
> > these modes are not preloaded).
>
> But the ts modes in an Emacs release (now in 29.1, later in 29.2, etc)
> remain incompatible with any future grammar changes, right?
That depends on the change: not every change breaks our modes. Only
changes that remove or rename the syntactic elements on which we rely
are breaking changes, from our POV.
> > And we always strive to fix these
> > breakages in a way that makes the code more immune to further changes,
> > so there's hope that with time the frequency of these problems will
> > become lower.
>
> We can continue with this approach too (it's not incompatible with
> saving the last-known-hash anyway), and it could also be of benefit
> later if grammars grow proper versions, but it's also a bit of
> maintenance headache on its own.
I agree it's a maintenance headache, but this issue will cause us
headaches no matter what we do.
next prev parent reply other threads:[~2023-09-09 11:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-02 5:01 Update on tree-sitter structure navigation Yuan Fu
2023-09-02 6:52 ` Ihor Radchenko
2023-09-02 8:50 ` Hugo Thunnissen
2023-09-02 22:12 ` Yuan Fu
2023-09-06 11:37 ` Ihor Radchenko
2023-09-08 0:59 ` Yuan Fu
2023-09-02 22:09 ` Yuan Fu
2023-09-06 11:57 ` Ihor Radchenko
2023-09-06 12:58 ` Eli Zaretskii
2023-09-08 12:03 ` Ihor Radchenko
2023-09-08 13:08 ` Eli Zaretskii
2023-09-08 1:06 ` Yuan Fu
2023-09-08 9:09 ` Ihor Radchenko
2023-09-08 16:46 ` Yuan Fu
2023-09-03 0:56 ` Dmitry Gutov
2023-09-06 2:51 ` Danny Freeman
2023-09-06 12:47 ` Dmitry Gutov
2023-09-07 3:18 ` Danny Freeman
2023-09-07 12:52 ` Dmitry Gutov
2023-09-08 1:04 ` Yuan Fu
2023-09-08 6:40 ` Eli Zaretskii
2023-09-08 20:52 ` Dmitry Gutov
2023-09-09 6:32 ` Eli Zaretskii
2023-09-09 10:24 ` Dmitry Gutov
2023-09-09 11:38 ` Eli Zaretskii [this message]
2023-09-09 17:04 ` Dmitry Gutov
2023-09-09 17:28 ` Eli Zaretskii
2023-09-12 0:36 ` Yuan Fu
2023-09-12 10:17 ` Dmitry Gutov
2023-09-08 21:05 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a5tvvaoo.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=casouri@gmail.com \
--cc=danny@dfreeman.email \
--cc=dev@rjt.dev \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=jostein@secure.kjonigsen.net \
--cc=pedz@easesoftware.com \
--cc=theo@thornhill.no \
--cc=wkirschbaum@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.