all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts)
@ 2023-09-11 15:17 Simon Tournier
  2023-09-11 17:51 ` wolf
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Simon Tournier @ 2023-09-11 15:17 UTC (permalink / raw)
  To: guix-devel, Ludovic Courtès

Hi,

On Mon, 11 Sep 2023 at 16:23, Ludovic Courtès <ludo@gnu.org> wrote:

> Note that the patch series adds a hard dependency on Git.
> This is because the existing ‘git-fetch’ code depends on Git,
> which is itself motivated by the fact that Git supports
> shallow clones and libgit2/Guile-Git doesn’t.

Going this path, I appears to me worth to revisit the proposal:

        RFC: libgit2 is slow/inefficient; switch to git command?
        Maxim Cournoyer <maxim.cournoyer@gmail.com>
        Mon, 21 Nov 2022 21:21:02 -0500
        id:87cz9fpw4x.fsf@gmail.com
        https://yhetil.org/guix/87cz9fpw4x.fsf@gmail.com
        https://lists.gnu.org/archive/html/guix-devel/2022-11

I know it is not an option for now to parse the output of ’git’ commands
in order to keep the features of (guix git), (guix channels), etc.

However, this discussion was mentioning an implementation of
clone/checkout in pure Racket supporting shallow checkout.  Considering
the current level of integration, I thought the next Big Plan™ was to
gradually move bits of Guile-Git to being pure Scheme, maybe based on
the Racket implementation of ’clone’ as a starting point.

Personally, I do not have a strong opinion about the Big Plan™.  I note
that the introduction of Git as a hard dependency is a slippery slope
considering the current state of libgit2.  Here, it starts with “git
clone”, then “git gc” (unsupported by libgit2) is also in the pipes
(#65720 [1]).  And after timing, I am almost sure that many operations
using Guile-Git will be slower than their plain Git counter-parts.  And
we will start to parse the output of ’git’ plumbing commands.  Slippery
slope for pushing Guile-Git out, no?

And I do not speak about the closure.  Is it possible to extract the
command ’git-clone’ from git-minimal?  It would reduce the size, no?


Cheers,
simon

1: https://issues.guix.gnu.org/65720


^ permalink raw reply	[flat|nested] 24+ messages in thread
* [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts
@ 2023-09-21  7:42 Ludovic Courtès
  2023-09-22 22:27 ` [bug#65866] [PATCH v2 " Ludovic Courtès
  0 siblings, 1 reply; 24+ messages in thread
From: Ludovic Courtès @ 2023-09-21  7:42 UTC (permalink / raw)
  To: Maxim Cournoyer
  Cc: Josselin Poiret, Simon Tournier, Mathieu Othacehe,
	Tobias Geerinckx-Rice, Ricardo Wurmus, 65866, Christopher Baines

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

>> +(define* (perform-git-download drv #:optional output
>> +                               #:key print-build-trace?)
>> +  "Perform the download described by DRV, a fixed-output derivation, to
>> +OUTPUT.
>> +
>> +Note: Unless OUTPUT is #f, we don't read the value of 'out' in DRV since the
>> +actual output is different from that when we're doing a 'bmCheck' or
>
> I'd drop the 'we's and use impersonal imperative tense or at least
> 's/when we're doing/when doing/'.

Noted.  (That’s actually copied from ‘perform-download’; I’ll fix it
there as well.)

>> +'bmRepair' build."
>> +  (derivation-let drv ((output* "out")
>
> I'd name this variable just 'out', for consistency with the others.

No because there’s also a parameter called ‘output’ and there’s
(or output output*).  But lemme see, I should remove this optional
‘output’ parameter.

>> +;; 'with-temporary-git-repository' relies on the 'git' command.
>> +(unless (which (git-command)) (test-skip 1))
>
> I'd expect the 'git' command to now be required by Autoconf at build
> time, which should mean checking it here is not useful/required?

That comes in a subsequent patch.

>> +(test-assert "'git-download' built-in builder, not found"
>> +  (let* ((drv (derivation %store "git-download"
>> +                          "builtin:git-download" '()
>> +                          #:env-vars
>> +                          `(("url" . "file:///does-not-exist.git")
>> +                            ("commit"
>> +                             . "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
>> +                          #:hash-algo 'sha256
>> +                          #:hash (gcrypt:sha256 #vu8())
>> +                          #:recursive? #t)))
>> +    (guard (c ((store-protocol-error? c)
>> +               (string-contains (store-protocol-error-message c) "failed")))
>> +      (build-derivations %store (list drv))
>> +      #f)))
>> +
>
> Maybe the error message compared could be more precised, if it already
> contains the necessary details?

Unfortunately it doesn’t (same strategy as with the existing
“builtin:download” tests.)

Thanks for your feedback!

Ludo’.




^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-09-26 15:45 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 15:17 hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts) Simon Tournier
2023-09-11 17:51 ` wolf
2023-09-11 18:26   ` Maxim Cournoyer
2023-09-11 22:48     ` comparing commit-relation using Scheme+libgit2 vs shellout plumbing Git Simon Tournier
2023-09-12 11:07       ` Attila Lendvai
2023-09-14 10:30       ` Ludovic Courtès
2023-09-14 11:56         ` Simon Tournier
2023-09-11 17:52 ` hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts) Simon Tournier
2023-09-11 18:20 ` Maxim Cournoyer
2023-09-12  9:06   ` Josselin Poiret
2023-09-12 12:56     ` Maxim Cournoyer
2023-09-12 14:08       ` wolf
2023-09-14 10:22     ` Ludovic Courtès
2023-09-14 16:51   ` Ludovic Courtès
2023-09-14 17:28     ` Simon Tournier
2023-09-17  2:16     ` Maxim Cournoyer
2023-09-18 13:56       ` [bug#65866] " Ludovic Courtès
2023-09-18 14:45         ` Simon Tournier
2023-09-19 14:43           ` bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts Ludovic Courtès
2023-09-19 17:09             ` Simon Tournier
2023-09-11 19:35 ` hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts) Vagrant Cascadian
2023-09-11 21:23   ` Csepp
2023-09-12  7:44   ` Simon Tournier
  -- strict thread matches above, loose matches on Subject: below --
2023-09-21  7:42 [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts Ludovic Courtès
2023-09-22 22:27 ` [bug#65866] [PATCH v2 " Ludovic Courtès
2023-09-22 22:28   ` [bug#65866] [PATCH v2 7/8] git-download: Use “builtin:git-download” when available Ludovic Courtès
2023-09-25  8:33     ` Simon Tournier
2023-09-25  9:23       ` [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts Ludovic Courtès
2023-09-25 12:48         ` Simon Tournier
2023-09-26 15:44           ` bug#65866: " Ludovic Courtès

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.