tree-sitter-langs icon indicating copy to clipboard operation
tree-sitter-langs copied to clipboard

BUG: some tree-sitter repos are quite old, like r

Open beyondpie opened this issue 2 years ago • 5 comments

Hi there,

When I use tree-sitter-r, I notice that the version is pointed to a very old one (2022), while the source of the tree-sitter-r has been updated recently. I think the potential bug is because the use of "master" instead of "main" branch https://github.com/emacs-tree-sitter/tree-sitter-langs/blob/944a734b7c3a5922a7e9a2009a9165e2dc195b18/.gitmodules#L229

In the meanwhile, if I compile the corresponding tree-sitter myself, where can I find the generated file? I plan to put it into my emacs tree-sitter directory, but cannot find it after using script/compile r

Thanks! Songpeng

beyondpie avatar Aug 04 '23 05:08 beyondpie

cc @meain

In the meanwhile, if I compile the corresponding tree-sitter myself, where can I find the generated file? I plan to put it into my emacs tree-sitter directory, but cannot find it after using script/compile r

It should be generated in your current working directory. 🤔

jcs090218 avatar Aug 04 '23 05:08 jcs090218

@jcs090218 Thanks for the reply! Following the README, after installing the depencies like Tree-sitter-cli, I can now have the binary files under bin/.

But even I change the branch from master to main for submodule r, I cannot have the latest tree-sitter-r.

beyondpie avatar Aug 04 '23 05:08 beyondpie

But even I change the branch from master to main for submodule r, I cannot have the latest tree-sitter-r.

Have you tired re-clone the submodule? Make sure the submodule is on the right branch. 🤔

jcs090218 avatar Aug 04 '23 06:08 jcs090218

FYI, elisp-tree-sitter requires an older version of tree-sitter to work well. (ref: https://github.com/emacs-tree-sitter/tree-sitter-langs/issues/186).

Also, you can use script/compile r once you have pulled the latest version of r to compile the grammar.

meain avatar Aug 04 '23 06:08 meain

@jcs090218 @meain Thanks for your replies! when i use the old version of tree-sitter, I can now have the latest tree-sitter-r.
I did this in a dirty way: go to repos/r, then git clone to force update the repos. Then compile r. After that I copy the generated binary file to my emacs directory. I am not familiar with git submodule, it seems that changing from master to main, did not work. But I will later give it a try.

Songpeng

beyondpie avatar Aug 04 '23 06:08 beyondpie

I've added the submodule update workflow. Now most grammars are up to date.

jcs090218 avatar May 12 '24 22:05 jcs090218