From: Csepp <raingloom@riseup.net>
To: Simon Tournier <zimon.toutoune@gmail.com>
Cc: Csepp <raingloom@riseup.net>, phodina via <help-guix@gnu.org>
Subject: Re: libgit2 shallow clone (was Re: Packaging Grafana)
Date: Mon, 16 Jan 2023 17:02:12 +0100 [thread overview]
Message-ID: <87wn5mzcnu.fsf@riseup.net> (raw)
In-Reply-To: <87tu0qu2sl.fsf@gmail.com>
Simon Tournier <zimon.toutoune@gmail.com> writes:
> Hi,
>
> On dim., 15 janv. 2023 at 12:12, Csepp <raingloom@riseup.net> wrote:
>
>> Honestly, I think our Go importer needs to be rewritten to just use Go's
>> libraries instead of trying to replicate all functionality in Guile. It
>> does a lot of... let's say sub-optimal things currently, like cloning
>> full git repos, when Go is smart enough to only clone what it needs for
>> dependency resolution.
>
> About cloning, the core of the issue is not Guile but libgit2. Guix
> relies on guile-git which is just libgit2. And sadly, libgit2 does not
> support shallow clone or depth fetch option. See libgit2 issue#3058.
>
> If I read correctly, Go relies on plain Git, instead.
>
> Therefore, sadly we cannot do better than full Git repository clone.
>
> It would be difficult switch from libgit2 to plain Git; as discussed in
> this thread [2].
>
>
> 1: <https://github.com/libgit2/libgit2/issues/3058>
> 2: <https://yhetil.org/guix/87cz9fpw4x.fsf@gmail.com>
>
> Cheers,
> simon
It would be worth it for importers. If I remember correctly, the
reasoning for writing importers as Guile modules is reducing Guix's
closure size, but that's nonsense when it comes to importing packages,
because 99.9999% of the time you are going to be using the language's
tooling anyways, because you will want to actually compile those
imported packages.
The Rust importer already loads guile-json or whatever at runtime, there
is nothing wrong with having a similar runtime-only dependency on the Go
compiler.
next prev parent reply other threads:[~2023-01-16 16:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-15 9:18 Packaging Grafana phodina via
2023-01-15 11:12 ` Csepp
2023-01-15 17:47 ` Leo Famulari
2023-01-16 11:39 ` libgit2 shallow clone (was Re: Packaging Grafana) Simon Tournier
2023-01-16 16:02 ` Csepp [this message]
2023-01-16 16:34 ` Simon Tournier
2023-01-15 17:46 ` Packaging Grafana Leo Famulari
2023-01-21 16:37 ` Katherine Cox-Buday
2023-01-21 16:47 ` Katherine Cox-Buday
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wn5mzcnu.fsf@riseup.net \
--to=raingloom@riseup.net \
--cc=help-guix@gnu.org \
--cc=zimon.toutoune@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.