From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: casouri@gmail.com, sb@dod.no, 71562@debbugs.gnu.org
Subject: bug#71562: treesit-install-language-grammar fails to install typescript
Date: Thu, 20 Jun 2024 19:08:01 +0300 [thread overview]
Message-ID: <e3027796-5e07-4238-b325-05f0d0fa523a@gutov.dev> (raw)
In-Reply-To: <861q4roba1.fsf@gnu.org>
On 20/06/2024 18:59, Eli Zaretskii wrote:
>> Date: Thu, 20 Jun 2024 18:03:32 +0300
>> Cc: casouri@gmail.com, sb@dod.no, 71562@debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@gutov.dev>
>>
>> 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.
>
> No, it was for _any_ grammar, regardless of its name.
It will work only in the case where Bob specifies 'typescript', not 'tsx'.
>>>> 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.
>
> They are not too many, but they tend to grow, and maintaining such a
> list would be an extra burden. Why do that when a simpler and more
> reliable solution exists?
See the previous mentioned problems with it.
>> 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.
>
> I don't see why that would be a problem. The grammars that come in
> pairs share common parts anyway, so I think updating them all is
> actually slightly safer.
That might be true, though probably not in all cases.
Our major modes for typescript and tsx do share some parts of the
definition.
prev parent reply other threads:[~2024-06-20 16:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 18:18 bug#71562: treesit-install-language-grammar fails to install typescript Steinar Bang
2024-06-14 22:18 ` Dmitry Gutov
2024-06-15 6:31 ` Eli Zaretskii
2024-06-15 19:30 ` Dmitry Gutov
2024-06-16 5:16 ` Eli Zaretskii
2024-06-19 6:33 ` Yuan Fu
2024-06-19 18:51 ` Steinar Bang
2024-06-19 19:14 ` Eli Zaretskii
2024-06-19 19:51 ` Dmitry Gutov
2024-06-20 4:54 ` Eli Zaretskii
2024-06-20 10:28 ` Dmitry Gutov
2024-06-20 10:45 ` Eli Zaretskii
2024-06-20 11:18 ` Dmitry Gutov
2024-06-20 11:31 ` Eli Zaretskii
2024-06-20 15:03 ` Dmitry Gutov
2024-06-20 15:59 ` Eli Zaretskii
2024-06-20 16:08 ` Dmitry Gutov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3027796-5e07-4238-b325-05f0d0fa523a@gutov.dev \
--to=dmitry@gutov.dev \
--cc=71562@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=sb@dod.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.