euclidianAce / tree-sitter-teal

A tree sitter grammar for Teal, a typed dialect of Lua
38 stars 4 forks source link

Consider committing `grammar.json` #22

Closed clason closed 7 months ago

clason commented 8 months ago

While keeping parser.c out of version control is reasonable (and in fact recommended by upstream), the generated grammar.json is much smaller and has meaningful diffs. The benefit of keeping this in the repo is that downstream users (like nvim-treesitter) do not require node for building and can just consistently(!) do tree-sitter g src/grammar.json && tree-sitter build -o parser.so (which is what nvim-treesitter is transitioning to for 1.0).

In addition, consider making proper releases including the generated artifacts (which is what nvim-treesitter will require for "stable" parsers). Upstream is in the process of adding reusable workflows and tree-sitter support to make this easier.

euclidianAce commented 5 months ago

Sorry for the radio silence. Does treesitter or neovim have any sort of best/recommended practices for publishing releases?

Thanks!

clason commented 5 months ago

Tree-sitter will be adding a tree-sitter release workflow to simplify this in the next few months; probably best to wait for this. I expect it will be added to https://github.com/tree-sitter/workflows, which is already useful now for testing.

clason commented 5 months ago

You didn't actually include src/grammar.json and src/nodes.json, though?

euclidianAce commented 5 months ago

Didn't read my git stage close enough apparently. They are commited now.