Skip to content

Commit 8ffdc1a

Browse files
cpsievertclaude
andcommitted
fix: add tree-sitter-cli to CI workflows for Windows compatibility
Windows CI builds require tree-sitter-cli to generate parser files at build time. This adds the npm package installation to all workflows that build Rust code and removes the pre-generated parser files from version control. Changes: - Install tree-sitter-cli via npm in build, python, publish, and R workflows - Update build.rs to generate parser files during compilation - Remove pre-generated tree-sitter files from git (grammar.json, parser.c, etc.) - Add generated files to .gitignore Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9c974d5 commit 8ffdc1a

12 files changed

Lines changed: 138 additions & 45208 deletions

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ jobs:
2020
sudo docker image prune --all --force
2121
sudo docker builder prune -a
2222
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
28+
- name: Install tree-sitter-cli
29+
run: npm install -g tree-sitter-cli
30+
2331
- name: Install Rust
2432
uses: dtolnay/rust-toolchain@stable
2533

.github/workflows/build.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ jobs:
2121
sudo docker image prune --all --force
2222
sudo docker builder prune -a
2323
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
29+
- name: Install tree-sitter-cli
30+
run: npm install -g tree-sitter-cli
31+
2432
- name: Install Rust
2533
uses: dtolnay/rust-toolchain@stable
2634

.github/workflows/publish.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ jobs:
2222
sudo docker image prune --all --force
2323
sudo docker builder prune -a
2424
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
30+
- name: Install tree-sitter-cli
31+
run: npm install -g tree-sitter-cli
32+
2533
- name: Install Rust
2634
uses: dtolnay/rust-toolchain@stable
2735

.github/workflows/python.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ jobs:
2121
with:
2222
python-version: ${{ matrix.python }}
2323

24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
28+
- name: Install tree-sitter-cli
29+
run: npm install -g tree-sitter-cli
30+
2431
- name: Install Rust
2532
uses: dtolnay/rust-toolchain@stable
2633

@@ -51,6 +58,13 @@ jobs:
5158
steps:
5259
- uses: actions/checkout@v4
5360

61+
- uses: actions/setup-node@v4
62+
with:
63+
node-version: '20'
64+
65+
- name: Install tree-sitter-cli
66+
run: npm install -g tree-sitter-cli
67+
5468
- name: Check Rust formatting
5569
run: cargo fmt --package ggsql-python -- --check
5670

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ Cargo.lock
2424
ehthumbs.db
2525
Thumbs.db
2626

27+
# Tree-sitter generated files
28+
/tree-sitter-ggsql/src/parser.c
29+
/tree-sitter-ggsql/src/tree_sitter/
30+
/tree-sitter-ggsql/src/node-types.json
31+
/tree-sitter-ggsql/src/grammar.json
32+
2733
# Node.js (for tree-sitter CLI)
2834
node_modules/
2935
npm-debug.log*

tree-sitter-ggsql/bindings/rust/build.rs

Lines changed: 94 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)