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 Daniel M. Capella (polyzen) - Wednesday, 17 May 2023, 05:35 GMT
Opened by Douglas Creager (dcreager) - Monday, 07 June 2021, 14:58 GMT
Last edited by Daniel M. Capella (polyzen) - Wednesday, 17 May 2023, 05:35 GMT
|
Details
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.
[1] https://tree-sitter.github.io/tree-sitter/creating-parsers#dependencies 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. Thanks! |
This task depends upon
Closed by Daniel M. Capella (polyzen)
Wednesday, 17 May 2023, 05:35 GMT
Reason for closing: Implemented
Additional comments about closing: nodejs optdep added in 0.20.8-3
Wednesday, 17 May 2023, 05:35 GMT
Reason for closing: Implemented
Additional comments about closing: nodejs optdep added in 0.20.8-3
Comment by
Daniel M. Capella (polyzen) -
Friday, 12 May 2023, 06:25 GMT
Comment by
Daniel M. Capella (polyzen) -
Wednesday, 17 May 2023, 05:23 GMT
Not sure if this affects us:
https://github.com/tree-sitter/node-tree-sitter/pull/127
Considering the package currently already depends on gcc-libs, I
don't know if it's worth adding a clang optdep.