Open leotrs opened 1 year ago
May be it has to do with:
Note: versions 0.20+ cannot be used, as they introduce a breaking change in binary storage location
References
Thanks for the references.
As far as I can tell, one major change was moving some files from ~/.tree-sitter/
to ~/.config/tree-sitter/
. Is this the main reason 0.20 is not yet supported?
I haven't wrapped my head around the details.
I suspect that @ubolonton and/or @ethan-leba (participants of https://github.com/emacs-tree-sitter/tree-sitter-langs/issues/80) might know though.
As far as I understand it, the issue is exactly what is says on the tin. In the commit https://github.com/tree-sitter/tree-sitter/commit/eaf9b170f1abd79f0a1b39cffbaa580910918205 (v0.20.7), they make a breaking change to the ABI, bumping it to v14. However emacs-tree-sitter
depends on tree-sitter v0.20.0
, which only supports up to v13. Note that you can use the --abi
flag to lower the ABI version to 13 without downgrading TS.
Note that you can use the --abi flag to lower the ABI version to 13 without downgrading TS.
Ooooh that's a good one!
TIL!
As far as I understand it, the issue is exactly what is says on the tin. In the commit tree-sitter/tree-sitter@eaf9b17 (v0.20.7), they make a breaking change to the ABI, bumping it to v14. However
emacs-tree-sitter
depends on tree-sitterv0.20.0
, which only supports up to v13. Note that you can use the--abi
flag to lower the ABI version to 13 without downgrading TS.
So is it just a matter of figuring out why emacs-tree-sitter depends on v0.20.0
? I gather that the location of shared libraries is one such reason. Are there other known problems?
I think the overarching issue here is that development has frozen on this project. Especially now that tree sitter is integrated into Emacs 29, there doesn't seem much of a reason to put any further work into this package.
Ah. Well that makes sense. Thanks for all the hard work!
Is there a variable where one can add the flag?
Is there a variable where one can add the flag?
$ tree-sitter --version
tree-sitter 0.20.8
$ git clone https://github.com/casouri/tree-sitter-module
$ cd tree-sitter-module
# modify build.sh, add below lines after 'git clone "https://github.com/${org}/${repo}.git"', and comment out `rm -rf "${lang}"`
cd elisp
tree-sitter generate --abi 13 src/grammar.json
cd ..
# then run
$ ./build.sh elisp
You should modify tree-sitter-langs--init-major-mode-alist
in tree-sitter-langs.el
by add (emacs-lisp-mode . elisp)
to support emacs lisp mode.
Copy dist/libtree-sitter-elisp.so
to tree-sitter-langs/bin/elisp.so
I have a tree-sitter parser that I'm trying to add to emacs-tree-sitter. However, when running
(tree-sitter-require 'rsm)
, I get the following error ("rsm" is the name of my language):The only other mention of this error
tsc-lang-abi-too-new
is here. Following that comment, I downgradedtree-sitter-cli
from 0.20 to 0.19.5, and that fixed the issue.Is there any reason why emacs won't load parsers generated with cli-v0.20? Can we expect this to be solved in the next release? Thanks.