afnanenayet / diffsitter

A tree-sitter based AST difftool to get meaningful semantic diffs
MIT License
1.59k stars 29 forks source link

diffsitter should check the tree-sitter language version and report a better error upon mismatch #782

Closed afnanenayet closed 8 months ago

afnanenayet commented 8 months ago

The tree-sitter grammars define ABI versions so that you can make sure a dynamically loaded grammar works with whatever version of the tree-sitter library you're using. It seems like right now if we have a mismatch the program will segfault which is a horrible UX.

We should try to check the version and post a more informative error to the user telling them that the grammar tree-sitter is trying to load is not compatible with the version of the library that 's bundled in diffsitter.

This is handles #763