GNU bug report logs - #71562
treesit-install-language-grammar fails to install typescript

Previous Next

Package: emacs;

Reported by: Steinar Bang <sb <at> dod.no>

Date: Fri, 14 Jun 2024 18:19:02 UTC

Severity: normal

Merged with 71717

Found in version 30.0.50

Full log


Message #50 received at 71562 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: casouri <at> gmail.com, sb <at> dod.no, 71562 <at> debbugs.gnu.org
Subject: Re: bug#71562: treesit-install-language-grammar fails to install
 typescript
Date: Thu, 20 Jun 2024 18:59:34 +0300
> Date: Thu, 20 Jun 2024 18:03:32 +0300
> Cc: casouri <at> gmail.com, sb <at> dod.no, 71562 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry <at> 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.




This bug report was last modified 1 year and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.