From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71562: treesit-install-language-grammar fails to install typescript Date: Sat, 15 Jun 2024 09:31:59 +0300 Message-ID: <86msnmwwbk.fsf@gnu.org> References: <87v82bcrrm.fsf@dod.no> <47399af2-6982-4ce1-ad50-db426624edae@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12779"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71562@debbugs.gnu.org, sb@dod.no To: Dmitry Gutov , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 15 08:35:16 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sIN0O-00036t-Ap for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jun 2024 08:35:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIN0A-0003CE-Mr; Sat, 15 Jun 2024 02:35:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIN09-0003C0-LR for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2024 02:35:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sIN09-0001Ew-CF for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2024 02:35:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sIN09-0007s0-Lo for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2024 02:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jun 2024 06:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71562 X-GNU-PR-Package: emacs Original-Received: via spool by 71562-submit@debbugs.gnu.org id=B71562.171843326030155 (code B ref 71562); Sat, 15 Jun 2024 06:35:01 +0000 Original-Received: (at 71562) by debbugs.gnu.org; 15 Jun 2024 06:34:20 +0000 Original-Received: from localhost ([127.0.0.1]:46350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIMzU-0007qI-6U for submit@debbugs.gnu.org; Sat, 15 Jun 2024 02:34:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIMzS-0007pu-Ih for 71562@debbugs.gnu.org; Sat, 15 Jun 2024 02:34:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIMxF-0000x3-HV; Sat, 15 Jun 2024 02:32:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=glG3f3YLKdZxiWIq//kOZ9Gr7PKve5S+RsfyOhcjejM=; b=ZYt7toTbOIcDPasIgC5u nMRZ+hXIH3ot0KcOM3utyfyGd4pWjD/X4OdooIxjd94VVefrS+jeExErJyQqHA05sjvXkcZ8CqBTf eussLtMKfi0ScT9ReEjeT0awpCmEzK+VZUU8a4e5v2hay0JghW6blKUBO+ACZAM5IFQll2pAi83zG kHAnmEOJNO0wiN3YkPdDhM/Qgqel8ayq8E39ayOCgAziNwE55IQGwPDljmH7C4Iijrpn0BH1AW+Mi 58qvde2Pt8jkxh4WIicffJsq+vkhTxbn7Kt/W/0TyL2tzM6yrJYacHdMdGKXzaDaDbAxdI3o5RgVP TjOBMOpsRBB8Og==; In-Reply-To: <47399af2-6982-4ce1-ad50-db426624edae@gutov.dev> (message from Dmitry Gutov on Sat, 15 Jun 2024 01:18:50 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287252 Archived-At: > Date: Sat, 15 Jun 2024 01:18:50 +0300 > From: Dmitry Gutov > > 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.