Open UniverseFly opened 8 months ago
Do I understand correctly that every single language grammar implementation would then have to add a pypi package for convenient use? Could/will this library be updated to help with the new version?
from py-tree-sitter documentation:
It seems they are migrating to this implementation to reduce the hassle of using widely available grammar, which is nice. Another benefit is that it seems to be easier to update the grammar you are using. Just poetry update
what you need, and you are done; no effort is required from py-tree-sitter
maintainers. This is extra nice for them.
On the other hand, the py-tree-sitter
deprecation warning looks to me like they will soon drop support altogether for Language.build_library
(which is currently core to py-tree-sitter-languages
):
If there is no alternative to load a grammar that was built from source, it will be up to the grammar devs to provide installable packages already pre-compiled for several platforms. Small grammars might stop working because maybe it would be harder for some maintainers to do this. If one is planning to create a custom grammar for one's own use case, it will take this into consideration. Hum.... It seems off to me... It looks like I'm missing something.
From what I got, py-tree-sitter-languages
proposed a tiny wrapper on py-tree-sitter
that should make it easier to load the parser you want, and things are even easier because it already bundles a bunch of grammars to you, so you don't need to do it by yourself one-by-one. So the py-tree-sitter-languages
value is about making it easier to load the parser you need (I still greatly appreciate that).
Did I understand everything correctly? Have you guys talked to people upstream to check if they are really dropping support for Language.build_library
? Or if they still plan to support people using custom grammars?
In a scenario that py-tree-sitter
gets easier to work with widely available and well-maintained grammars but gets harder to work with niche grammars, py-tree-sitter-languages
would be the perfect fit to work with niche grammars (considering it will still be possible). I am glad to read any other thoughts about this.
Since @grantjenks has stated in #54 that he can't maintain this project anymore, here's how you can use the languages currently provided by it in tree-sitter v0.21+:
No package on pypi but can be installed from git (though the version is incorrect).
pip install git+https://github.com/WhatsApp/tree-sitter-erlang
Unmaintained.
tree-sitter-grammars/tree-sitter-lua can be installed from git (until a package is published).
pip install git+https://github.com/tree-sitter-grammars/tree-sitter-lua
Unmaintained?
Submit an issue or pull request there.
Unmaintained?
Submit a pull request there.
Unmaintained.
Wait for tree-sitter-grammars/tree-sitter-make to be updated.
No package on pypi (yet) but can be installed from git.
pip install git+https://github.com/camdencheek/tree-sitter-dockerfile
Submit an issue or pull request there.
Archived.
Fork it or find an alternative.
No package on pypi but can be installed from git (though the version is incorrect).
pip install git+https://github.com/elixir-lang/tree-sitter-elixir
Submit an issue or pull request there.
Submit an issue or pull request there.
No package on pypi but can be installed from git (though the version is incorrect).
pip install git+https://github.com/ganezdragon/tree-sitter-perl
Unmaintained.
tree-sitter-grammars/tree-sitter-markdown has a package on pypi.
pip install tree-sitter-markdown
Unmaintained.
tree-sitter-grammars/tree-sitter-yaml has a package on pypi.
pip install tree-sitter-yaml
Unmaintained.
Wait for tree-sitter-grammars/tree-sitter-objc to be updated.
Uses a C++ scanner which is deprecated.
Submit an issue or pull request to derekstride/tree-sitter-sql.
Transferred to tree-sitter-grammars.
Submit an issue or pull request there.
No package on pypi but the rewrite can be installed from git.
pip install git+https://github.com/r-lib/tree-sitter-r@next
Unmaintained?
Submit an issue or pull request there.
Submit an issue or pull request there.
Submit an issue or pull request there.
Submit an issue or pull request there.
Transferred to tree-sitter-grammars.
pip install tree-sitter-commonlisp
pip install tree-sitter-bash
pip install tree-sitter-c
pip install tree-sitter-c-sharp
pip install tree-sitter-cpp
pip install tree-sitter-css
pip install tree-sitter-embedded-template
pip install tree-sitter-go
pip install tree-sitter-haskell
pip install tree-sitter-html
pip install tree-sitter-java
pip install tree-sitter-javascript
pip install tree-sitter-jsdoc
pip install tree-sitter-json
No package on pypi (yet) but can be installed from git (though the version is incorrect).
pip install git+https://github.com/tree-sitter/tree-sitter-julia
No package on pypi (yet) but can be installed from git.
pip install git+https://github.com/tree-sitter/tree-sitter-ocaml
pip install tree-sitter-php
pip install tree-sitter-python
No package on pypi (yet) but can be installed from git (though the version is incorrect).
pip install git+https://github.com/tree-sitter/tree-sitter-ql
pip install tree-sitter-regex
pip install tree-sitter-ruby
pip install tree-sitter-rust
Archived.
tree-sitter-grammars/tree-sitter-toml has a package on pypi.
pip install tree-sitter-toml
Archived.
tree-sitter-grammars/tree-sitter-query has a package on pypi.
pip install tree-sitter-query
pip install tree-sitter-typescript
Hi, thanks for the great project. When I load the parser, a deprecation warning would show up:
Should I worry about this?