From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#71562: treesit-install-language-grammar fails to install typescript Date: Tue, 18 Jun 2024 23:33:50 -0700 Message-ID: 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> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32283"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , 71562@debbugs.gnu.org, sb@dod.no To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 19 08:36:10 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 1sJovS-00089A-7O for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Jun 2024 08:36:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJovJ-00085L-3g; Wed, 19 Jun 2024 02:36:01 -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 1sJovH-00084t-GF for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 02:35: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 1sJovH-0000yI-7J for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 02:35:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJovK-0001d8-8r for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 02:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jun 2024 06:36: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.17187789156194 (code B ref 71562); Wed, 19 Jun 2024 06:36:02 +0000 Original-Received: (at 71562) by debbugs.gnu.org; 19 Jun 2024 06:35:15 +0000 Original-Received: from localhost ([127.0.0.1]:34612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJouZ-0001bp-AZ for submit@debbugs.gnu.org; Wed, 19 Jun 2024 02:35:15 -0400 Original-Received: from mail-pf1-f177.google.com ([209.85.210.177]:60839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJouV-0001bX-9K for 71562@debbugs.gnu.org; Wed, 19 Jun 2024 02:35:13 -0400 Original-Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-70435f4c330so5199860b3a.1 for <71562@debbugs.gnu.org>; Tue, 18 Jun 2024 23:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718778842; x=1719383642; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7add5RfcfoRD6kQ/T4BT6VcpkJPSXhbSub7L/+HZ+QQ=; b=knwxl/uauueWdf/Wb4N+YecGv5fl9UAEuPuIGDNc5h35CIvNr2uZPLQD0MUNdf6iX1 HcKIjNQ/gVp549aAiJXJABmVF1tjXxSA07WdN7imqRhYwEoS+X/w1PH0eXrVQyHgjo8x u61xizCavQ5inPb6KiUeTZqRqhgUKdgbrzQW2UZK9mIbJJNMwmcSC2L61WJZ2YzfkDRm TkTr3Zbtuo4OpgU1fTcmys5K0jaH+gNGYsTpLnovSOZJs8285t5Kzi9/rQoCwMx8LBik yasJJx0AT0CV/NO/rlgPV6Hc+ODz5zSN/QFdjnlpX5sUrzgIA/eMEoDZfKtuS15BDGLe lXKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718778842; x=1719383642; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7add5RfcfoRD6kQ/T4BT6VcpkJPSXhbSub7L/+HZ+QQ=; b=cZ5/RWnBkEwu6NNXXzEaDP1E4+7ApAIxFbSyne1XilQi/l7qKlHao4V5AACrpDygWB 4TdOZBwMXYc7fQcV+G21kIhndNVvV5QeFs+0NPYLiGwn8dpFrEOn/XCUsds7/OmhSKYw xZvjt2q/XWfc20j4K2xmRuc5nTwL8vB2aa2HOmKrgdB0iUxF+1Jc5hAhVVBO4tB4d1Bd OaxFG8zpd3YK9VuI6Wv4i6rRa0PTcBf4vPvZYE7pQ5hB4zw2Sm59iKCjhCFUm7Um+gcp Zl3WH5s2BaXuE7hnqkSkpV8nPc4orWbgBAz4WRENulblKLAQe4WaE8BbIk+cr0ZeeWZ2 eTcQ== X-Forwarded-Encrypted: i=1; AJvYcCV3D6Dhp2GPGYHLhhT4I0/oyc5t2N0gtgC5TKDH57CwEBtZUl0oHYqzmNM4FkwEWrc3bBrHSxRNoc4iAkm80xUs9+3wqcw= X-Gm-Message-State: AOJu0Yy+TByK7iE3ZbgMYzYli2NWklMVZCsibtCW9x8cXF1/KDD/eO4D Ykra5oaF4Sq3R2eKTzEarc8u4OYoYI7eTfP3cY8X+Ifd+tulI2GIIM+Rgw== X-Google-Smtp-Source: AGHT+IFJhtxuDeUZdaD97RE/U2Yoe+VaSWAp0B4+PfwixEMP+DTEhEPrCkFel3zfsgoPOamZ2S/y2g== X-Received: by 2002:a05:6a00:198c:b0:705:a0de:6155 with SMTP id d2e1a72fcca58-70629cd0c28mr1942502b3a.25.1718778842331; Tue, 18 Jun 2024 23:34:02 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:2dbd:5c5a:649f:1b8a]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-705ccb4158fsm9953506b3a.108.2024.06.18.23.34.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2024 23:34:01 -0700 (PDT) In-Reply-To: <86v829sc18.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.600.62) 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:287469 Archived-At: > On Jun 15, 2024, at 10:16=E2=80=AFPM, Eli Zaretskii = wrote: >=20 >> Date: Sat, 15 Jun 2024 22:30:25 +0300 >> Cc: sb@dod.no, 71562@debbugs.gnu.org >> From: Dmitry Gutov >>=20 >> 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. >>=20 >> In the present case we have two problems: >>=20 >> * https://github.com/tree-sitter/tree-sitter-typescript/ contains two=20= >> different files called parser.c in two different subdirectories (in=20= >> typescript/src and tsx/src). >>=20 >> * The repository for the 'tsx' grammar does not match the common = scheme=20 >> - instead it's the same repository as for 'typescript'. >=20 > 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 = =E2=80=9Ctypescript/src=E2=80=9D instead of the default =E2=80=9Csrc=E2=80= =9D to it, for the third argument, so I don=E2=80=99t think there=E2=80=99= s anything to fix here. Installing multiple things =E2=80=9Csmartly=E2=80=9D= 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=E2=80=9D= nil "typescript/src" nil nil) Yuan=