Hi,

I'm hitting this error while working on a package and am hoping that
someone can help me figure out how to start debugging things like it.

I'm using the =tree-sitter-build-system= and this is what I've got so
far:

#+begin_src scheme
(define-public tree-sitter-astro
  (let ((commit "6e3bad36a8c12d579e73ed4f05676141a4ccf68d")
        (revision "1")
        (version "0.0.1"))
    (tree-sitter-grammar
     "astro" "ASTRO"
     "1238n529jipzrchkd1z8y3rn9qcascykls8h128qz2322x0la25rf"
     (git-version version revision commit)
     #:commit commit
     #:repository-url "https://github.com/virchau13/tree-sitter-astro.git";
     #:inputs (list tree-sitter-typescript
                    tree-sitter-javascript
                    tree-sitter-css
                    tree-sitter-html)
     #:get-cleanup-snippet
     (lambda (grammar-directories)
       #~(begin
           (use-modules (guix build utils))
           (delete-file "tree-sitter-javascript.wasm")
           (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")
                ;; There's stuff in src/tree_sitter that doesn't get generated
                (delete-file "src/tree_sitter/parser.h")))
            '#$grammar-directories))))))
#+end_src

When I try building the package source, I end up with this invalid hash error:

#+begin_quote
While executing meta-command:
ERROR:
  1. &store-protocol-error:
      message: "invalid hash 
`2e17a128e8420cf1311201224da7675a319c6c1e1efdd02664f9df289328160d11'"
      status: 1
#+end_quote

I've been trying to poke around in the repl and tried to isolate just the 
derivation for the package source. I got as far as trying to call =git-fetch= 
directly, but it has the same result:

#+begin_src scheme
scheme@(config packages tree-sitter) [1]> (pk (with-store store (run-with-store 
store $35)))
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
ERROR:
  1. &store-protocol-error:
      message: "invalid hash 
`2e17a128e8420cf1311201224da7675a319c6c1e1efdd02664f9df289328160d11'"
      status: 1

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
#+end_src
 
I also tried setting the =#:snippet= to =#f= by passing in =(lambda _ #f)=, but 
there was no change there.

Can anyone point me in a better direction, or maybe give me some repl tips to 
try to figure this out?

I have no idea where this hash is coming from in the process, since its not the 
value that I pass in through the package definition.

-- 
Best regards,
Jake Shilling

Attachment: signature.asc
Description: PGP signature

Reply via email to