GNU bug report logs -
#70720
[PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang
Previous Next
Reported by: Karl Hallsby <karl <at> hallsby.com>
Date: Thu, 2 May 2024 15:38:02 UTC
Severity: normal
Tags: patch
Done: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Karl Hallsby via Guix-patches via <guix-patches <at> gnu.org> writes:
> * gnu/packages/tree-sitter.scm (tree-sitter-vhdl): New variable.
>
> This is the tree-sitter-vhdl implementation the tree-sitter website points to,
> but it seems that tree-sitter-vhdl seems to be abandoned (though it may be
> complete). The cleanup snippet does more work than it should probably do, but
> it is the only way for
>
>
> Change-Id: Ia26e33f9898573e70c9afdd4025e3770d042dbd6
> ---
> gnu/packages/tree-sitter.scm | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
> index 105581bfc4..42f311223e 100644
> --- a/gnu/packages/tree-sitter.scm
> +++ b/gnu/packages/tree-sitter.scm
> @@ -716,3 +716,34 @@ (define-public tree-sitter-verilog
> (use-modules (guix build utils))
> (delete-file "binding.gyp")
> (delete-file-recursively "bindings"))))))
> +
> +(define-public tree-sitter-vhdl
> + (let ((commit "a3b2d84990527c7f8f4ae219c332c00c33d2d8e5")
> + (revision "0"))
> + (tree-sitter-grammar
> + "vhdl" "VHDL"
> + "0gz2b0qg1jzi2q6wgj6k6g35kmni3pqglq4f5kblkxx909463n8a"
> + (git-version "0.0.0" revision commit)
i think version should 0.1.1, not 0.0.0
see https://github.com/alemuller/tree-sitter-vhdl/blob/main/package.json
> + #:repository-url "https://github.com/alemuller/tree-sitter-vhdl"
> + #:commit commit
> + #:get-cleanup-snippet
> + (lambda _
> + #~(begin
> + (use-modules (guix build utils))
> + (delete-file "binding.gyp")
> + ;; tree-sitter-vhdl does not have bindings/ directory.
> + (delete-file "src/grammar.json")
> + (delete-file "src/node-types.json")
> + (delete-file "src/parser.c")
> + (delete-file-recursively "src/tree_sitter")
> + ;; Fix a query error in the highlight.scm query test. This would be
> + ;; easier with a patch, but this works too, and we still get to use
> + ;; tree-sitter-grammar. The fix is taken from here:
> + ;; https://github.com/n8tlarsen/tree-sitter-vhdl/commit/dabf157c6bb7220d72d3ceba0ce1abd90bf62187
> + ;; This is a documented issue that has not been resolved for nearly 2
> + ;; years.
> + ;; https://github.com/alemuller/tree-sitter-vhdl/issues/2
> + (substitute* "queries/highlights.scm"
> + (("\\(integer_decimal\n") "(integer_decimal)\n")
> + (("\\(integer\\)") "")
> + (("\"0\")") "\"0\"")))))))
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 1 year and 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.