New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Subdirectory for grammar rust was not found #495
Comments
The missing directory is a sub module, were the submodules initialized? Alternatively if you don't want the submodules and would rather install the different grammars as shared libraries you can compile without the static-grammar-libraries feature (also worth noting that this is the approach Nix went with) |
No, they were not. I was trying to create a native pkgsrc package for NetBSD and not attempting just a local install.
I'll consider this as an alternative, thanks. I thought about compiling it with no default features before posting the issue but, then it wouldn't be a default build. I need to check if we have a policy regarding the use of Thanks! |
I think there is a strong argument from a package managers perspective to handle the dependencies on its own, I have the submodules mostly as a convenience for myself |
@afnanenayet Yeah, I know.
...and, as I can see we already have Edit: Package now merged into our repositories, https://mail-index.netbsd.org/pkgsrc-changes/2022/11/30/msg264430.html |
To be clear this requires different packages for the tree sitter grammars, not the library itself. Packages such as this: https://github.com/tree-sitter/tree-sitter-python provide a dynamic shared library such as Also the feature to load grammars dynamically isn't enabled automatically, it will have to be enabled with the I'll add some docs on building/packaging |
@afnanenayet Thanks! Guess I have two options now. Either package those or, build One question, does Edit: just checked the Alpine and Arch packages. They pull only these, |
No. You can optionally provide paths or names of libraries when using the config to load extra library paths (mostly put there in case someone wanted to manually point to a library placed in a non-standard path). The standard behavior is that someone will run diffsitter on files with a certain language and diffsitter will try to load libtree-sitter-{lang}.so with
I did not realize that. It's enough if you only care about doing diffs on C++, Python and Rust files. The language-specific libraries are just implementations of tree sitter grammars, and diffsitter can operate on any tree-sitter grammar, so the program itself doesn't actually "need" all of the grammars. |
@afnanenayet Package fixed now, http://mail-index.netbsd.org/pkgsrc-changes/2022/12/03/msg264617.html I'll look into packaging the grammars in the next days. |
Awesome, thanks! |
Describe the bug
Building
diffsitter
yields the following error:To Reproduce
Steps to reproduce the behavior:
diffsitter
on NetBSDExpected behavior
Complete build.
Log output/screenshots
See above
Platform:
OS: NetBSD-9.99.107, Rust-1.65.0
Additional context
Build in offline-mode.
The text was updated successfully, but these errors were encountered: