-
Notifications
You must be signed in to change notification settings - Fork 29
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
Allow path for grammar source #747
Conversation
b95715c
to
6ecc054
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a few comments about the README, but otherwise it looks good 👍
Although, I don't really follow the Nix-stuff, so you may want a second opinion.
FYI, I'm trying that as part of a |
One major issues is that the grammar from nixpkgs aren't necessarily up-to-date, so the queries don't match. This might not be the case for more stable grammars, but for example this is the case for the Nickel grammar, to |
I've pushed my work-around to use the right Nickel grammar. I don't know if this needs to be done for other grammars as well,I haven't tried them all. |
@yannham Your changes look good to me insofar as I can judge, but I trust you so feel free to consider this approved if it's critical for Nickel. |
In the end I could get rid of the Nixified version of Topiary from the Nickel build altogether, so this isn't as critical as before, if you prefer to wait for another look from @ErinvanderVeen or someone else. |
9c53f07
to
9c8bd40
Compare
This build output uses the grammars from nixpkgs over those provided by topiary itself.
The tree-sitter Nickel grammar taken from Nixpkgs is too old and doesn't match current queries, and the update process to upstream an update is not obvious. In the meantime, we take the tree-sitter-nickel grammar directly from the source repo - as a flake input - to ensure it's up to date.
9c8bd40
to
cc1f8fc
Compare
I'm not proficient enough in Nix to certify this part of the changes. |
I'd like to keep the Nixified version as well for now. It doesn't reduce the functionality or behaviour of any other part of Topiary. |
Allow specifying grammars through prebuild parsers
Description
Previously, Topiary was forced to fetch the grammar repositories and build the grammars manually. This PR adds the option to specify a path to a grammar binary file.
Additionally, it adds the
topiary-cli-nix
build output, that doesn't fetch any grammars manually.Checklist
Checklist before merging: