Skip to content

Refactor buildSrc and enhance generated language bindings and tests#136

Open
DavidBakerEffendi wants to merge 5 commits intobonede:mainfrom
DavidBakerEffendi:dave/fix-gentask
Open

Refactor buildSrc and enhance generated language bindings and tests#136
DavidBakerEffendi wants to merge 5 commits intobonede:mainfrom
DavidBakerEffendi:dave/fix-gentask

Conversation

@DavidBakerEffendi
Copy link
Contributor

This PR refactors the build logic and code generation within buildSrc (GenTask) to improve maintainability and support new testing capabilities.

Key changes include:

  • Dependency Management: Switched buildSrc to use the central libs.versions.toml version catalog and added JUnit 5 for testing.
  • Generated Code Updates: Updated the generated Java language classes to extend TSLanguage and implement a new copy() method for safer pointer management.
  • Enhanced Testing: Modified the test generation template to automatically include CorpusTest execution, enabling comprehensive testing against language corpora.
  • Build Simplification: Significantly slimmed down the generated build.gradle files by delegating complex task definitions to parent configurations, leaving only the specific language download URL.
  • New Tests: Added GenTaskTest.groovy to verify the correctness of the code generation logic.

Resolves #135

@DavidBakerEffendi
Copy link
Contributor Author

Added documentation on how to add unofficial parsers (adds to #126). Tested this with Kotlin

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.

GenTask is Outdated

1 participant