cedricrupb / code_ast

Fast and robust AST parsing of any language
MIT License
26 stars 6 forks source link

Specify tree sitter dependency version to continue use of deprecated method #3

Open wyatt-avilla opened 1 month ago

wyatt-avilla commented 1 month ago

Language.build_library() was removed in py-tree-sitter v22. Due to no versions being specified in setup.py, the latest version of each dependency is installed by default. I've changed setup.py to match the versions specified in requirements.txt. Also, I bumped the tree sitter dependency to the most recent usable version.

See this discussion for information related to the method deprecation.

Here's some context for where the method is used in the source:

https://github.com/cedricrupb/code_ast/blob/982940d04b1d721e5ac9a97d433f36d1fb47e8e0/code_ast/parsers.py#L188-L196

cedricrupb commented 1 month ago

Hey!

Thanks a lot! I will merge it as soon as I get time for it.

In the meantime, if you want to use v22, there is already a version in the dev that supports it. However, there seem to be some major changes in the (Python) grammars which might break stuff.