Open mightyiam opened 1 week ago
From these lines:
It seems that the correct format should be <language>-grammar
.
Recap, because we noticed nuance and changed our minds:
This is about the pnames of packages in #tree-sitter.builtGrammars
(they show up in other paths, as well, by the way).
From the implementation code, it would appear as if their pnames should be <language>-grammar
:
But in reality, only two of them (#tree-sitter.builtGrammars.tree-sitter-{org-nvim,markdown-inline}
) have these pnames. The rest have tree-sitter-<language>-grammar
.
And that is because that implementation is called with the value provided as language
being "tree-sitter-<language>"
except for the two mentioned above. Here that is:
Accept the pname format tree-sitter-<language>-grammar
— which all but two packages have. And refactor the implementation to make that appear intentional. Not as a means of covering up the blooper :sweat_smile:, though.
EDIT: skip this and read the recap
Describe the bug
The grammars
tree-sitter.builtGrammars.tree-sitter-{org-nvim,markdown-inline}
have a wrong pname:org-grammar
andmarkdown_inline-grammar
, respectively. While the rest of the grammars would have the correct pname; for exampletree-sitter-perl-grammar
.Steps To Reproduce
Steps to reproduce the behavior:
Additional context
Discovered during #320783.
Seems to have been introduced in #156911. Argument
language
seems to never have been used, introduced in cf817454041353a235f02d34245e0873a072f31a. PR for fixing this coming up.Notify maintainers
@Profpatsch
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.
@stepbrobd