unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: casouri@gmail.com, sb@dod.no, 71562@debbugs.gnu.org
Subject: bug#71562: treesit-install-language-grammar fails to install typescript
Date: Thu, 20 Jun 2024 18:59:34 +0300	[thread overview]
Message-ID: <861q4roba1.fsf@gnu.org> (raw)
In-Reply-To: <73eaf141-c9d2-4866-80b3-a71152d314c9@gutov.dev> (message from Dmitry Gutov on Thu, 20 Jun 2024 18:03:32 +0300)

> Date: Thu, 20 Jun 2024 18:03:32 +0300
> Cc: casouri@gmail.com, sb@dod.no, 71562@debbugs.gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> On 20/06/2024 14:31, Eli Zaretskii wrote:
> 
> >>> And what do you think should happen next?  Or where's the problem in
> >>> the above 3 steps?
> >>
> >> Next he presses RET a few times and the installation fails.
> > 
> > Why would it fail, if my suggestion is implemented?
> 
> Because your suggestion is for the case where Bob specifies 'typescript' 
> on step 3.

No, it was for _any_ grammar, regardless of its name.

> >> If we added two entries to treesit-language-source-alist by default,
> >> OTOH (one for typescript, and another for tsx), then Bob would be able
> >> to install the grammar easily.
> > 
> > But then we'd need to maintain a DB of all the "abnormal" repositories
> > (and there a few of them),
> 
> There are not too many of them, and out of those TypeScript (and TSX 
> with it) is more popular than most of the others as a programming 
> language. So even if we add these two it wouldn't follow that we must 
> have the rest.

They are not too many, but they tend to grow, and maintaining such a
list would be an extra burden.  Why do that when a simpler and more
reliable solution exists?

> If we aren't concerned about side-effects, such as for example when the 
> user wanted to stay on the previous version of the tsx grammar they had 
> installed (because the major mode doesn't work with the newer one), but 
> they need to update the typescript grammar, and the tsx grammar is 
> overwritten in the process too.

I don't see why that would be a problem.  The grammars that come in
pairs share common parts anyway, so I think updating them all is
actually slightly safer.





  reply	other threads:[~2024-06-20 15:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 18:18 bug#71562: treesit-install-language-grammar fails to install typescript Steinar Bang
2024-06-14 22:18 ` Dmitry Gutov
2024-06-15  6:31   ` Eli Zaretskii
2024-06-15 19:30     ` Dmitry Gutov
2024-06-16  5:16       ` Eli Zaretskii
2024-06-19  6:33         ` Yuan Fu
2024-06-19 18:51           ` Steinar Bang
2024-06-19 19:14             ` Eli Zaretskii
2024-06-19 19:51         ` Dmitry Gutov
2024-06-20  4:54           ` Eli Zaretskii
2024-06-20 10:28             ` Dmitry Gutov
2024-06-20 10:45               ` Eli Zaretskii
2024-06-20 11:18                 ` Dmitry Gutov
2024-06-20 11:31                   ` Eli Zaretskii
2024-06-20 15:03                     ` Dmitry Gutov
2024-06-20 15:59                       ` Eli Zaretskii [this message]
2024-06-20 16:08                         ` 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

  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=861q4roba1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71562@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=dmitry@gutov.dev \
    --cc=sb@dod.no \
    /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).