-
Notifications
You must be signed in to change notification settings - Fork 59
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
Publish parser artifacts on GitHub pages build #100
Conversation
Does this mean, that downstream users need to know where to look for the So instead of using |
This change would require nvim-treesitter to rebuild the parser. I have to check helix to see if that type of behaviour is supported or not.
The file doesn't actually get committed to the repo with the proposed change. The file could be found in We could git rid of the github pages part altogether and just publish generated files on a separate branch e.g. |
b530d6f
to
c2c833a
Compare
I've setup a sample repository and deployed it to github pages to validate my idea. You can find the webpage here: https://derek.stride.host/tree-sitter-sql-test/ This repo would mirror the behaviour of that repo just with the site published to: https://derek.stride.host/tree-sitter-sql (currently 404s until this PR is shipped). ConsiderationsI've checked both helix & nvim-treesitter, I don't think either would be affected by this change. We'd just need to point helix at a revision from the @matthias-Q @dmfay Does this seem like an okay solution to the both of you? @LeoniePhiline does my assessment of the effect on Helix look correct? |
I think this is a good idea. For nvim-treesitter, I would still add the branch in their For helix, I am not so sure. Language support is defined in the |
Node projects using it as a dependency should be okay since they'll run the |
VSCode uses the Textmate. There is a different tree-sitter-sql grammar listed on the official tree-sitter github page. I think that newer/other editors will use that when they implement TS (e.g. zed editor, but I do not know for sure). I would argue, that we also should make that clear in the main Readme.md. |
I've done some testing for nvim-treesitter & helix and I'm still fairly confident they'll be able to work with the new model.
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config["sql-test"] = {
install_info = {
url = "https://github.com/DerekStride/tree-sitter-sql-test",
branch = "gh-pages",
files = { "src/parser.c" },
},
} For helix I wasn't as thorough but I did go through the code and replicate their process of fetching the grammar:
|
Let's give this a try and if projects encounter issues with this setup we can revert & re-evaluate. I'll work on a follow-up PR to improve our README and explain the project structure. |
In #100 we removed the generated files an publish them via GitHub pages. Since then we've added a custom src/scanner.c file that is being treated as a generated file on GitHub due to the .gitattributes file. Since it's no longer needed, I've removing it.
- remove and ignore parser artifacts - update installation for neovim references: alex-pinkus/tree-sitter-swift#149 DerekStride/tree-sitter-sql#100 tree-sitter-perl/tree-sitter-perl#26
What
This is an alternative to #90. cc/ @matthias-Q @dmfay
This PR adds a jekyll site in the
docs/
folder of the repository. When new changes are merged into the main branch thegh-pages.yml
workflow runs, it will:docs/src/
gh-pages
branch.This keeps the PR merge workflow the same as before and keeps the main branch history scoped to changes to the grammar & tests. The parser artifacts will still exist in the
gh-pages
branch as well as be hosted on the generated site.Preview
Landing page
src/
directory