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

Migrate to tree-sitter-language-pack: expand language support #8

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gohanlon
Copy link

WIP; Resolves #7.

This replaces the tree-sitter language pack from grantjenks/py-tree-sitter-languages with Goldziher/tree-sitter-language-pack, significantly expanding language support and addressing maintenance issues. Key changes include:

  1. Greatly increases the number of supported languages, including Swift and Svelte.
  2. Resolves dependency on an unmaintained package that was forcing grep-ast to use an old tree-sitter version (0.21).
  3. Unlocks the ability to use more recent tree-sitter versions.
  4. Updates requirements.txt to use tree-sitter-language-pack>=0.2.0.
  5. Increments the version number to 0.3.4-dev in setup.py.
  6. Adds extensive test cases for parsing various languages in test_parsers.py.

Notable changes:

  • Removed support for DOT, OCaml, ql (GitHub CodeQL), and tsq (Tree Sitter Query) due to their absence in the new pack.
  • Removed potentially incorrect mappings for .gomod, .sqlite, and .regex extensions.
  • Replaced the uncommon ".et" mapping for "embeddedtemplate" with mappings for ERB and EJS, which are common uses of embedded templates.
  • Re-enabled markdown as the new pack uses to a different markdown grammar that likely doesn't suffer from previous bugs.

…ress maintenance

Resolves Aider-AI#7.

This commit replaces the tree-sitter language pack from
grantjenks/py-tree-sitter-languages with
Goldziher/tree-sitter-language-pack, significantly expanding language
support and addressing maintenance issues. Key changes include:

1. Greatly increases the number of supported languages, including Swift
   and Svelte.
2. Resolves dependency on an unmaintained package that was forcing
   grep-ast to use an old tree-sitter version (0.21).
3. Unlocks the ability to use more recent tree-sitter versions.
4. Updates requirements.txt to use tree-sitter-language-pack>=0.2.0.
5. Increments the version number to 0.3.4-dev in setup.py.
6. Adds extensive test cases for parsing various languages in
   test_parsers.py.

Notable changes:
- Removed support for DOT, OCaml, ql (GitHub CodeQL), and tsq (Tree
  Sitter Query) due to their absence in the new pack.
- Removed potentially incorrect mappings for .gomod, .sqlite, and .regex
  extensions.
- Replaced the uncommon ".et" mapping for "embeddedtemplate" with
  mappings for ERB and EJS, which are common uses of embedded templates.
- Re-enabled markdown as the new pack uses to a different markdown
  grammar that likely doesn't suffer from previous bugs.
@CLAassistant
Copy link

CLAassistant commented Oct 16, 2024

CLA assistant check
All committers have signed the CLA.

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.

py-tree-sitter-languages is unmaintained
2 participants