Include (some?) generated artifacts in the repository
Closed this issue · 2 comments
As a general rule, I don't save generated files in version control repositories. But the convention for tree-sitter grammars seems to be that the generated files are stored in the repository. My current editor Helix uses tree-sitter extensively, as defined in this languages.toml file, and all the tree-sitter grammars that I checked include (some?) of the generated files in the repo.
@ckindermann Please figure out what the convention is and let's adopt it.
I couldn't find any explicit conventions for tree-sitter other than what is written here about a repository's name. So, I looked at popular tree-sitter repositories (popular meaning they have more than 100 stars on GitHub), e.g, Bash, Python, C, Go, JavaScript, Markdown. They all include source files generated via tree-sitter generate
, i.e,
binding.gyp
bindings
Cargo.toml
grammar.js
LICENSE
package.json
src
I also noticed that these generated files are sometimes modified, e.g., to alter the behavior of the parser. So, it seems to me that we should also keep these generated files under version control.
Ok, let's add the generated files to the repository.