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

Upgrade to tree-sitter 0.22.6 #485

Merged
merged 6 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ jobs:
- run: opam exec -- make install
- run: opam exec -- make -C core test
- run:
name: test languages
# A bunch of parsers fail to build with tree-sitter 0.22.6
# and need to be upgraded.
# Some parsers won't build due to 'tree-sitter generate'
# using too much memory: c-sharp, hack
# Programmers should check the list of failed languages
# printed at the end of the CI job and proceed to merge
# their PR responsibly.
name: "test languages (known to fail for some languages)"
no_output_timeout: 60m
command: opam exec -- make lang

Expand Down
2 changes: 1 addition & 1 deletion core
Submodule core updated from a3283b to c085bc
2 changes: 2 additions & 0 deletions lang/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ tree-sitter-parser.js
/*/index.js
/*/tree-sitter-parser.js
node-types.json
# Dummy grammar.js for tree-sitter 0.22.6 (see comment in Makefile.common)
/*/grammar.js

# Files generated by ocaml-tree-sitter
/*/ocaml-src
Expand Down
1 change: 1 addition & 0 deletions lang/semgrep-grammars/src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/semgrep-*/**/index.js
/semgrep-*/**/src
/semgrep-*/**/inherited
/semgrep-*/test.log
13 changes: 11 additions & 2 deletions lang/semgrep-grammars/src/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,19 @@ prep:

.PHONY: test
test:
# 'tree-sitter test' can emit a large number of repetitive error
# messages when compiling 'parser.c'.
set -e; \
for dir in $$(find . | grep 'grammar.js$$' | xargs -L1 dirname); do \
echo "Test $$dir"; \
(cd "$$dir" && tree-sitter test); \
echo "Test $$(pwd)"; \
(cd "$$dir"; \
show_log() { echo "..."; tail -n 1000 test.log; }; \
if tree-sitter test > test.log 2>&1; then \
show_log; \
else \
show_log; \
exit 1; \
fi); \
done

.PHONY: clean
Expand Down
Loading