From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter maturity Date: Sat, 04 Jan 2025 16:18:21 -0500 Message-ID: <01377C8E-D041-4441-A247-6722F99CA0A4@dancol.org> References: <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> <87ttapryxr.fsf@posteo.net> <0883EB00-3BB2-4BC8-95D1-45F4497C0526@dancol.org> <87msge8bv8.fsf@dancol.org> <6775a459.170a0220.2f3d1e.1897SMTPIN_ADDED_BROKEN@mx.google.com> <87h66emqan.fsf@dancol.org> <86ldvqbe5w.fsf@gnu.org> <86bjwmbaoo.fsf@gnu.org> <8CE9A18D-79B7-4741-9A7D-6BF90557E456@dancol.org> <8634hyb8kz.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="16940"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android Cc: owinebar@gmail.com, bjorn.bidar@thaodan.de, philipk@posteo.net, emacs-devel@gnu.org, rms@gnu.org, manphiz@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 04 22:19:52 2025 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 1tUBYl-0004G4-OA for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jan 2025 22:19:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUBXx-00034c-8i; Sat, 04 Jan 2025 16:19:01 -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 1tUBXu-00034F-7J for emacs-devel@gnu.org; Sat, 04 Jan 2025 16:18:58 -0500 Original-Received: from dancol.org ([2600:3c01:e000:3d8::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUBXs-0004Pn-0S; Sat, 04 Jan 2025 16:18:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: References:In-Reply-To:Subject:CC:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=V/RXXNliQIXiphRv56TBcmalzCDNGin1WqdLv14NC9o=; b=gV39LRyZZM9Uv/tQG7292QNJcG Pa0zOqkTatWQIrUIr0GHO6kfSN9722fo6Vtz9abzQTAcO7z3dsyghlF/XzfLgA9ETgOid66ZAC9vw cOXc/YVpt8xQWJjDmSbgzhRxQ3Xn7RjhwbA9R/gBQdX+dOQ6TUCqB6Xsm89FiVGS4JZsqLiCmOgbR aEjkZVlleH6zRjFL7hCPqfmFj3pbV0cfnSvp2PclWPAv29ItGvk7Hy/M2hqVnZQHkaxrgo3uWFnVy b9tH5NuHIrxsKtKMgyq3Ev2Helf24YdY1C2M6cTBfo6Ntp39nmCM6TpXHqbvzDmq8AXUBxTTJJB7w qX6bx9EA==; Original-Received: from [2600:1006:b11c:64c8:0:11:e407:c001] (port=34712 helo=[IPv6:::1]) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tUBXm-0006uY-2Z; Sat, 04 Jan 2025 16:18:51 -0500 In-Reply-To: <8634hyb8kz.fsf@gnu.org> Received-SPF: pass client-ip=2600:3c01:e000:3d8::1; envelope-from=dancol@dancol.org; helo=dancol.org 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, SPF_HELO_PASS=-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:327686 Archived-At: On January 4, 2025 3:57:48 PM EST, Eli Zaretskii wrote: >> Date: Sat, 04 Jan 2025 15:46:49 -0500 >> From: Daniel Colascione >> CC: owinebar@gmail=2Ecom, bjorn=2Ebidar@thaodan=2Ede, philipk@posteo=2E= net, >> emacs-devel@gnu=2Eorg, rms@gnu=2Eorg, manphiz@gmail=2Ecom >>=20 >> >> And it creates the need to do code distribution in a bespoke way=2E = How is that a net win? >> > >> >It's _our_ win=2E The problem is shifted to the distros, where I thin= k >> >it belongs=2E >>=20 >> No, it isn't, because distros *can't* do a good job of this=2E > >Then they need to get their act together and improve=2E They cannot and will not do major software engineering to work around comp= atibility problems that should not exist=2E Do you expect a Fedora packager= to notice or care when the distro version of some grammar is subtly incomp= atible with foo-ts-mode=2Eel in Emacs? And patch the grammar or Emacs or bo= th? And for the Debian and Arch packagers and so to do that too? Probably w= ith subtly different bugs? We ought to have learned after the openssl secur= ity debacle not to let distros make nontrivial code changes=2E >> Besides: plenty of people (I'd guess a majority going by how the indust= ry is set up) were using Emacs outside the context of a distro=2E If we wer= en't allergic to telemetry, we'd know=2E > >People who do that (I'm one of them, btw) can build their grammars=2E I >do=2E Yeah it's totally normal to download a macOS or Windows package and then h= ave to set up a development tool chain to make the program they just instal= led actually work=2E Nothing user hostile about that=2E It's really hard to see how this "rely on the distro" model is supposed to= work in the real world=2E Besides, some of the antique platforms you insis= t we support, like MS-DOS and Windows 98, have nothing resembling a package= manager, packages, or any way to automatically get some compatible version= of a grammar=2E Not including the batteries means the toy doesn't work=2E > >> >> Nobody has been able to describe these legal aspects=2E Grammars are= free software=2E GPL compatible, too=2E >> >> That means we can put them in Emacs=2E That's what software freedom = means=2E >> > >> >I did explain that, and don't want to repeat=2E You can consider thos= e >> >reasons unimportant, but I don't (and cannot, really: I don't call the >> >shots in this particular game)=2E >>=20 >> No, you didn't explain=2E You asserted=2E >>=20 >> You said that we would need to get written permission from grammar proj= ects to include their code in Emacs=2E When I asked where this requirement = comes from, you said it had always been this way and that RMS might have mo= re information=2E He appears not to=2E > >RMS explicitly asked me to do that for every package we admit into >Emacs=2E Is RMS a judge? The assertion is that there is a *legal requirement* to ge= t permission to include something in Emacs=2E I don't think any such requir= ement exists=2E RMS may impose that requirement, but he's not the law, and = unlike the law, his policy can change=2E >> >You are missing the point=2E My point is that several branches means = we >> >need to match a different version of the library to each branch >>=20 >> If you check the grammar into the tree, the version in each branch matc= hes that branch automatically=2E That's what a version control system is=2E= It's the essence of what it does=2E Same goes for submodules, which are ju= st checked-in pointers=2E > >Again, you are missing the point: we need to find an appropriate >version for each branch, and we need to track the versions of the >grammar so ass to be able to know, for each of our branches, the >compatible version of the grammar=2E The maintenance burden is >multiplied by the branches=2E The way it should work is that you have a checked in foo-ts-mode=2Eel and = right alongside it a foo=2Ejs file that describes the tree sitter grammar t= hat foo-ts-mode uses=2E When you cut a branch, you snapshot both files=2E N= o extra overhead=2E Want to update foo=2Ejs? Just sync it from upstream and check it in, just = like you'd check in any modified foo-ts-mode=2Eel=2E You only have to do th= at when you want to update the grammar, and that happens whenever the mode = author feels like doing it --- *exactly* the way it works today when you ha= ve a standalone foo-mode=2Eel=2E >> Can you give me a concrete example of how checking in code burdens bran= ch maintenance? Your position isn't making any sense to me in context of ho= w version control systems work=2E > >Finding the matching version and testing whether it matches does=2E You don't do that when you cut a branch=2E You do that when you update the= mode or its grammar, and no matter how you associate modes with their gram= mars, you have to test the combination=2E >> >> >The difference is that the RI changes=2E And that's not something = to >> >> >ignore, from where I stand=2E >> >>=20 >> >> Huh? In what possible way could a bespoke downloader be a better eng= ineering choice than submodules? >> > >> >I didn't say anything about engineering, I was talking about the >> >responsibility=2E >>=20 >> Good engineering minimizes the number of moving parts and needless fail= ure points in a system=2E > >Responsibility has nothing to do with engineering or moving parts=2E I have no idea what you're talking about=2E There's responsibility to make= a worse engineering choice and make a custom downloader? What's the nature= of this responsibility?