My understanding is that files that can be generated from other code on the repo should not be checked into version control.
In particular, grammar.json and parser.c add a lot of noise to commits. Is it safe to ignore these?
If the parser only needs to be used from node.js, then it's ok to .gitignore those generated files, because they are published to npm. But if you want the parser to be able to be used from other languages (e.g. Rust, Haskell, Go), then including them in the repo is a huge simplification. Otherwise, applications wanting to use the parsers would need to regenerate them using tree-sitter-cli, which brings in another dependency and is slow for some grammars.
Should that suggestion be included in the docs somewhere?
@maxbrunsfeld That sounds like a good idea.
Most helpful comment
Should that suggestion be included in the docs somewhere?