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

grammars must have a file src/parser.c (i.e. cannot link against system-shared tree-sitter library) #7202

Closed
jonassmedegaard opened this issue Jun 1, 2023 Discussed in #7200 · 1 comment

Comments

@jonassmedegaard
Copy link

jonassmedegaard commented Jun 1, 2023

Discussed in #7200

Originally posted by jonassmedegaard June 1, 2023

Summary

helix-loader grammar compiler supports grammars that omit src/scanner.c but fail to compile if src/parser.c is missing.

Reproduction Steps

I tried switching to the alternative Perl grammar in languages.toml:

[[grammar]]
name = "perl"
source = { git = "https://github.com/tree-sitter-perl/tree-sitter-perl", rev = "7dab73715fa18309102892eda2b190bcb3c7b9b4" }

hx --grammar fetch succeeded, but hx --grammar build failed.

Patching helix to tolerate missing parser.c makes the build succeed, (and the resulting experience is a more reliable Perl grammar - I'll file a separate issue about that see #7201).

Helix log

No response

Platform

Linux

Terminal Emulator

alacritty 0.11.0

Helix Version

helix 23.05

@jonassmedegaard
Copy link
Author

jonassmedegaard commented Jun 1, 2023

I now spotted that I had locally overriden my derived built-in source URI back to the original one: My patch makes the build succeed but the resulting code does not present any color highlighting. Sigh.

Closing as a non-bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant