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: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, 71562 <at> debbugs.gnu.org, sb <at> dod.no
Subject: bug#71562: treesit-install-language-grammar fails to install typescript
Date: Tue, 18 Jun 2024 23:33:50 -0700

> On Jun 15, 2024, at 10:16 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> Date: Sat, 15 Jun 2024 22:30:25 +0300
>> Cc: sb <at> dod.no, 71562 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dmitry <at> gutov.dev>
>> 
>> On 15/06/2024 09:31, Eli Zaretskii wrote:
>>> 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.
>> 
>> In the present case we have two problems:
>> 
>> * https://github.com/tree-sitter/tree-sitter-typescript/ contains two 
>> different files called parser.c in two different subdirectories (in 
>> typescript/src and tsx/src).
>> 
>> * The repository for the 'tsx' grammar does not match the common scheme 
>> - instead it's the same repository as for 'typescript'.
> 
> I'm saying that we should run the build commands in every subdirectory
> called 'src' that has parser.c or parser.cc in it.  Each shared
> library thus created should be installed.  The name of the library is
> derived from the parent of the 'src' subdirectory.

treesit-install-language-grammar works fine if you pass “typescript/src” instead of the default “src” to it, for the third argument, so I don’t think there’s anything to fix here. Installing multiple things “smartly” might be more confusing and error-prone than helpful, IMO.

For reference, the recipe for typescript is

(typescript "https://github.com/tree-sitter/tree-sitter-typescript” nil "typescript/src" nil nil)

Yuan



This bug report was last modified 362 days ago.

Previous Next


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