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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>, Yuan Fu <casouri <at> gmail.com>
Cc: 71562 <at> debbugs.gnu.org, sb <at> dod.no
Subject: bug#71562: treesit-install-language-grammar fails to install typescript
Date: Sat, 15 Jun 2024 09:31:59 +0300
> Date: Sat, 15 Jun 2024 01:18:50 +0300
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> On 14/06/2024 21:18, Steinar Bang wrote:
> > Platform: emacs 29.3 from backports debian package (1:29.3+1-3~bpo12+1)
> >            debian 12.5 "bookworm" (current stable) on amd64
> > 
> > The 'M-x treesit-install-language-grammar RET typescript RET' fails
> > with:
> > 
> >   ⛔ Warning (treesit): Error encountered when installing language
> > grammar: (file-missing Setting current directory No such file or
> > directory /tmp/treesit-workdirN2u4XF/repo/src)
> > 
> > I used defaults on all questions because I had no idea what else to put
> > there.
> > 
> > I think the reason the command fails is that the repository
> >   https://github.com/tree-sitter/tree-sitter-typescript
> > actually contains two tree-sitter parsers for typescript and tsx:
> >   https://github.com/tree-sitter/tree-sitter-typescript/tree/master/typescript
> >   https://github.com/tree-sitter/tree-sitter-typescript/tree/master/tsx
> 
> FWIW, this is more or less intended, since we don't store the exact urls 
> for the grammars (in the default settings), and just infer them 
> according to the common scheme.
> 
> But we could change that in some cases, and perhaps typescript is 
> popular enough for us to do that.

We could look for directories names 'src' which have either parser.c
or parser.cc, and take it from there, instead of hard-coding the place
of the 'src' directory in the hierarchy.

I've added Yuan to the discussion.




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.