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: Thu, 19 Dec 2024 10:17:20 +0200 Message-ID: <86msgskrxr.fsf@gnu.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: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21935"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bjorn.bidar@thaodan.de, p.d.oliver@mavit.org.uk, stefankangas@gmail.com, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 19 09:18:14 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 1tOBjZ-0005Z0-Sx for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Dec 2024 09:18:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBiq-0000rb-8F; Thu, 19 Dec 2024 03:17:28 -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 1tOBin-0000pX-MF for emacs-devel@gnu.org; Thu, 19 Dec 2024 03:17:26 -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 1tOBim-0000pd-2q; Thu, 19 Dec 2024 03:17:24 -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=zHgc+j5+PNbRfJh/w8XZasnc4Tzed030EwBy5X4qkzQ=; b=eB58kS1kdCIJfhix5WTM ReMi527G+d9w2aXnity6wBV1n3oOWqdzkJSywbArm0jmWPCZUhW8d2PhQQ+PZC6YTITYdZO7XGptl gVGBnjPY6jD4eURZr5dtnE8ardLREFdes5uudkCKTsWXjCS7p31bblQjtcQHmPyWEfitMu9T28WEO wkcPk4BywCIpVEhorpIi7h1uftOzEZwpulqwoCyMBJ73Cg3dx+O8TnKrnQt7ddGc/P44PaBzQb9j1 B+h7EPJQFIi01gDbeCRLmwCmxcoGw9PbgXAHMPJ6nP/MjbiL0uiLzo6Tj6wsJSjN6kEWFTW8yzMzT fp4y9AsNVlIlVQ==; In-Reply-To: (message from Yuan Fu on Wed, 18 Dec 2024 17:40:39 -0800) 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:326703 Archived-At: > From: Yuan Fu > Date: Wed, 18 Dec 2024 17:40:39 -0800 > Cc: Björn Bidar , > Peter Oliver , > Stefan Kangas , > emacs-devel@gnu.org > > > > > On Dec 18, 2024, at 5:34 AM, Eli Zaretskii wrote: > > > >> 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’s he’s stance now? > > > > What's changed? > > People are starting to package tree-sitter and tree-sitter grammars. If Emacs can be packaged with the right grammars, then tree-sitter modes will work out-of-the-box. > > > > > 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? > > I’m talking about a softer pin. We’re basically providing a “known to work” version. This way packagers can package Emacs with a known-to-work version of grammar, so the builtin modes work out-of-the-box. This doesn’t prevent people from using a newer version and sending us a bug report, and we still try our best to make the major modes work with the newest grammar. > > If the grammar doesn’t have an explicit version, then we can just use a commit hash. I believe all the packaging systems support that? If you are suggesting to have the known version in some comment, and we don't have to guarantee that it's always up-to-date (this should be stated in the comment), then I don't object. As long as users know they should take that with a grain of salt, I'm okay with it.