guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Go importer - help with git-fetch


From: Ricardo Wurmus
Subject: Re: Go importer - help with git-fetch
Date: Tue, 06 Aug 2019 14:56:14 +0200
User-agent: mu4e 1.2.0; emacs 26.2

swedebugia <address@hidden> writes:

> I got this far by using (guix build git):
>
> (display (let* ((name "github.com/gogo/protobuf")
>                  (url (go-name->url name))
>                  (commit "28a6bbf47e48e0b2220b2a244750b660c83d4942"))
>             (with-store store
>               (run-with-store store
>                 (let ((path "test"))
>                   (git-fetch url commit path))))))
>
> But I'm pretty new to this derivation 2nd order code stuff and I don't 
> understand the errors.
>
> It gives me:
>
> Initialized empty Git repository in /home/egil/src/guix/test2/.git/
> remote: Enumerating objects: 924, done.
> remote: Counting objects: 100% (924/924), done.
> remote: Compressing objects: 100% (745/745), done.
> remote: Total 924 (delta 476), reused 330 (delta 132), pack-reused 0
> Receiving objects: 100% (924/924), 1.45 MiB | 944.00 KiB/s, done.
> Resolving deltas: 100% (476/476), done.
>  From https://github.com/gogo/protobuf
>   * branch            28a6bbf47e48e0b2220b2a244750b660c83d4942 -> FETCH_HEAD
> Note: checking out 'FETCH_HEAD'.
>
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
>
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
>
>    git checkout -b <new-branch-name>
>
> HEAD is now at 28a6bbf [merge] Fix merge of non-nullable slices (#569)
> Backtrace:
>             8 (apply-smob/1 #<catch-closure 1f4e1c0>)
> In ice-9/boot-9.scm:
>      705:2  7 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
> In ice-9/eval.scm:
>      619:8  6 (_ #(#(#<directory (guile-user) 1fe0140>)))
> In ice-9/boot-9.scm:
>     2312:4  5 (save-module-excursion _)
>    3831:12  4 (_)
> In guix/import/go.scm:
>     262:11  3 (_)
> In guix/store.scm:
>     623:10  2 (call-with-store #<procedure 2607960 at guix/import/go.…>)
>    1803:24  1 (run-with-store #<store-connection 256.99 29f4ae0> _ # _ …)
> In unknown file:
>             0 (_ #<store-connection 256.99 29f4ae0>)
>
> ERROR: Wrong type to apply: #t
>
> What does this error mean?

The error means that you tried to use #T as a procedure.
“run-with-store” expects a monadic value.  “git-fetch” returns #T,
though, not a monadic value.

Note that we already have all the stuff that’s needed for hash
computation of git checkouts.   Look for “guix hash -rx”.

-- 
Ricardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]