Skip to content
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

investigate replacing the submodules system for grammars #1549

Closed
the-mikedavis opened this issue Jan 20, 2022 · 2 comments · Fixed by #1659
Closed

investigate replacing the submodules system for grammars #1549

the-mikedavis opened this issue Jan 20, 2022 · 2 comments · Fixed by #1659
Labels
A-packaging Area: Packaging and bundling C-enhancement Category: Improvements

Comments

@the-mikedavis
Copy link
Member

Tree-sitter grammars are currently all added to the project as git submodules. There are quite a few supported languages now, so it ends up being very expensive to clone helix.

It may make sense to have a separate CLI to do fetching and grammar compilation in the future, but for now it looks like a nice and small increment to switch submodules out for a script like this one in tree-sitter itself. A shallow clone for each grammar would be faster.

There are also some packaging methods that have a hard time with submodules which a script may improve. See void-packages#33881 and #1448.

@the-mikedavis the-mikedavis added the C-enhancement Category: Improvements label Jan 20, 2022
@the-mikedavis
Copy link
Member Author

I'm interested in experimenting with this as my time allows. If others have ideas or want to beat me to the punch, feel free 🙂

@kbknapp
Copy link

kbknapp commented Feb 15, 2022

To add to this, I've been having an issue recently where the submodules say they're updated, but don't actually clone any of the data. This causes the build script in helix-syntax to fail. But it's frustrating when it's only a few of the grammars, so you're left looking through manually trying to find which dirs didn't clone, delete them, re submodule update, etc. A script would probably be a far less error prone way to solve this.

@the-mikedavis the-mikedavis changed the title investigate using a script instead of submodules for grammars investigate replacing the submodules system for grammars Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-packaging Area: Packaging and bundling C-enhancement Category: Improvements
Projects
None yet
3 participants