From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71562: treesit-install-language-grammar fails to install typescript Date: Thu, 20 Jun 2024 18:03:32 +0300 Message-ID: <73eaf141-c9d2-4866-80b3-a71152d314c9@gutov.dev> References: <87v82bcrrm.fsf@dod.no> <47399af2-6982-4ce1-ad50-db426624edae@gutov.dev> <86msnmwwbk.fsf@gnu.org> <93d76485-2563-45e3-890d-d5bfc56ff4b7@gutov.dev> <86v829sc18.fsf@gnu.org> <6ac57d91-0aed-4e7d-9022-9697a5a036dd@gutov.dev> <86plscnrhf.fsf@gnu.org> <954cf804-bdf1-4817-9eae-4591aa5f6b53@gutov.dev> <867cejopt8.fsf@gnu.org> <3333f18b-f685-469a-b530-57adb5b6ce4f@gutov.dev> <865xu3onph.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36572"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: casouri@gmail.com, sb@dod.no, 71562@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 20 17:04:26 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 1sKJKr-0009Dj-A5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Jun 2024 17:04:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKJKS-0006S0-4l; Thu, 20 Jun 2024 11:04:00 -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 1sKJKR-0006Rf-Ew for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2024 11:03:59 -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 1sKJKR-0004fM-7H for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2024 11:03:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sKJKU-0003vO-7H for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2024 11:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jun 2024 15:04:02 +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.171889582815054 (code B ref 71562); Thu, 20 Jun 2024 15:04:02 +0000 Original-Received: (at 71562) by debbugs.gnu.org; 20 Jun 2024 15:03:48 +0000 Original-Received: from localhost ([127.0.0.1]:60982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKJKF-0003uk-Sn for submit@debbugs.gnu.org; Thu, 20 Jun 2024 11:03:48 -0400 Original-Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:44863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKJKE-0003uQ-0j for 71562@debbugs.gnu.org; Thu, 20 Jun 2024 11:03:46 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 734031380171; Thu, 20 Jun 2024 11:03:36 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 20 Jun 2024 11:03:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718895816; x=1718982216; bh=pBezrmxFHPvqOocEWJNl1bTcuTUOnXkjkbzOfXk016k=; b= csg3o/eP9GW3lb+T2xje5PsxHrLEHmtbSNFJODv+5T1wltZ08DhYJK0XszMG/RpC VaBPDJ2GY+33sF4r1bVVxULT5jWlgygG4pkLHtSedgtZlUmGC9mapWpYeNX4GFuU EZOBcI63iSxmBzxRfaTBjUkuF1xo60281C9F9yvnDzaRxZjNIHtfC/hD+mwVZ495 +tP+WU7R+llOYbYHiGOQwBtcyG4c0cV6UJnZNjqloMJCWiXE76o9D/se8JvuIabQ RlPdlxDFvNHqaHtEI4XDmwK59Ffg6PxoctPYV1ci1MRa/77kwRlq25qsnivH04ot fcDPVY6h8S+q39gDMb5TYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718895816; x= 1718982216; bh=pBezrmxFHPvqOocEWJNl1bTcuTUOnXkjkbzOfXk016k=; b=A p8ysS8MLTGwyj0doCTttlNIS4ob9uR9HMqn31XvGoQRBu0BkzFzoxmp4P0+X+0Ey fwHPFA67RUZHfg4mj8mgF6kFoxvI4B0zu0c/k/HSPeJF/e8lBpIetQZRuyy2jn5A o1u3VhLzXihodnaBHj+RGOUn2xUWh61CwSZMGl8/VsQarHSSkRSJ9KYEuErZR2OV Pnr+x4F/0yR+CSq+AxLwflOCOY2QhDKyB/n2tV9wW3OQ0E13t2lZhrt7Ev4ZUlKb iGLhgtwz7Su/qs0oJZbw5/QT5g71946LvlR/4385x9kTN+sRc3FDnKRT57+72Rd0 8/7ciba/DqCWX0DTANTfw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeefvddgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 20 Jun 2024 11:03:33 -0400 (EDT) Content-Language: en-US In-Reply-To: <865xu3onph.fsf@gnu.org> 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:287559 Archived-At: 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. >> 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. > which is less reliable. I suppose we could do both - both update the recipe, and scan the directory tree for files named parser.c. 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.