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

feat: allow rebuilding parser artifacts #14

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

DerekStride
Copy link
Contributor

@DerekStride DerekStride commented Aug 8, 2024

What

The DerekStride/tree-sitter-sql project doesn't have the parser artifacts published to the main branch and needs the python workflow to allow optionally regenerating them.

This PR adds a new input that will run tree-sitter generate when set to true.

Questions

  • What's a good input parameter name? I started with rebuild-parser
  • How should the regeneration be done? I reused the steps from the regenerate.yml workflow but that required setting up Node.

- name: Set up NodeJS
uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{inputs.node-version}}
- name: Regenerate parser
run: |-
npm ci --legacy-peer-deps
npm x -- tree-sitter generate --no-bindings

Copy link
Member

@ObserverOfTime ObserverOfTime left a comment

Choose a reason for hiding this comment

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

  • This should be added to all packaging workflows.
  • It should indeed use the setup-action.
  • The name should be "generate".

@DerekStride
Copy link
Contributor Author

Made the suggested changes and tested the workflow on the tree-sitter-sql project:

@ObserverOfTime ObserverOfTime merged commit f02e04e into tree-sitter:main Aug 9, 2024
@DerekStride DerekStride deleted the rebuild-parser branch August 9, 2024 13:23
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.

2 participants