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: Tree-sitter maturity Date: Sun, 05 Jan 2025 08:13:05 +0200 Message-ID: <86y0zpaivi.fsf@gnu.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> <01377C8E-D041-4441-A247-6722F99CA0A4@dancol.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8654"; mail-complaints-to="usenet@ciao.gmane.io" Cc: owinebar@gmail.com, bjorn.bidar@thaodan.de, philipk@posteo.net, emacs-devel@gnu.org, 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 Jan 05 07:15:00 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 1tUJud-000276-U7 for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jan 2025 07:15:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUJtf-0000MQ-4z; Sun, 05 Jan 2025 01:13:59 -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 1tUJtd-0000Ly-Fb for emacs-devel@gnu.org; Sun, 05 Jan 2025 01:13:57 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUJtZ-0004kL-Cv; Sun, 05 Jan 2025 01:13:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:Subject:In-Reply-To:To:From: Date; bh=1Rhjweowec5VIq69sn8qbnv4t6HmZe1RXOm5zX3x1sY=; b=cwDhmIv+hQNgHWPBq0/6 VbWEsI2dTNIhwBD//pPeAA/hZc9dXTxpjjguWK2fIvWDfsULDBAl6jaTYNaALzHM5T58NxcvWhPHg Sz9BkoUj4QaRA6zK/zjy27Ex3AMMbk0W7roIsZhojx0z8LF0lD+lE7v08D5H5tc8qIfgES1Hw/kFq Jszz5z0ldvYign7573+xXURQr34IG6HLZpoXqFA6TypmFgnBnG0uSqpAu+7S3iglEI53oniC6xPQx vfwJyKaWlQ49Ei8sgBqRF9MuQwsTsDiMBmpQ5GrSn337JKi75X0XKpW1wODiOsfzQIX7ewkU6GeKc 833SlO+bmkcHUA==; In-Reply-To: <01377C8E-D041-4441-A247-6722F99CA0A4@dancol.org> (message from Daniel Colascione on Sat, 04 Jan 2025 16:18:21 -0500) 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:327704 Archived-At: > Date: Sat, 04 Jan 2025 16:18:21 -0500 > From: Daniel Colascione > CC: owinebar@gmail.com, bjorn.bidar@thaodan.de, philipk@posteo.net, > emacs-devel@gnu.org, rms@gnu.org, manphiz@gmail.com > > >> >It's _our_ win. The problem is shifted to the distros, where I think > >> >it belongs. > >> > >> No, it isn't, because distros *can't* do a good job of this. > > > >Then they need to get their act together and improve. > > They cannot and will not do major software engineering to work around compatibility problems that should not exist. Do you expect a Fedora packager to notice or care when the distro version of some grammar is subtly incompatible with foo-ts-mode.el in Emacs? And patch the grammar or Emacs or both? And for the Debian and Arch packagers and so to do that too? Probably with subtly different bugs? We ought to have learned after the openssl security debacle not to let distros make nontrivial code changes. Yes, I expect them to do that. AFAIK, they actually do this for optional libraries they package and provide. > >> Besides: plenty of people (I'd guess a majority going by how the industry is set up) were using Emacs outside the context of a distro. If we weren't allergic to telemetry, we'd know. > > > >People who do that (I'm one of them, btw) can build their grammars. I > >do. > > Yeah it's totally normal to download a macOS or Windows package and then have to set up a development tool chain to make the program they just installed actually work. Nothing user hostile about that. People who don't use distros build their own Emacs, yes? So they should already have this set up. Compiling a grammar library requires a C compiler and Binutils, plus Make, that's all. > It's really hard to see how this "rely on the distro" model is supposed to work in the real world. Besides, some of the antique platforms you insist 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. Not including the batteries means the toy doesn't work. I publish my 32-bit Windows builds of more than 70 grammar libraries on the ezwinports site, so the users of those antique Windows 9X platforms can download and install them. > >> You said that we would need to get written permission from grammar projects to include their code in Emacs. When I asked where this requirement comes from, you said it had always been this way and that RMS might have more information. He appears not to. > > > >RMS explicitly asked me to do that for every package we admit into > >Emacs. > > Is RMS a judge? The assertion is that there is a *legal requirement* to get permission to include something in Emacs. I don't think any such requirement exists. RMS may impose that requirement, but he's not the law, and unlike the law, his policy can change. I don't own this project, so when RMS asks me to do something, I do that. > >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. The maintenance burden is > >multiplied by the branches. > > The way it should work is that you have a checked in foo-ts-mode.el and right alongside it a foo.js file that describes the tree sitter grammar that foo-ts-mode uses. When you cut a branch, you snapshot both files. No extra overhead. > > Want to update foo.js? Just sync it from upstream and check it in, just like you'd check in any modified foo-ts-mode.el. You only have to do that 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 have a standalone foo-mode.el. This all is work someone has to do, and do that separately for each of our two branches. > >Responsibility has nothing to do with engineering or moving parts. > > I have no idea what you're talking about. There's responsibility to make a worse engineering choice and make a custom downloader? What's the nature of this responsibility? I think this is a clear sign that this discussion should be ended. I stand by my opinions: it is not our job to distribute grammar libraries, and bringing them into Emacs is too much trouble for us.