From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Bj=C3=B6rn?= Bidar Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter maturity Date: Fri, 20 Dec 2024 10:59:47 +0200 Message-ID: <34231.7288321041$1734685248@news.gmane.org> References: <1ed88fca-788a-fe9f-b6c8-edb2f49751c9@mavit.org.uk> <67428b3d.c80a0220.2f3036.adbdSMTPIN_ADDED_BROKEN@mx.google.com> <86ldwdm7xg.fsf@gnu.org> Mime-Version: 1.0 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="36379"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Yuan Fu , p.d.oliver@mavit.org.uk, stefankangas@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 20 10:00:40 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 1tOYsC-0009Fl-27 for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Dec 2024 10:00:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOYrV-00076P-2t; Fri, 20 Dec 2024 03:59:57 -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 1tOYrR-00075u-GV for emacs-devel@gnu.org; Fri, 20 Dec 2024 03:59:53 -0500 Original-Received: from thaodan.de ([185.216.177.71]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOYrO-0002xg-Us; Fri, 20 Dec 2024 03:59:53 -0500 Original-Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id 56C73D00072; Fri, 20 Dec 2024 10:59:48 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1734685188; bh=Y/GjBSrtPS44i8Acvz7AW02TVjN0n8DaMN4es8LCwAI=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=kYZvdhkJMlOPt2e7hUi0iEUQxOxsBxciv26O39K1BOgknBtrCdRsEp8hQmsdEg8bV wf7ZXp15FwUHchmS7DiZzLLLcpjRoSOE3dqX7jhwxlWYIPzisx8+xLKC+sKO6cIOca tb/VL0rTnJLo4L7IVTxCoUmX894hU0qMCbbAtWt6wbzBddSL7SfA+TNEj1ZdGnqVO3 QHOKfPBgpUvIl9k6MSHVkodbnWsvvopCIRpNKNbGxETM6v+yE1Rn+9Acg4dHPChY1G S5EU6qYBROlVBdmIMVsdR//H3pnKLy60+e80KaO+2HTNI5Xd2IDhtoXrnEac7Fj4wv AZIu048WAnIsvr4VqwzIBdX+WFc2ymbExxWIaLIcOV3IEAb6xik6xMjiOKlCiZ6nv1 +rdsvC72MEVL1vdIAdjEZ810PmftTd3kFUu26MDzy5OjL64DshtXbhzOKTz7TELgbT WKYihoBGorAltI7YEw0N8H3rgQ4wF7km1ru0hpXddrK8wCVF6X2B8oNXhvNsYKc+3y je4sGWfi29OQClr9sDXL4B9C5REVr6bcmr0wCv57JGpkUiajrG+HY2w1P5+ThnGZ+J sFUh96o2zUiDaRSYUeXWttniJ+aO63lIewS21icHQIpwiB8XSBsNhS2A+7AoixIRUA HqfL7X9GJrxvsxCauGy/Oxes= In-Reply-To: <86ldwdm7xg.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Dec 2024 15:34:19 +0200") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH Received-SPF: pass client-ip=185.216.177.71; envelope-from=bjorn.bidar@thaodan.de; helo=thaodan.de X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 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, INVALID_MSGID=0.568, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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:326786 Archived-At: Eli Zaretskii writes: >> From: Yuan Fu >> Date: Tue, 17 Dec 2024 14:11:51 -0800 >> Cc: Peter Oliver , >> Stefan Kangas , >> Emacs Devel , >> Eli Zaretskii >>=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 >>=20 >> 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. >>=20 >> Many major modes already adds entries to treesit-language-source-alist, = that could be a good option too. >>=20 >> 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 no= w? > > What's changed? > > Many language grammars don't make official releases and thus don't > have versions. Moreover, AFAIK there's no API to determine the > version of the grammar library we load. So how can we manage such > version-pinning in a way that (a) is up-to-date, and (b) doesn't > preclude people from using a grammar library due to false negatives? There isn't any version pinning from what I know. There is no stable definition of the grammar versions. Each grammar is used to generate a parser based on the tree-sitter version. I don't think pinning version does make sense especially in this instance.