emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Improve "version mismatch" error message from `treesit-parser-create`


From: Soham Gumaste
Subject: Improve "version mismatch" error message from `treesit-parser-create`
Date: Sat, 17 May 2025 14:51:10 -0500
User-agent: Mozilla Thunderbird

Hello emacs devs,

I was recently messing around with treesitter and ran into a "version mismatch" error, which was rather confusing. I found a reddit post where Eli had replied to a similar error message which helped me understand and solve the problem (by fetching an older version of the grammar I wanted to load). (Side-note: Many thanks to Eli for the various reddit/etc replies, you have made my emacs experience better by that alone!)

I wanted to propose the following improvement to the error message:
- Current: A stack trace pops up with string "version mismatch <version of langage attemped>

 - Proposed: A message/warning/error log with message similar to:
    "Failed to load <libtree-sitter-NAME.so>: Language version is
    (attempted version) but only (treesit-library-abi-version) is
    supported"

I realize this is a rather small "Developer Experience" (DX) type request. I am looking into the source code to hopefully formulate a patch, but I am unfamiliar with the C side of things.

Please CC me on replies as I consume this list as a digest.

--
Thanks,
Soham
sohamg2@gmail.com
https://sohamg.xyz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]