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.devel Subject: Re: Tree-sitter maturity Date: Tue, 17 Dec 2024 14:11:51 -0800 Message-ID: References: <1ed88fca-788a-fe9f-b6c8-edb2f49751c9@mavit.org.uk> <67428b3d.c80a0220.2f3036.adbdSMTPIN_ADDED_BROKEN@mx.google.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) 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="2952"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Peter Oliver , Stefan Kangas , Emacs Devel , Eli Zaretskii To: =?utf-8?Q?Bj=C3=B6rn_Bidar?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 17 23:13:11 2024 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 1tNfoU-0000ct-Be for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Dec 2024 23:13:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNfnh-00021f-1W; Tue, 17 Dec 2024 17:12:21 -0500 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 1tNfnU-000218-TI for emacs-devel@gnu.org; Tue, 17 Dec 2024 17:12:09 -0500 Original-Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNfnS-0003gl-7y; Tue, 17 Dec 2024 17:12:08 -0500 Original-Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-728d1a2f180so128449b3a.1; Tue, 17 Dec 2024 14:12:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734473524; x=1735078324; darn=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=QcRYxeyowxP2oHk+dioLICGqXvqb60lX3wVKL2aP+bU=; b=D4nku5SLbrfQ2CTgooacfJ4Iiw9FlOwNHAmDesC01nz5NOqIWehx+kM3VLs1XMQnMb bHsxuVM7ku1TWJxlJ0ggEIVzbn1CO3E5OPcSTlqMJPoSt08jOnPbv3upUbrp3G1jBKj1 cGoqQ6eIydE5A1r7L9+HK1zkjnlmt/1/SOPdKkCGaU2Apk+evuPwjq7UTsC0xxd9ClfL Rggf6mjPAmTsb2t3Db6RFA5HcFr1+QBg/Ugkqx80RWJZPHZjxk0LUEFI+CiwT8uIGRb5 F3CzD/SULm8q1Zk1c2Q5HpwSaEIBWM+jblaSCP0WlFsvGouuVcfCFJzs/r9JlSm/kQ38 n4TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734473524; x=1735078324; 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=QcRYxeyowxP2oHk+dioLICGqXvqb60lX3wVKL2aP+bU=; b=be1ITZ0UoRXzbepOgPBIi7ICafqqO7AGM0V+xGHvoXMwUdOpgBwr7BPuFUsizEMKz7 70yw0uOejrUhhmcWc/C4gBr3jslBrz/SaJqsjV1dtCqx0Fn9rU0KHFkskvEIxNuN6j9B 9WQsjSra2qPKhQTkepn8nOI41Ikn+GMVVZWLSthhbSe2jnyDN42WcoskaX2jAVGhXb1l uh8MZVlEf8H7PukC920VIpUmpTRXVfRfZr/uD/Kmglbq9LV6AmXG/7AzmlC5/ObABHju V06DA/o3wg4y4GnFjfhbSp7K/vh/zlvn+MWaup2m0+l/N0524w0YdyWlsKvWdgh8WATB UMmA== X-Forwarded-Encrypted: i=1; AJvYcCWEyKKppHMOj4L3vLE0h9hkSKuP29XNdrUSpIely4L/j46hN9KNmOgb1kWvxI9nQkrUP1wO@gnu.org, AJvYcCWohcZmeBch42Qh9vLzdR+r0UkkbPuWKvX4qOhXJi8i4K9aM15huwqGHtjtzAVP9y3JkQgz0se9CvkLCsA=@gnu.org X-Gm-Message-State: AOJu0YwW/rKVnCDEs3txXF40ycIgyhIPre6oqPAt4AvtE0FXVErn5T0w 0Gwdriw5FTcSu8fI6OBGcjtgry+zr137lqyj/1F2SVhiGwdqHEQcND/MMg== X-Gm-Gg: ASbGncsp0x7HtZQzG8KYSZQD9WiulJet9FnjIMtVweCVKZ+6PN5N5VqXryNELvxLns5 lmlLm9qZXwDi/rgc3l8WACO+eLQRoZgaKZVd+jAc9rkd3gwZIRbV5YdUuqu14IMHL/Y3VzG/5nJ GMOosOezYNJeo7SBRCYglCYSB4UdvMcZqU+7vkmNG7AE1au4mqEO8QhgrbwnuANCTXpeJ0rSxtb 40vcXPIg3rWL8JCIlEEGTNU/fLTHcaCjB2OwSL6KDuzzbkrUCT6eiB1OW5aLphpG1zMvBD7UCY3 +RDT X-Google-Smtp-Source: AGHT+IHWY+ScQ8Dceq8PO3bfJeg7DrALZVmGmgMoACnU9uH+8s8nDuHsZc/nhXeFzHRnRRGqKeQvog== X-Received: by 2002:a05:6a00:6c8b:b0:725:de58:b2ea with SMTP id d2e1a72fcca58-72a7872c38bmr6986548b3a.6.1734473523993; Tue, 17 Dec 2024 14:12:03 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:f4ea:ea2a:5468:b361]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918bad8acsm7422271b3a.146.2024.12.17.14.12.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Dec 2024 14:12:03 -0800 (PST) In-Reply-To: <67428b3d.c80a0220.2f3036.adbdSMTPIN_ADDED_BROKEN@mx.google.com> X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=casouri@gmail.com; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326619 Archived-At: > On Nov 23, 2024, at 6:10=E2=80=AFPM, Bj=C3=B6rn Bidar = wrote: >=20 > Peter Oliver writes: >=20 >> On Wed, 20 Nov 2024, Stefan Kangas wrote: >>=20 >>> =46rom my point of view, we are still in early days when it comes to = the >>> new tree-sitter modes. For starters, we do not recommend them by >>> default, and some language modes are also not yet ready for = prime-time. >>> I'm not even sure that a majority of distros ship the feature in a >>> useful form yet, but I didn't really check. >>=20 >> It depends on what you mean by useful. In Fedora, for example, Emacs = is built with Tree-sitter, but each user has to (ask Emacs to) download = and compile each parser as they go along. >>=20 >> If any Fedora packagers read this and would like to help with >> packaging the parsers used by Emacs, that would be welcome. The >> tracking bug is https://bugzilla.redhat.com/show_bug.cgi?id=3D2258924 >=20 > Feel free to take a look into the RPM packaging I created for SUSE. > There should be a way to collaborate on that if anyone is interested. = [1] >=20 > Using that packaging all the user has to do is to install the required > grammar they want. >=20 >> It=E2=80=99s also worth noting that Tree-sitter itself is somewhat = immature; the developers say that until it reaches version 1.0, we = should be wary of potentially unannounced incompatible changes (although = they are trying harder to avoid this, over time). >=20 >=20 > [1] https://build.opensuse.org/package/show/editors/tree-sitter I wonder if we can formalize a way for tree-sitter major modes to state = the compatible version of language grammar it uses. Maybe a package.el = cookies, or a variable that set, or even just comments in the beginning = of the file. Many major modes already adds entries to treesit-language-source-alist, = that could be a good option too. I especially want built-in major modes to give a version, so that = packagers can package Emacs with the right version of tree-sitter = grammar. I know Eli has problems with pinning a grammar version for = builtin modes before, but I wonder what=E2=80=99s he=E2=80=99s stance = now? Yuan=