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.devel Subject: Re: Call for volunteers: add tree-sitter support to major modes Date: Mon, 10 Oct 2022 11:15:31 +0300 Message-ID: <835ygshz6k.fsf@gnu.org> References: <83czb1jrm3.fsf@gnu.org> <878rlo7on0.fsf@thornhill.no> <83o7uki5ol.fsf@gnu.org> <87tu4c5g9j.fsf@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31886"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org, jostein@kjonigsen.net To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 10 10:34:11 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ohoEj-0007uD-Qi for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 10:34:10 +0200 Original-Received: from localhost ([::1]:36224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohoEi-0004Oy-5X for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 04:34:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohnwc-0002Ck-E7 for emacs-devel@gnu.org; Mon, 10 Oct 2022 04:15:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohnwb-0008SB-G6; Mon, 10 Oct 2022 04:15:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/7CIDn/Tyb1iW2M+mGZ1GSQ1+J30VdJWj4lVElr1vHI=; b=APVaR8NXXmxV a3KRmpEO/C6YC4oHgKm45lkRkF3uiWJNJrwSTG3kq/Wr/PA2qSM+nHExG2CD7NGupu25p4vTV3iMF Z1pnOFw5DVzjz4eOqevzheNvCOuukInUTslRPTf0N8vfMUbXkVhYeXvCl8Nz1rzS8jbZ+8tS8MaFX EcHq0hdRwGmdl1fLkYktGNNagfXbDZz0azw6ne8rf8yZya1+lgtja7hC0tQaTkBNuxYix5LwFjEKD SX9PH/LchuEcB7JzqSdSaecfyirKOqyxe/HnC8xO4a+9zAX61f4dvV5ZHDE44ZWcZHtDRbhNOUKbx +AWFnqe638L0mTEwQ03mlw==; Original-Received: from [87.69.77.57] (port=1666 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohnwa-0002tQ-VT; Mon, 10 Oct 2022 04:15:25 -0400 In-Reply-To: <87tu4c5g9j.fsf@thornhill.no> (message from Theodor Thornhill on Mon, 10 Oct 2022 08:44:56 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297338 Archived-At: > From: Theodor Thornhill > Cc: emacs-devel@gnu.org, jostein@kjonigsen.net > Date: Mon, 10 Oct 2022 08:44:56 +0200 > > Well, I'm a maintainer and contributor to two fairly popular > modes, 'csharp-mode' and 'typescript-mode'. The former is in ELPA, the > latter in nongnu ELPA. For the former, I'm not sure if bringing the > cc-mode variant into core is a good plan, for several reasons. > > - It has some perf issues with multiline strings > - There's some problems with indentation and other very c# related stuff > - It _will_ cause more maintainer burden onto Alan, because of cc-mode > lineage. > > > In this case it makes sense for me to add only the tree-sitter variant, > found here [0]. > > > For 'typescript-mode', it isn't feasible to enter the most use variant > into core because of copyright issues, but more importantly, it has some > very long-standing unfixed issues that are impossible to solve. > > - tsx cannot be supported reliably by js-mode derivation because it uses > same syntax for types and tsx ( <, >). This is handled just fine by > tree-sitter. Same for template string literals. > > - The tree-sitter variant is made by me and Jostein (CC'd) [1], so there are > no issues there with assignment. > > > My suggestion is to add the tree-sitter variant in these cases, and let > the other modes die a slow, deprecated death down the line. > > What do you think? SGTM, but I'd like to hear from Lars as well. Another possible concern is: what will users of the tree-sitter variants we add miss wrt the existing variants? IOW, what useful features will be missing from the support of those languages by these new modes?