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: Sun, 29 Dec 2024 18:02:47 +0200 Message-ID: <44507.9144484893$1735488234@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> <6765355b.c80a0220.1a6b24.3117SMTPIN_ADDED_BROKEN@mx.google.com> <00554790-CACA-4233-8846-9E091CF1F7AA@gmail.com> <86msgl2red.fsf@gnu.org> <87o710sr7y.fsf@debian-hx90.lan> <8734i9tmze.fsf@posteo.net> <86plldwb7w.fsf@gnu.org> <86h66pw4sd.fsf@gnu.org> <947A7DB0-43F7-4288-8FBF-0984FCFFAA93@dancol.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="25609"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org, philipk@posteo.net, rms@gnu.org, manphiz@gmail.com To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 29 17:03:46 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 1tRvla-0006UA-7M for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Dec 2024 17:03:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRvkl-0000ei-Bb; Sun, 29 Dec 2024 11:02:55 -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 1tRvkj-0000eD-TE for emacs-devel@gnu.org; Sun, 29 Dec 2024 11:02: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 1tRvkh-0000B8-A6; Sun, 29 Dec 2024 11:02:53 -0500 Original-Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id 1A83DD00081; Sun, 29 Dec 2024 18:02:48 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1735488168; bh=v0X3iTV95amk0/cA9K3wMhibSF5Yb09LYp5dWyp1eas=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=WCkHmAD2ZsWAptrmo2qnOGFfUb14A1fSeutRjiW9n6QVEnf8AefFXS3CcPcH8OCnh fSRDXU4qC3heDS2SSonhBcEVsVdRc+atH+eCrWhb97gIOv8UyFTYhVFrtIzQB4sFaJ zOCSEqnvuoMteIHqaHc9D9JOt0wBr7f3v0spHGFN/x7dzO7QCrgsHWSZKX6hB8FRw+ oqDK4eOWxIZ7Y4n+/I2kZqLbK8Gz98gWBvxi4gVHXI7/2vAoiIae6FsExSUXZmJu68 BZJ1fNdwcP+XbUMtxSrm/zYmPlWhCrsKbS24n/wc9FNF96JT/m40K/wcilviQ29zrL o/t6zUT2XTsa6fZ7AnwAjQicVYr3f/0eM7WOzAwun/NfC56ZN1aH8B6PIzCvaj1EeQ WSqNdQC8aha0H4aKzq7QcO2y4iWHaIe+B7JksGHIj8yGb6O/gAny4eWa0g4WhnmCmd jTLBFrkWTvTlV8E7Kuu4TiuDhOzoCboG0miwM32cdMQdbCNhWw5sSt8XnQs7SXjooh cCfJohe1B8NhYk8pQiwRRd85gccCkr9L1uwNhv/QpZNaV2KiL6qOj6+iLTpUiDSXaj JBfdWRth24Gl4DMcetJcO7ul1BltYMNVB+NBaKr/vO/W2VvisJSMZuPkKkbyz58ySy IcLI1P4LCvS6ittLbwEYTTSY= In-Reply-To: <947A7DB0-43F7-4288-8FBF-0984FCFFAA93@dancol.org> (Daniel Colascione's message of "Sun, 29 Dec 2024 10:21:19 -0500") 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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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:327351 Archived-At: Daniel Colascione writes: > On December 29, 2024 10:05:26 AM EST, "Bj=C3=B6rn Bidar" > wrote: >>Daniel Colascione writes: >> >>> On December 27, 2024 9:59:14 AM EST, Eli Zaretskii wrote: >>>>> Date: Fri, 27 Dec 2024 08:46:06 -0500 >>>>> From: Daniel Colascione >>>>> CC: rms@gnu.org, manphiz@gmail.com >>>>>=20 >>>>> >> It might take a while for that to happen, which is why I still >>>>> >> believe >>>>> >> it would be better if tree-sitter major modes would populate >>>>> >> `treesit-language-source-alist' on their own, and point to the >>>>> >> specific >>>>> >> checkouts that the major mode developer tested their implementation >>>>> >> against. >>>>> > >>>>> >We could have done that, but there's no way we could keep the value = of >>>>> >treesit-language-source-alist up-to-date, because the grammar >>>>> >libraries put out new versions much more frequently than Emacs >>>>> >releases, especially if you consider libraries that have no official >>>>> >versions at all (in which case we can only point to some revision in >>>>> >their repository). >>>>> > >>>>> >The question that bothers me is how useful is it to have >>>>> >treesit-language-source-alist that is outdated? What do we expect t= he >>>>> >users to do with such an outdated value? >>>>> > >>>>>=20 >>>>> Why not just vendor all the grammars with the Emacs modes that >>>>> use them? >>>> >>>>We'd need to ask their developers to agree to this.=20 >>> >>> Why? They're free software. For copyright assignment? Seems like an >>> exception would make sense here. >>> >>>> Other than that, >>>>I don't see how is that different from pointing to a specific version >>>>of each grammar: both will be outdated a short time after we point to >>>>the version or release Emacs with that version. >>>> >>>>So why do you think this is better? >>> >>> Vendoring enables building a full featured Emacs without a network >>> connection and guarantees build reproducibility in perpetuity. >> >>Did you think of the long term consequences? >> >>The embedded dependencies would have to be maintained first by Emacs and >>later by packagers. >> >>All the infrastructure around syncing of grammars is time spend that >>could spend on more long term efforts such as stabilizing the >>tree-sitter based modes to not break as easy on grammar changes or to >>improve tree-sitter it self. > > I've vendored plenty of things. Works fine in practice. Big programs > like Firefox vendor the world too, and they work fine. It's really not > that much work. It eliminates entire classes of problem. It's going to > take more time to deal with the problems of taking a dependency and > the headaches of not having a stable interface than it would to set up > a few git subtrees or submodules and invoke their build system from > that of Emacs. Big programs like Firefox vendor the world only for packagers to have to revert those. Vendoring only works long enough until the dependencies you have vendored are not out of date. It is something which only works in projects who control most of their dependency chain and/or have a fire and forget approach of software development. > It's not even the precise mechanics: pulling down a grammar by hash is > tantamount to just checking in the grammar, but with more moving > parts. You still pair one to one the grammar and the Lisp code meant > to use it so you don't end up chasing down weird compatibility > issues. IMHO, since they're tightly coupled anyway, we might as well > distribute them together. > > As for changing TS grammars not to break: why do you think that would > be feasible? So far TS grammar authors haven't felt particularly > obligated to maintain compatibility. I don't know exactly to be honst but I don't think we are alone with this issue. If we are we should check out it is handled in other editors.