From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Peter Oliver
Newsgroups: gmane.emacs.devel
Subject: Re: Validating tree-sitter major modes and grammar
Date: Tue, 24 Dec 2024 12:36:20 +0000 (GMT)
Message-ID:
References: <2F1CA2E3-4C86-4892-AF6B-0C9CFCE26629@gmail.com>
<6768b29d.050a0220.1b40f2.5574SMTPIN_ADDED_BROKEN@mx.google.com>
<8DF80F0D-E50A-4162-93E6-F7F55B2E7144@gmail.com>
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="-1463811584-717424260-1735043780=:4328"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="1238"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: =?ISO-8859-15?Q?Bj=F6rn_Bidar?= ,
Emacs Devel
To: Yuan Fu
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 24 13:37:36 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 1tQ4AJ-00009X-5k
for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Dec 2024 13:37:35 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1tQ49L-0007Od-EQ; Tue, 24 Dec 2024 07:36:35 -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 1tQ49F-0007O3-Me
for emacs-devel@gnu.org; Tue, 24 Dec 2024 07:36:30 -0500
Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1tQ49C-0007mx-QH
for emacs-devel@gnu.org; Tue, 24 Dec 2024 07:36:29 -0500
Original-Received: by mail-wr1-x436.google.com with SMTP id
ffacd0b85a97d-385ef8b64b3so3943347f8f.0
for ; Tue, 24 Dec 2024 04:36:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mavit.org.uk; s=google; t=1735043782; x=1735648582; darn=gnu.org;
h=mime-version:references:message-id:in-reply-to:subject:cc:to:from
:date:from:to:cc:subject:date:message-id:reply-to;
bh=wqQdzIBqXUaeDqanqUhWeTnnXGeA8/Wmk2hKv4FE3MY=;
b=a0xZpfSs52rLx9VHEDTUh19YEgpPjYxNUl/pL3pgf2VThDgxLMAHbamzVPAuDfykLe
uknWSYA6knoJUZF1kQ5lX6pxe/odFq+VKqiqYLFgY5ZUQof4YCJ+22X8SmYz3YgSokUg
pfUjLF4wb6Rx3z1m4fVNoahcAacA6GvTB2NT0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1735043782; x=1735648582;
h=mime-version:references:message-id:in-reply-to:subject:cc:to:from
:date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=wqQdzIBqXUaeDqanqUhWeTnnXGeA8/Wmk2hKv4FE3MY=;
b=SxDLJjS3Z2SKwLS6IQAi5TeoXTq8AqCqapeTq4UceJKBRQdPDo2jJMSlL5bNuCoXoJ
PrQ1YUD/USsnALaeMeBQunMr5oYtYuUag0jg2h964VT+Hfiwxx+mdfhwgN+W3oXQVDHT
svczhHXOGlaHXoIDxilfnmiSmRmiSdI0MBKQ9EqbRSQNAbOg8sJpi41o3IuIUCFHQCVi
W/TyAK3WJVeuN0b1QpHJb4uAQ2Y2ATF5utLPYJ8JxMK9NAsSEFTHamDOk4g0GxXFEzJo
kZwbMlTASk3jGK6Qst2nmLwek++m//v2avRvkkv5xQrm01MQpcZT3Eil+IZHaYNG148G
WetQ==
X-Forwarded-Encrypted: i=1;
AJvYcCVeHoluDgPAiPoK9FlvgYDtlGKtmx7cgwHod72pQ16fPjcYC0se1V4463P4oJ/qR3VuqXg4OBpPwAB3oA==@gnu.org
X-Gm-Message-State: AOJu0YwCqtDImLoRtQdqkXs1ok8onwG+7pvSlZoouHYtbqzfYDjcK0NH
w/E9gREn4TzRsj71JlCvIja3BbFS4DHUBL7Mw8rQJxIo8nz5y31FYYfW/39IYg==
X-Gm-Gg: ASbGncsLlBaXA61evqcGQV3T6ZQo7eQ0YMKUARDlpRfo2S/kVgv1dcNluIPljCMSic4
pX0ONPYMkaCZHwuotkPMsgfgHaj0e/PfA4LziDFQxACqNaHs4dzcP3VQpFnUrpzyHnLKyLqBY2o
NflMHeaLe76aEkzz/RCQtgqh5IncGGHuEbj4F5uK1UEr8srgRMdSmzOdqz77mesFNR5Pr4t6mio
LL6weZtVlN3+FYfUW8dncWkfa9qW44W19AMSI84/cU/yoZRc4rd0S2chg2DVIAg/0ivGSrabwX0
1PvUgIWlRIzqgm9qZM3j4FYHrfjgjqvs6IiDQkXug+P7EGy9ND8YS21q1HqNdzhlrVsO
X-Google-Smtp-Source: AGHT+IEK+vMAM4ObT0PG03qbl998/1UVzz2k29pFJHQtcue6T71I6No3Lc438o6zv4Lb8pVYqRTGCw==
X-Received: by 2002:a5d:64cf:0:b0:385:e374:be1 with SMTP id
ffacd0b85a97d-38a221f63abmr14436640f8f.13.1735043782383;
Tue, 24 Dec 2024 04:36:22 -0800 (PST)
Original-Received: from froglet.home.mavit.org.uk
(dudl-14-b2-v4wan-165806-cust1021.vm31.cable.virginm.net. [82.32.147.254])
by smtp.gmail.com with ESMTPSA id
ffacd0b85a97d-38a1c89e1c0sm14298130f8f.77.2024.12.24.04.36.21
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 24 Dec 2024 04:36:21 -0800 (PST)
Original-Received: from froglet.home.mavit.org.uk (localhost [127.0.0.1])
by froglet.home.mavit.org.uk (8.18.1/8.17.1) with ESMTPS id 4BOCaK9E008346
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Tue, 24 Dec 2024 12:36:20 GMT
Original-Received: from localhost (mavit@localhost)
by froglet.home.mavit.org.uk (8.18.1/8.18.1/Submit) with ESMTP id
4BOCaKWe008343; Tue, 24 Dec 2024 12:36:20 GMT
X-Authentication-Warning: froglet.home.mavit.org.uk: mavit owned process doing
-bs
In-Reply-To: <8DF80F0D-E50A-4162-93E6-F7F55B2E7144@gmail.com>
Received-SPF: pass client-ip=2a00:1450:4864:20::436;
envelope-from=p.d.oliver@mavit.org.uk; helo=mail-wr1-x436.google.com
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,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:326998
Archived-At:
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
---1463811584-717424260-1735043780=:4328
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT
On Mon, 23 Dec 2024, Yuan Fu wrote:
>> On Dec 22, 2024, at 4:44 PM, Björn Bidar wrote:
>>
>> Yuan Fu writes:
>>
>>> Continuing from the tree-sitter maternity thread, I cooked up some
>>> script to go over each builtin tree-sitter mode, clone the grammars it
>>> uses, and check whether the font-lock queries are compatible with the
>>> latest version of the grammar. If everything works fine, the script
>>> adds some comment in the source file listing the version that was
>>> checked.
>>
>> Oh that sounds very good. This could be a good workaround for the sort
>> of fast and lose nature of tree-sitter.
>
> Great. Do you think the “verified version” comment will be helpful for packagers?
It helps answer the question, “I am building a new Emacs release. Do I need to update these Tree-sitter parsers?”.
However, as a parser packager, I also need to answer the question, “This parser has released a new version. Can I package it now, or do I need to wait for Emacs 30? Emacs 31?”. A static comment in the source code of a released version of Emacs will likely be too out-of-date to answer that.
Other ideas:
- Run these checks regularly (from https://emba.gnu.org/, perhaps?) for the most-recent Emacs release, outputting a report or webpage that can be referred to by packagers.
- Include a function in Emacs that packagers can call themselves to check the compatibility of installed parsers. They could run this check every time they build an updated parser (either manually, as a part of the package build, or as a part of their distribution’s automated CI testing).
--
Peter Oliver
---1463811584-717424260-1735043780=:4328--