Subject: [bug#70895] [PATCH] grafts: Only compute necessary graft derivations.

From: Ludovic Courtès <[email-masked]>
Date: Tue, 28 Jan 2025 16:58:08 +0100

Hello,

David Elsing <[email-masked]> skribis:

> Is there a reason you use 'with-parameters' in 'graft-derivation/shallow'
> and not in 'input-graft' and 'input-cross-graft'? I attached a patch
> below where I do that and also set %current-system and
> %current-target-system (although I'm not sure they are strictly
> necessary because of the 'parameterize' in 'bag-grafts').
> Then, the changes to the gexp-compiler of <parameterized> are not
> required to allow for strings in the 'replacement' field in
> tests/grafts.scm and the tests still pass.

My thought was that the fact that grafts must be enabled on the
replacement, etc., are implementation details.  I’d like producers of
<graft> records to just be able to drop whatever is relevant to them in
the ‘replacement’ field.

I committed these the patch I sent before as two commits, and I added a
test in ‘tests/gexp.scm’ for ‘with-parameters’:

  28e4018e59 grafts: Allow file-like objects in the ‘replacement’ field of <graft>.
  3ad2d21671 gexp: ‘with-parameters’ accepts plain store items in its body.

Let me know if you notice something wrong.

Thanks a lot for suggesting this, it’s much nicer this way!

Ludo’.