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 crashes Emacs Date: Fri, 26 Apr 2024 17:53:56 +0300 Message-ID: <8634r8yy2j.fsf@gnu.org> References: <86wmokcp3c.fsf@p200300d6272f170fb9ce529a1eae86f3.dip0.t-ipconnect.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39452"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 26 16:54:15 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 1s0Mxr-000A5I-1X for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Apr 2024 16:54:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0Mxh-0001RS-U0; Fri, 26 Apr 2024 10:54:05 -0400 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 1s0Mxe-0001NU-Ir for emacs-devel@gnu.org; Fri, 26 Apr 2024 10:54:04 -0400 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 1s0Mxe-0000nJ-8j; Fri, 26 Apr 2024 10:54:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Tzdy+Wltpmlm4UwlDtnyf7R3GnC8BPAOSvsPaP5GraI=; b=ALDv0/3nOSAX M/c531MIwDBsEs2sVXea59vK78HMA62F5t8KXI48lXSrKDWiPN5Mg2aHDI2lWJr9wqFkZz8L2ogFx SFNmLd3PwQS2W9p8kRwhIMA43AxsHD9PZp6nSb2mA/OqguZnA/Xm3azEwyDj59WJjkfM4sp5GDnQk xFcyMXHPR7AacS4PtM16TJiZEK229OTXWhIKm5v1jYsi659fPfgr8oM7YFx+TcbzcKMJA1EbfIKkW M+doT/yUsc0eWh++RDmSuwj4LAOklQUXtQF0EJmBP5S9xqLxn7BetGBp6HAd02qYzsuha8/HrwVhc h/7It/gwKy4f23+U4Zn2dg==; In-Reply-To: <86wmokcp3c.fsf@p200300d6272f170fb9ce529a1eae86f3.dip0.t-ipconnect.de> (message from Joost Kremers on Thu, 25 Apr 2024 08:58:45 +0200) 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:318138 Archived-At: > From: Joost Kremers > Date: Thu, 25 Apr 2024 08:58:45 +0200 > > A week ago or so, I opened a Python file in Emacs and saw Emacs crash hard. > Bisecting my init file, I found that the culprit was tree-sitter. As it turns > out, some change was made in tree-sitter that caused the ABI to change, and when > I upgraded my distro's tree-sitter package, the new ABI caused Emacs to crash. > > There is a thread about this issue on the tree-sitter GitHub page: > > https://github.com/tree-sitter/tree-sitter/issues/3296 > > The consensus there seems to be, however, that the current problem should not be > solved by the tree-sitter project, but rather by the relevant Linux > distributions and/or by Emacs itself. > > A bug has been opened for Arch Linux (the distro I'm using): > > https://gitlab.archlinux.org/archlinux/packaging/packages/emacs/-/issues/2 > > That issue, however, is labelled with "status:waiting-upstream", which suggests > that nothing's going to happen until the tree-sitter project does something. > Which is not going to happen, I fear, because the tree-sitter issue has been > closed. > > Since I haven't seen the issue mentioned here and given that it was suggested it > might be an Emacs issue, I wanted to ask the opinion of the maintainers: can > this be considered an Emacs bug, or is it really something that should be solved > upstream? We cannot do anything about this; see bug#70438. The tree-sitter developers changed the ABI without bumping up the ABI version. Moreover, they think that's perfectly okay, since tree-sitter is "still in version 0.x". Because they didn't bump the ABI version, Linux distros didn't bother to update Emacs they distribute, and the result is crashes. The only thing you can do is rebuild Emacs with the updated tree-sitter (which is AFAIU the distros will do now , and will then provide fixed packages), or downgrade your tree-sitter library to version before the ABI change, 0.22.2.