unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: swedebugia <swedebugia@riseup.net>
Cc: guix-devel@gnu.org
Subject: Re: Go importer - help with git-fetch
Date: Tue, 06 Aug 2019 14:56:14 +0200	[thread overview]
Message-ID: <87zhkmxxjl.fsf@elephly.net> (raw)
In-Reply-To: <4c2f5f76-b431-57ce-3697-ac2cbb48f395@riseup.net>


swedebugia <swedebugia@riseup.net> 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

  parent reply	other threads:[~2019-08-06 12:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06 10:23 Go importer - help with git-fetch swedebugia
2019-08-06 10:26 ` Pierre Neidhardt
2019-08-06 12:45   ` swedebugia
2019-08-06 12:56 ` Ricardo Wurmus [this message]
2019-08-06 13:04   ` Jakob L. Kreuze
2019-08-06 20:26     ` swedebugia
2019-08-06 20:46       ` Jakob L. Kreuze
2019-08-06 22:02       ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhkmxxjl.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    --cc=swedebugia@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).