Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#71160 - [tree-sitter] nodejs and clang/gcc should be optional dependencies

Attached to Project: Community Packages
Opened by Douglas Creager (dcreager) - Monday, 07 June 2021, 14:58 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 08 June 2021, 05:29 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Filipe LaĆ­ns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


The tree-sitter package installs the `tree-sitter` command-line program, which contains several useful subcommands for writing and using programming language parsers. Some of these subcommands have additional dependencies [1], which are not currently listed in tree-sitter's Arch package.


The `tree-sitter generate` subcommand generates the C implementation of a particular language's parser from its grammar definition. The grammars are written in a JavaScript DSL, and this subcommand shells out to `node` to execute the DSL. Per the documentation, nodejs >= 6.0 is needed. (No additional JS packages are required, just the node runtime.)

Several subcommands (including `tree-sitter parse` and `tree-sitter tags`) look for grammar definitions in a user-configurable location, and will generate and compile the grammars on the fly if needed. This requires a C compiler. Is there a generic "C compiler" pseudo-package that we could list as a dependency? If not we could list gcc and/or clang specifically.

In all of the above, the tree-sitter command should fail gracefully if the required programs are not available, which suggests that these should all be listed as optional dependencies.

This task depends upon