GNU bug report logs - #70895
[PATCH] grafts: Only compute necessary graft derivations.

Previous Next

Package: guix-patches;

Reported by: David Elsing <david.elsing <at> posteo.net>

Date: Sun, 12 May 2024 13:44:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: David Elsing <david.elsing <at> posteo.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 70895 <at> debbugs.gnu.org
Subject: [bug#70895] [PATCH] grafts: Only compute necessary graft derivations.
Date: Wed, 29 Jan 2025 19:30:59 +0000
Hi,

Ludovic Courtès <ludo <at> gnu.org> writes:

> 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.

Ah sure, that makes sense to me.

> Let me know if you notice something wrong.

I noticed that 'with-parameters' doesn't actually do anything here. :)
The 'graft-origin' is already a derivation anyway, so there it has
obviously no effect. For the 'graft-replacement', I noticed that when
setting %graft? to #f, it still results in the same grafted derivation.
The same was the case in my version using 'with-parameters' in
'input-graft' of course.

I also wanted to use 'with-parameters' for the ROCm packages, but found
that it generally does not work for packages [1], this seems to be also
the case here.
IIUC, this is because 'lower-object' returns a monadic procedure, which
is evaluated outside the influence of 'with-fluids' in the gexp-compiler
of <parameterized>.

The grafting still works correctly however, I think because the %graft?
parameter is also set when the derivations are actually calculated,
while in 'input-graft', 'package->derivation' is explicitely called with
#:graft? set to #f.

What do you think?

Best,
David

[1] https://issues.guix.gnu.org/75879




This bug report was last modified 107 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.