Skip to content
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

Update tree-sitter #73

Merged
merged 10 commits into from
Feb 17, 2025
Merged

Update tree-sitter #73

merged 10 commits into from
Feb 17, 2025

Conversation

enyst
Copy link
Contributor

@enyst enyst commented Feb 15, 2025

Description

TestGenEval benchmark seems to need an upgraded tree-sitter. This PR updates tree-sitter to version 0.24.0.

Changes

  • Updated tree-sitter from 0.21.3 to 0.24.0
  • Added dynamic language imports to support any tree-sitter language package
  • Added Python, JavaScript, and TypeScript as default languages
  • Created a compatibility layer to handle the new tree-sitter API

Testing

  • All tests are passing
  • All pre-commit hooks pass

References

@neubig
Copy link
Contributor

neubig commented Feb 16, 2025

OK, I think with OpenHands's help I managed to make this work. It seems like the tree-sitter-languages has not been updated recently, and we should just build our own compatibility library.

@enyst
Copy link
Contributor Author

enyst commented Feb 16, 2025

Thank you!

Copy link
Collaborator

@ryanhoangt ryanhoangt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is interesting and LGTM! @enyst @neubig do you want to test this PR in the OH repo before we merge this?

@neubig
Copy link
Contributor

neubig commented Feb 17, 2025

Thanks @ryanhoangt , I tried it quickly in OpenHands by providing this prompt:

We are upgrading a dependency of the OpenHands library (openhands-aci) here: https://github.com/All-Hands-AI/openhands-aci/pull/73

Please modify pyproject.toml in the OpenHands folder to install openhands-aci from the branch associated with this PR, instead of from where it is normally installed (pypi). Then follow the Python unit testing procedure described in py-unit-tests.yml exactly.

and it worked after OpenHands upgraded the tree-sitter version in OpenHands as well, so I think we're good.

@neubig neubig merged commit 707d6da into All-Hands-AI:main Feb 17, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants