Subject: bug#70438: Emacs error 6 abort when starting rust-ts-mode

From: Yuan Fu <[email-masked]>
Date: Sat, 20 Apr 2024 15:20:41 -0700

> On Apr 20, 2024, at 2:36 AM, Eli Zaretskii <[email-masked]> wrote:
> 
>> From: Yuan Fu <[email-masked]>
>> Date: Sat, 20 Apr 2024 01:28:48 -0700
>> Cc: Stefan Heitmann <[email-masked]>,
>> [email-masked]
>> 
>>> Yuan, can you please look into this?  It seems the latest versions of
>>> tree-sitter made some incompatible ABI change (without changing the
>>> shared-library version, I guess? not nice!), so can we have some
>>> workaround for this?
>> 
>> I think tree-sitter people are working to fix this [1]. I don’t think we can do much here, AFAICT tree-site changed ABI without bumping ABI version, and Arch and Gentoo are serving old Emacs build this new tree-sitter so, which is incompatible and crashed Emacs. We can’t really do anything to the Emacs build on people’s machines (though, who knows, maybe you CAN cask spells and flip bits).
>> 
>> [1] https://github.com/tree-sitter/tree-sitter/issues/3296
> 
> It isn't clear to me what would be their solution.  Couldn't we at
> least reject these new versions at configure time, until they fix the
> issue?

From what I understand, rebuilding Emacs with the new header file should fix the issue? Even if we push some change, users need to rebuild Emacs anyway.

> 
> And when they do bump the ABI version, what would be our solution to
> support both previous and new ABIs?

When then do bump ABI version, the old and new libtree-sitter.so will live alongside each other, Emacs built with the old libtree-sitter.so will use the old version, and Emacs built with the new libtree-sitter.so will use the new version.

Yuan