Subject: [bug#49946] [PATCH v7 21/32] gnu: Add tree-sitter-ocaml.

From: "(" <[email-masked]>
Date: Fri, 25 Nov 2022 07:07:25 +0000

On Fri Nov 25, 2022 at 1:21 AM GMT, Pierre Langlois wrote:
> * gnu/packages/tree-sitter.scm (tree-sitter-ocaml): New variable.

> --- a/gnu/packages/tree-sitter.scm
> +++ b/gnu/packages/tree-sitter.scm

> @@ -487,3 +487,42 @@ (define-public tree-sitter-julia

> +  (let ((commit "0348562f385bc2bd67ecf181425e1afd6d454192")
> +        (revision "1"))

Explain and start at 0.

> +                    (delete-file "binding.gyp")
> +                    (delete-file-recursively "bindings")
> +                    (for-each
> +                     (lambda (lang)
> +                       (with-directory-excursion lang
> +                         (delete-file "src/grammar.json")
> +                         (delete-file "src/node-types.json")
> +                         (delete-file "src/parser.c")
> +                         (delete-file-recursively "src/tree_sitter")))
> +                     '("ocaml" "interface"))

This stuff should definitely be handled by the
tree-sitter-build-system...

> +      (arguments
> +       (list
> +        #:grammar-directories '("ocaml" "interface")))

Unnecessary newline and use of a quoted list; please use

  (list #:grammar-directories (list "ocaml" "interface"))

    -- (