camdencheek / tree-sitter-dockerfile

A tree-sitter grammar for Dockerfile
MIT License
71 stars 20 forks source link

Makefile doesn't work with tree-sitter 0.22 #48

Open mavit opened 5 months ago

mavit commented 5 months ago

With recent versions of tree-sitter, make ends with the following error:

src/parser.c:1:10: fatal error: tree_sitter/parser.h: No such file or directory
    1 | #include <tree_sitter/parser.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: src/parser.o] Error 1

This appears to do the trick:

rm Makefile
tree-sitter generate
sed -i 's/^VERSION := 0\.0\.1$/VERSION := 0.1.2/' Makefile
camdencheek commented 4 months ago

Fixed! Thanks for the report.

mavit commented 4 months ago

Thanks, but now it fails with:

install: cannot stat 'bindings/c/tree-sitter-dockerfile.h': No such file or directory
make: *** [Makefile:91: install] Error 1

This file is created by tree-sitter generate, but this is obscured by the following .gitignore rule:

/bindings/c/*.h